summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-29 22:23:49 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-29 22:23:49 +0000
commitf7c80ac89d54f43a43a1fad19a5b4e919927d263 (patch)
treebff16aef806ed0e727a7e78ab6c08ecc5640d90e /chrome/test
parent52a26894a92e0d8b756bcce2bc96cd741f135329 (diff)
downloadchromium_src-f7c80ac89d54f43a43a1fad19a5b4e919927d263.zip
chromium_src-f7c80ac89d54f43a43a1fad19a5b4e919927d263.tar.gz
chromium_src-f7c80ac89d54f43a43a1fad19a5b4e919927d263.tar.bz2
Remove support for some deprecated APIs in manifest version 2.
TBR=kalman@chromium.org Review URL: http://codereview.chromium.org/9295042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119647 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/data/extensions/api_test/stubs/background.html (renamed from chrome/test/data/extensions/api_test/stubs/background.js)4
-rw-r--r--chrome/test/data/extensions/api_test/stubs/manifest.json5
-rw-r--r--chrome/test/data/extensions/browsertest/crash_25562/background.js23
-rw-r--r--chrome/test/data/extensions/browsertest/crash_25562/manifest.json9
-rw-r--r--chrome/test/data/extensions/browsertest/title_localized_pa/background.js4
5 files changed, 12 insertions, 33 deletions
diff --git a/chrome/test/data/extensions/api_test/stubs/background.js b/chrome/test/data/extensions/api_test/stubs/background.html
index c0fcc45..f1d207d 100644
--- a/chrome/test/data/extensions/api_test/stubs/background.js
+++ b/chrome/test/data/extensions/api_test/stubs/background.html
@@ -1,4 +1,5 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+<script>
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -16,3 +17,4 @@ chrome.extension.onRequest.addListener(function(msg, sender, responseFunc) {
// On first install, send a success message so the test can continue.
chrome.test.notifyPass();
+</script>
diff --git a/chrome/test/data/extensions/api_test/stubs/manifest.json b/chrome/test/data/extensions/api_test/stubs/manifest.json
index af8bbbb..6909f1e 100644
--- a/chrome/test/data/extensions/api_test/stubs/manifest.json
+++ b/chrome/test/data/extensions/api_test/stubs/manifest.json
@@ -1,10 +1,7 @@
{
"name": "Content Script Extension API Stubs Test",
"version": "1.0",
- "manifest_version": 2,
- "background": {
- "scripts": ["background.js"]
- },
+ "background_page": "background.html",
"content_scripts": [
{
"matches": ["http://*/*"],
diff --git a/chrome/test/data/extensions/browsertest/crash_25562/background.js b/chrome/test/data/extensions/browsertest/crash_25562/background.js
index 8ff4dc0..0264428 100644
--- a/chrome/test/data/extensions/browsertest/crash_25562/background.js
+++ b/chrome/test/data/extensions/browsertest/crash_25562/background.js
@@ -1,28 +1,11 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// The Page Action ID.
-var pageActionId = "TestId";
-
-// The window this Page Action is associated with.
-var windowId = -1;
-
-// The TabId this Page Action is associated with.
-var tabId = -1;
-
-// The URL of the page on build.chromium.org.
-var pageUrl = "";
-
chrome.self.onConnect.addListener(function(port) {
- windowId = port.tab.windowId;
- tabId = port.tab.id;
- pageUrl = port.tab.url;
-
- port.onMessage.addListener(function(mybool) {
+ port.onMessage.addListener(function() {
// Let Chrome know that the PageAction needs to be enabled for this tabId
// and for the url of this page.
- chrome.pageActions.enableForTab(pageActionId,
- {tabId: tabId, url: pageUrl});
+ chrome.pageAction.show(port.sender.tab.id);
});
});
diff --git a/chrome/test/data/extensions/browsertest/crash_25562/manifest.json b/chrome/test/data/extensions/browsertest/crash_25562/manifest.json
index 4783f04..5c3c5a8 100644
--- a/chrome/test/data/extensions/browsertest/crash_25562/manifest.json
+++ b/chrome/test/data/extensions/browsertest/crash_25562/manifest.json
@@ -8,12 +8,9 @@
} ],
"description": "A page action with incorrect icon specification",
"name": "Test extension",
- "page_actions": [ {
- "icon": "chrome-16.png",
- "id": "TestId",
- "name": "Page action name",
- "tooltip": "Page action tooltip"
- } ],
+ "page_action": {
+ "icon": "chrome-16.png"
+ },
"permissions": [ "http://*/*" ],
"manifest_version": 2,
"version": "1.0"
diff --git a/chrome/test/data/extensions/browsertest/title_localized_pa/background.js b/chrome/test/data/extensions/browsertest/title_localized_pa/background.js
index 82daf0b..0031ace 100644
--- a/chrome/test/data/extensions/browsertest/title_localized_pa/background.js
+++ b/chrome/test/data/extensions/browsertest/title_localized_pa/background.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -6,6 +6,6 @@ chrome.self.onConnect.addListener(function(port) {
port.onMessage.addListener(function(mybool) {
// Let Chrome know that the PageAction needs to be enabled for this tabId
// and for the url of this page.
- chrome.pageAction.show(port.tab.id);
+ chrome.pageAction.show(port.sender.tab.id);
});
});