summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/test/data/extensions/api_test/page_capture/background.html5
-rw-r--r--chrome/test/data/extensions/api_test/page_capture/google.html5
-rw-r--r--chrome/test/data/extensions/api_test/page_capture/manifest.json1
-rw-r--r--chrome/test/data/extensions/api_test/permissions/always_allowed/background.html41
-rw-r--r--chrome/test/data/extensions/api_test/permissions/always_allowed/manifest.json1
-rw-r--r--chrome/test/data/extensions/api_test/permissions/disabled/background.html53
-rw-r--r--chrome/test/data/extensions/api_test/permissions/disabled/manifest.json1
-rw-r--r--chrome/test/data/extensions/api_test/permissions/enabled/background.html53
-rw-r--r--chrome/test/data/extensions/api_test/permissions/enabled/manifest.json1
-rw-r--r--chrome/test/data/extensions/api_test/permissions/experimental_disabled/background.html25
-rw-r--r--chrome/test/data/extensions/api_test/permissions/experimental_disabled/manifest.json1
-rw-r--r--chrome/test/data/extensions/api_test/permissions/favicon/manifest.json1
-rw-r--r--chrome/test/data/extensions/api_test/permissions/favicon/test.html30
-rw-r--r--chrome/test/data/extensions/api_test/permissions/nacl_enabled/background.html36
-rw-r--r--chrome/test/data/extensions/api_test/permissions/nacl_enabled/manifest.json1
-rw-r--r--chrome/test/data/extensions/api_test/permissions/optional/background.html319
-rw-r--r--chrome/test/data/extensions/api_test/permissions/optional/manifest.json1
-rw-r--r--chrome/test/data/extensions/api_test/permissions/optional_deny/background.html70
-rw-r--r--chrome/test/data/extensions/api_test/permissions/optional_deny/manifest.json1
-rw-r--r--chrome/test/data/extensions/api_test/permissions/optional_gesture/background.html23
-rw-r--r--chrome/test/data/extensions/api_test/permissions/optional_gesture/manifest.json1
-rw-r--r--chrome/test/data/extensions/api_test/preference/clear/manifest.json1
-rw-r--r--chrome/test/data/extensions/api_test/preference/clear/test.html46
-rw-r--r--chrome/test/data/extensions/api_test/preference/onchange/manifest.json1
-rw-r--r--chrome/test/data/extensions/api_test/preference/onchange/test.html101
-rw-r--r--chrome/test/data/extensions/api_test/preference/persistent_incognito/manifest.json1
-rw-r--r--chrome/test/data/extensions/api_test/preference/persistent_incognito/test.html55
-rw-r--r--chrome/test/data/extensions/api_test/preference/session_only_incognito/manifest.json1
-rw-r--r--chrome/test/data/extensions/api_test/preference/session_only_incognito/test.html88
-rw-r--r--chrome/test/data/extensions/api_test/preference/standard/manifest.json1
-rw-r--r--chrome/test/data/extensions/api_test/preference/standard/test.html75
-rw-r--r--chrome/test/data/extensions/api_test/processes/api/a.html5
-rw-r--r--chrome/test/data/extensions/api_test/processes/api/b.html5
-rw-r--r--chrome/test/data/extensions/api_test/processes/api/manifest.json1
-rw-r--r--chrome/test/data/extensions/api_test/processes/api/test.html5
-rw-r--r--chrome/test/data/extensions/api_test/processes/api/test.js4
-rw-r--r--chrome/test/data/extensions/api_test/processes/onupdated/background.html21
-rw-r--r--chrome/test/data/extensions/api_test/processes/onupdated/manifest.json1
-rw-r--r--chrome/test/data/extensions/api_test/proxy/auto/manifest.json1
-rw-r--r--chrome/test/data/extensions/api_test/proxy/auto/test.html5
-rw-r--r--chrome/test/data/extensions/api_test/proxy/bypass/manifest.json1
-rw-r--r--chrome/test/data/extensions/api_test/proxy/bypass/test.html5
-rw-r--r--chrome/test/data/extensions/api_test/proxy/direct/manifest.json1
-rw-r--r--chrome/test/data/extensions/api_test/proxy/direct/test.html5
-rw-r--r--chrome/test/data/extensions/api_test/proxy/events/invalid_proxy.html62
-rw-r--r--chrome/test/data/extensions/api_test/proxy/events/manifest.json1
-rw-r--r--chrome/test/data/extensions/api_test/proxy/events/parse_error.html44
-rw-r--r--chrome/test/data/extensions/api_test/proxy/individual/manifest.json1
-rw-r--r--chrome/test/data/extensions/api_test/proxy/individual/test.html5
-rw-r--r--chrome/test/data/extensions/api_test/proxy/individual_incognito_also/manifest.json1
-rw-r--r--chrome/test/data/extensions/api_test/proxy/individual_incognito_also/test.html5
-rw-r--r--chrome/test/data/extensions/api_test/proxy/individual_incognito_only/manifest.json1
-rw-r--r--chrome/test/data/extensions/api_test/proxy/individual_incognito_only/test.html5
-rw-r--r--chrome/test/data/extensions/api_test/proxy/individual_remove/manifest.json1
-rw-r--r--chrome/test/data/extensions/api_test/proxy/individual_remove/test.html5
-rw-r--r--chrome/test/data/extensions/api_test/proxy/pac/manifest.json1
-rw-r--r--chrome/test/data/extensions/api_test/proxy/pac/test.html5
-rw-r--r--chrome/test/data/extensions/api_test/proxy/pacdata/manifest.json1
-rw-r--r--chrome/test/data/extensions/api_test/proxy/pacdata/test.html5
-rw-r--r--chrome/test/data/extensions/api_test/proxy/single/manifest.json1
-rw-r--r--chrome/test/data/extensions/api_test/proxy/single/test.html5
-rw-r--r--chrome/test/data/extensions/api_test/proxy/system/manifest.json1
-rw-r--r--chrome/test/data/extensions/api_test/proxy/system/test.html5
63 files changed, 215 insertions, 1040 deletions
diff --git a/chrome/test/data/extensions/api_test/page_capture/background.html b/chrome/test/data/extensions/api_test/page_capture/background.html
index 46f4d74..3efb342 100644
--- a/chrome/test/data/extensions/api_test/page_capture/background.html
+++ b/chrome/test/data/extensions/api_test/page_capture/background.html
@@ -1 +1,6 @@
+<!--
+ * Copyright (c) 2011 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.
+-->
<script src="test.js"></script>
diff --git a/chrome/test/data/extensions/api_test/page_capture/google.html b/chrome/test/data/extensions/api_test/page_capture/google.html
index 3cb0e0e..7ebe7c9 100644
--- a/chrome/test/data/extensions/api_test/page_capture/google.html
+++ b/chrome/test/data/extensions/api_test/page_capture/google.html
@@ -1,3 +1,8 @@
+<!--
+ * Copyright (c) 2011 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.
+-->
<html>
<body>
<h1>Welcome to the Google</h1>
diff --git a/chrome/test/data/extensions/api_test/page_capture/manifest.json b/chrome/test/data/extensions/api_test/page_capture/manifest.json
index 7c6592f..0fa276f 100644
--- a/chrome/test/data/extensions/api_test/page_capture/manifest.json
+++ b/chrome/test/data/extensions/api_test/page_capture/manifest.json
@@ -1,6 +1,7 @@
{
"name": "chrome.extension.pageCapture",
"version": "0.1",
+ "manifest_version": 2,
"description": "Tests that the pageCapture extension API work.",
"background_page": "background.html",
"permissions": ["pageCapture", "tabs"]
diff --git a/chrome/test/data/extensions/api_test/permissions/always_allowed/background.html b/chrome/test/data/extensions/api_test/permissions/always_allowed/background.html
index 511ee69..ec9baec 100644
--- a/chrome/test/data/extensions/api_test/permissions/always_allowed/background.html
+++ b/chrome/test/data/extensions/api_test/permissions/always_allowed/background.html
@@ -1,35 +1,6 @@
-<script>
-// This tests whether we have permission to use individual functions, despite
-// not having asked for any permissions in the manifest.
-
-chrome.test.runTests([
-
- // Test the tabs API.
- function tabs() {
- try {
- chrome.tabs.create({url: "404_is_enough.html"}, function(tab1) {
- chrome.tabs.update(tab1.id, {url: "404_again.html"}, function(tab2) {
- chrome.tabs.onRemoved.addListener(function(tabId, removeInfo) {
- chrome.test.assertEq(tab1.id, tabId);
- chrome.test.succeed();
- });
- chrome.tabs.remove(tab1.id);
- });
- });
- } catch (e) {
- chrome.test.fail();
- }
- },
-
- // Negative test for the tabs API.
- function tabsNegative() {
- try {
- var tab = chrome.tabs.getSelected();
- chrome.test.fail();
- } catch (e) {
- chrome.test.succeed();
- }
- }
-
-]);
-</script>
+<!--
+ * Copyright (c) 2011 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.
+-->
+<script src="background.js"></script>
diff --git a/chrome/test/data/extensions/api_test/permissions/always_allowed/manifest.json b/chrome/test/data/extensions/api_test/permissions/always_allowed/manifest.json
index 28973c9..04fcabd 100644
--- a/chrome/test/data/extensions/api_test/permissions/always_allowed/manifest.json
+++ b/chrome/test/data/extensions/api_test/permissions/always_allowed/manifest.json
@@ -2,6 +2,7 @@
"name": "Test functions requiring no permission to use (apitest)",
"description": "permissions always allowed extension",
"version": "0.1",
+ "manifest_version": 2,
"background_page": "background.html",
"permissions": [ ]
}
diff --git a/chrome/test/data/extensions/api_test/permissions/disabled/background.html b/chrome/test/data/extensions/api_test/permissions/disabled/background.html
index 6975df3..5f84863 100644
--- a/chrome/test/data/extensions/api_test/permissions/disabled/background.html
+++ b/chrome/test/data/extensions/api_test/permissions/disabled/background.html
@@ -1,47 +1,6 @@
-<script>
-// All of the calls to chrome.* functions should fail, since this extension
-// has requested no permissions.
-
-chrome.test.runTests([
- function history() {
- try {
- var query = { 'text': '', 'maxResults': 1 };
- chrome.history.search(query, function(results) {
- chrome.test.fail();
- });
- } catch (e) {
- chrome.test.succeed();
- }
- },
-
- function bookmarks() {
- try {
- chrome.bookmarks.get("1", function(results) {
- chrome.test.fail();
- });
- } catch (e) {
- chrome.test.succeed();
- }
- },
-
- function tabs() {
- try {
- chrome.tabs.getSelected(null, function(results) {
- chrome.test.fail();
- });
- } catch (e) {
- chrome.test.succeed();
- }
- },
-
- function idle() {
- try {
- chrome.idle.queryState(60, function(state) {
- chrome.test.fail();
- });
- } catch (e) {
- chrome.test.succeed();
- }
- }
-]);
-</script>
+<!--
+ * Copyright (c) 2011 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.
+-->
+<script src="background.js"></script>
diff --git a/chrome/test/data/extensions/api_test/permissions/disabled/manifest.json b/chrome/test/data/extensions/api_test/permissions/disabled/manifest.json
index dff8194..a060b4f 100644
--- a/chrome/test/data/extensions/api_test/permissions/disabled/manifest.json
+++ b/chrome/test/data/extensions/api_test/permissions/disabled/manifest.json
@@ -2,6 +2,7 @@
"name": "permissions failure apitest",
"description": "permissions failure extension",
"version": "0.1",
+ "manifest_version": 2,
"background_page": "background.html",
"permissions": [ ]
}
diff --git a/chrome/test/data/extensions/api_test/permissions/enabled/background.html b/chrome/test/data/extensions/api_test/permissions/enabled/background.html
index 633600d..5f84863 100644
--- a/chrome/test/data/extensions/api_test/permissions/enabled/background.html
+++ b/chrome/test/data/extensions/api_test/permissions/enabled/background.html
@@ -1,47 +1,6 @@
-<script>
-// All of the calls to chrome.* functions should succeed, since this extension
-// has requested all required permissions.
-
-var pass = chrome.test.callbackPass;
-
-chrome.test.runTests([
- function experimental() {
- // Test that use of an experimental API works.
- // If/when chrome.experimental.processes is moved out of
- // experimental, this test needs to be updated.
- chrome.tabs.getSelected(null, function(tab) {
- try {
- chrome.experimental.processes.getProcessIdForTab(
- tab.id, pass(function(pid) {}));
- } catch (e) {
- chrome.test.fail();
- }
- });
- },
-
- function history() {
- try {
- var query = { 'text': '', 'maxResults': 1 };
- chrome.history.search(query, pass(function(results) {}));
- } catch (e) {
- chrome.test.fail();
- }
- },
-
- function bookmarks() {
- try {
- chrome.bookmarks.get("1", pass(function(results) {}));
- } catch (e) {
- chrome.test.fail();
- }
- },
-
- function tabs() {
- try {
- chrome.tabs.getSelected(null, pass(function(results) {}));
- } catch (e) {
- chrome.test.fail();
- }
- }
-]);
-</script>
+<!--
+ * Copyright (c) 2011 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.
+-->
+<script src="background.js"></script>
diff --git a/chrome/test/data/extensions/api_test/permissions/enabled/manifest.json b/chrome/test/data/extensions/api_test/permissions/enabled/manifest.json
index 57d547a..004d0ea 100644
--- a/chrome/test/data/extensions/api_test/permissions/enabled/manifest.json
+++ b/chrome/test/data/extensions/api_test/permissions/enabled/manifest.json
@@ -2,6 +2,7 @@
"name": "permissions success apitest",
"description": "permissions success extension",
"version": "0.1",
+ "manifest_version": 2,
"background_page": "background.html",
"permissions": [ "tabs", "bookmarks", "history", "experimental" ]
}
diff --git a/chrome/test/data/extensions/api_test/permissions/experimental_disabled/background.html b/chrome/test/data/extensions/api_test/permissions/experimental_disabled/background.html
index 4f27694..5f84863 100644
--- a/chrome/test/data/extensions/api_test/permissions/experimental_disabled/background.html
+++ b/chrome/test/data/extensions/api_test/permissions/experimental_disabled/background.html
@@ -1,19 +1,6 @@
-<script>
-// Calls to chrome.experimental.* functions should fail, since this extension
-// has not declared that permission.
-
-chrome.test.runTests([
- function experimental() {
- chrome.tabs.getSelected(null, function(tab) {
- try {
- chrome.experimental.processes.getProcessForTab(tab.id,
- function(process) {
- chrome.test.fail();
- });
- } catch (e) {
- chrome.test.succeed();
- }
- });
- }
-]);
-</script>
+<!--
+ * Copyright (c) 2011 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.
+-->
+<script src="background.js"></script>
diff --git a/chrome/test/data/extensions/api_test/permissions/experimental_disabled/manifest.json b/chrome/test/data/extensions/api_test/permissions/experimental_disabled/manifest.json
index 9c66614..b7a2a42 100644
--- a/chrome/test/data/extensions/api_test/permissions/experimental_disabled/manifest.json
+++ b/chrome/test/data/extensions/api_test/permissions/experimental_disabled/manifest.json
@@ -2,6 +2,7 @@
"name": "permissions failure apitest",
"description": "permissions failure extension",
"version": "0.1",
+ "manifest_version": 2,
"background_page": "background.html",
"permissions": [ "tabs" ]
}
diff --git a/chrome/test/data/extensions/api_test/permissions/favicon/manifest.json b/chrome/test/data/extensions/api_test/permissions/favicon/manifest.json
index 40e5806..c424c19 100644
--- a/chrome/test/data/extensions/api_test/permissions/favicon/manifest.json
+++ b/chrome/test/data/extensions/api_test/permissions/favicon/manifest.json
@@ -1,6 +1,7 @@
{
"name": "favicon test",
"version": "0.1",
+ "manifest_version": 2,
"description": "Tests that we can load favicon images.",
"background_page": "test.html",
"permissions": ["chrome://favicon/"]
diff --git a/chrome/test/data/extensions/api_test/permissions/favicon/test.html b/chrome/test/data/extensions/api_test/permissions/favicon/test.html
index fc98ccd8..3f0037b 100644
--- a/chrome/test/data/extensions/api_test/permissions/favicon/test.html
+++ b/chrome/test/data/extensions/api_test/permissions/favicon/test.html
@@ -1,27 +1,9 @@
<!DOCTYPE html>
+<!--
+ * Copyright (c) 2011 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.
+-->
<img id=favicon src="chrome://favicon/http://chromium.org">
<img id=theme src="chrome://theme/product_logo">
-<script>
-
-window.onload = function() {
-
- chrome.test.runTests([
- function favicon() {
- var img = document.getElementById('favicon');
- chrome.test.assertEq(16, img.naturalWidth);
- chrome.test.assertEq(16, img.naturalHeight);
- chrome.test.runNextTest();
- },
-
- function theme() {
- var img = document.getElementById('theme');
- chrome.test.assertEq(0, img.naturalWidth);
- chrome.test.assertEq(0, img.naturalHeight);
- chrome.test.runNextTest();
- }
- ]);
-
-}
-
-</script>
-
+<script src="test.js"></script>
diff --git a/chrome/test/data/extensions/api_test/permissions/nacl_enabled/background.html b/chrome/test/data/extensions/api_test/permissions/nacl_enabled/background.html
index a813fe8..663b024 100644
--- a/chrome/test/data/extensions/api_test/permissions/nacl_enabled/background.html
+++ b/chrome/test/data/extensions/api_test/permissions/nacl_enabled/background.html
@@ -1,33 +1,9 @@
-<script>
-// OnNaClLoad should be called and invoking a method
-// in a NaCl module should return a correct value.
-
-var pass = chrome.test.callbackPass;
-
-chrome.test.runTests([
- function nacl() {
- // Nothing to do here,
- // we call the callback when we get the notification from NaCl
- }
-]);
-
-function OnNaClLoad() {
- try {
- plugin = document.getElementById('pluginobj');
- result = plugin.helloworld();
- if ('hello, world.' != result) {
- chrome.test.fail();
- }
- } catch(e) {
- chrome.test.fail();
- }
- chrome.test.succeed();
-}
-
-function OnNaClFail() {
- chrome.test.fail();
-}
-</script>
+<!--
+ * Copyright (c) 2011 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.
+-->
+<script src="background.js"></script>
<h1>Native Client SRPC Simple Plug-in</h1>
<p>
diff --git a/chrome/test/data/extensions/api_test/permissions/nacl_enabled/manifest.json b/chrome/test/data/extensions/api_test/permissions/nacl_enabled/manifest.json
index 4c13c47..8b6498e 100644
--- a/chrome/test/data/extensions/api_test/permissions/nacl_enabled/manifest.json
+++ b/chrome/test/data/extensions/api_test/permissions/nacl_enabled/manifest.json
@@ -2,6 +2,7 @@
"name": "nacl permission enabled apitest",
"description": "nacl permission enabled extension",
"version": "0.1",
+ "manifest_version": 2,
"background_page": "background.html",
"permissions": [ "experimental" ]
}
diff --git a/chrome/test/data/extensions/api_test/permissions/optional/background.html b/chrome/test/data/extensions/api_test/permissions/optional/background.html
index cd1d602..ec9baec 100644
--- a/chrome/test/data/extensions/api_test/permissions/optional/background.html
+++ b/chrome/test/data/extensions/api_test/permissions/optional/background.html
@@ -1,313 +1,6 @@
-<script>
-
-var assertEq = chrome.test.assertEq;
-var assertFalse = chrome.test.assertFalse;
-var assertTrue = chrome.test.assertTrue;
-var fail = chrome.test.callbackFail;
-var pass = chrome.test.callbackPass;
-var listenOnce = chrome.test.listenOnce;
-
-var NOT_OPTIONAL_ERROR =
- "Optional permissions must be listed in extension manifest.";
-
-var NO_TABS_PERMISSION =
- "You do not have permission to use 'windows.getAll'.";
-
-var REQUIRED_ERROR =
- "You cannot remove required permissions.";
-
-var NOT_WHITE_LISTED_ERROR =
- "The optional permissions API does not support '*'.";
-
-var UNKNOWN_PERMISSIONS_ERROR =
- "'*' is not a recognized permission.";
-
-var emptyPermissions = {permissions: [], origins: []};
-
-var initialPermissions = {
- permissions: ['management'],
- origins: ['http://a.com/*']
-};
-
-var permissionsWithTabs = {
- permissions: ['management', 'tabs'],
- origins: ['http://a.com/*']
-}
-
-var permissionsWithOrigin = {
- permissions: ['management'],
- origins: ['http://a.com/*', 'http://*.c.com/*']
-}
-
-function checkEqualSets(set1, set2) {
- if (set1.length != set2.length)
- return false;
-
- for (var x = 0; x < set1.length; x++) {
- if (!set2.some(function(v) { return v == set1[x]; }))
- return false;
- }
-
- return true;
-}
-
-function checkPermSetsEq(set1, set2) {
- return checkEqualSets(set1.permissions, set2.permissions) &&
- checkEqualSets(set1.origins, set2.origins);
-}
-
-chrome.test.getConfig(function(config) {
-
- function doReq(domain, callback) {
- var req = new XMLHttpRequest();
- var url = domain + ":PORT/files/extensions/test_file.txt";
- url = url.replace(/PORT/, config.testServer.port);
-
- chrome.test.log("Requesting url: " + url);
- req.open("GET", url, true);
-
- req.onload = function() {
- assertEq(200, req.status);
- assertEq("Hello!", req.responseText);
- callback(true);
- };
-
- req.onerror = function() {
- chrome.test.log("status: " + req.status);
- chrome.test.log("text: " + req.responseText);
- callback(false);
- };
-
- req.send(null);
- }
-
- chrome.test.runTests([
- function contains() {
- chrome.permissions.contains(
- {permissions: ['management'], origins: ['http://a.com/*']},
- pass(function(result) { assertTrue(result); }));
- chrome.permissions.contains(
- {permissions: ['devtools'], origins: ['http://a.com/*']},
- pass(function(result) { assertFalse(result); }));
- chrome.permissions.contains(
- {permissions: ['management']},
- pass(function(result) { assertTrue(result); }));
- chrome.permissions.contains(
- {permissions: ['management']},
- pass(function(result) { assertTrue(result); }));
- },
-
- function getAll() {
- chrome.permissions.getAll(pass(function(permissions) {
- assertTrue(checkPermSetsEq(initialPermissions, permissions));
- }));
- },
-
- // Nothing should happen if we request permission we already have
- function requestNoOp() {
- chrome.permissions.request(
- {permissions:['management'], origins:['http://a.com/*']},
- pass(function(granted) { assertTrue(granted); }));
- },
-
- // We should get an error when requesting permissions that haven't been
- // defined in "optional_permissions".
- function requestNonOptional() {
- chrome.permissions.request(
- {permissions: ['debugger']}, fail(NOT_OPTIONAL_ERROR));
- chrome.permissions.request(
- {origins: ['http://*.b.com/*']}, fail(NOT_OPTIONAL_ERROR));
- chrome.permissions.request(
- {permissions: ['tabs'], origins: ['http://*.b.com/*']},
- fail(NOT_OPTIONAL_ERROR));
- },
-
- // We should be able to request the tabs API since it's in the granted
- // permissions list (see permissions_apitest.cc).
- function requestTabs() {
- try {
- chrome.windows.getAll({populate: true}, function() {
- chrome.test.fail("Should not have tabs API permission.");
- });
- } catch (e) {
- assertTrue(e.message.indexOf(NO_TABS_PERMISSION) == 0);
- }
- listenOnce(chrome.permissions.onAdded,
- function(permissions) {
- assertTrue(permissions.permissions.length == 1);
- assertTrue(permissions.permissions[0] == 'tabs');
- });
- chrome.permissions.request(
- {permissions:['tabs']},
- pass(function(granted) {
- assertTrue(granted);
- chrome.windows.getAll({populate: true}, pass(function(windows) {
- assertTrue(true);
- }));
- chrome.permissions.getAll(pass(function(permissions) {
- assertTrue(checkPermSetsEq(permissionsWithTabs, permissions));
- }));
- }));
- },
-
- // You can't remove required permissions.
- function removeRequired() {
- chrome.permissions.remove(
- {permissions: ['management']}, fail(REQUIRED_ERROR));
- chrome.permissions.remove(
- {origins: ['http://a.com/*']}, fail(REQUIRED_ERROR));
- chrome.permissions.remove(
- {permissions: ['tabs'], origins: ['http://a.com/*']},
- fail(REQUIRED_ERROR));
- },
-
- // You can remove permissions you don't have (nothing happens).
- function removeNoOp() {
- chrome.permissions.remove(
- {permissions:['background']},
- pass(function(removed) { assertTrue(removed); }));
- chrome.permissions.remove(
- {origins:['http://*.c.com/*']},
- pass(function(removed) { assertTrue(removed); }));
- chrome.permissions.remove(
- {permissions:['background'], origins:['http://*.c.com/*']},
- pass(function(removed) { assertTrue(removed); }));
- },
-
- function removeTabs() {
- chrome.windows.getAll({populate: true}, pass(function(windows) {
- assertTrue(true);
- }));
- listenOnce(chrome.permissions.onRemoved,
- function(permissions) {
- assertTrue(permissions.permissions.length == 1);
- assertTrue(permissions.permissions[0] == 'tabs');
- });
- chrome.permissions.remove(
- {permissions:['tabs']},
- pass(function() {
- chrome.permissions.getAll(pass(function(permissions) {
- assertTrue(checkPermSetsEq(initialPermissions, permissions));
- }));
- try {
- chrome.windows.getAll({populate: true}, function() {
- chrome.test.fail("Should not have tabs API permission.");
- });
- } catch (e) {
- assertTrue(e.message.indexOf(NO_TABS_PERMISSION) == 0);
- }
- }));
- },
-
- // The user shouldn't have to approve permissions that have no warnings.
- function noPromptForNoWarnings() {
- chrome.permissions.request(
- {permissions: ['notifications']},
- pass(function(granted) {
- assertTrue(granted);
-
- // Remove the notifications permission to return to normal.
- chrome.permissions.remove(
- {permissions: ['notifications']},
- pass(function(removed) { assertTrue(removed); }));
- }));
- },
-
- // Make sure you can only access the white listed permissions.
- function whitelist() {
- var error_msg = NOT_WHITE_LISTED_ERROR.replace('*', 'chromeAuthPrivate');
- chrome.permissions.request(
- {permissions: ['chromeAuthPrivate']}, fail(error_msg));
- chrome.permissions.remove(
- {permissions: ['chromeAuthPrivate']}, fail(error_msg));
- },
-
- function unknownPermission() {
- var error_msg = UNKNOWN_PERMISSIONS_ERROR.replace('*', 'asdf');
- chrome.permissions.request(
- {permissions: ['asdf']}, fail(error_msg));
- },
-
- function requestOrigin() {
- doReq('http://c.com', pass(function(success) { assertFalse(success); }));
-
- chrome.permissions.getAll(pass(function(permissions) {
- assertTrue(checkPermSetsEq(initialPermissions, permissions));
- }));
-
- listenOnce(chrome.permissions.onAdded,
- function(permissions) {
- assertTrue(permissions.permissions.length == 0);
- assertTrue(permissions.origins.length == 1);
- assertTrue(permissions.origins[0] == 'http://*.c.com/*');
- });
- chrome.permissions.request(
- {origins: ['http://*.c.com/*']},
- pass(function(granted) {
- assertTrue(granted);
- chrome.permissions.getAll(pass(function(permissions) {
- assertTrue(checkPermSetsEq(permissionsWithOrigin, permissions));
- }));
- chrome.permissions.contains(
- {origins:['http://*.c.com/*']},
- pass(function(result) { assertTrue(result); }));
- doReq('http://c.com', pass(function(result) { assertTrue(result); }));
- }));
- },
-
- function removeOrigin() {
- doReq('http://c.com', pass(function(result) { assertTrue(result); }));
-
- listenOnce(chrome.permissions.onRemoved,
- function(permissions) {
- assertTrue(permissions.permissions.length == 0);
- assertTrue(permissions.origins.length == 1);
- assertTrue(permissions.origins[0] == 'http://*.c.com/*');
- });
- chrome.permissions.remove(
- {origins: ['http://*.c.com/*']},
- pass(function(removed) {
- assertTrue(removed);
- chrome.permissions.getAll(pass(function(permissions) {
- assertTrue(checkPermSetsEq(initialPermissions, permissions));
- }));
- chrome.permissions.contains(
- {origins:['http://*.c.com/*']},
- pass(function(result) { assertFalse(result); }));
- doReq('http://c.com', pass(function(result) { assertFalse(result); }));
- }));
- },
-
- // Tests that the changed permissions have taken effect from inside the
- // onAdded and onRemoved event listeners.
- function eventListenerPermissions() {
- listenOnce(chrome.permissions.onAdded,
- function(permissions) {
- chrome.windows.getAll({populate: true}, pass(function() {
- assertTrue(true);
- }));
- });
- listenOnce(chrome.permissions.onRemoved,
- function(permissions) {
- try {
- chrome.windows.getAll({populate: true}, function() {
- chrome.test.fail("Should not have tabs API permission.");
- });
- } catch (e) {
- assertTrue(e.message.indexOf(NO_TABS_PERMISSION) == 0);
- }
- });
-
- chrome.permissions.request(
- {permissions: ['tabs']}, pass(function(granted) {
- assertTrue(granted);
- chrome.permissions.remove(
- {permissions: ['tabs']}, pass(function() {
- assertTrue(true);
- }));
- }));
- }
-
- ]);
-});
-</script>
+<!--
+ * Copyright (c) 2011 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.
+-->
+<script src="background.js"></script>
diff --git a/chrome/test/data/extensions/api_test/permissions/optional/manifest.json b/chrome/test/data/extensions/api_test/permissions/optional/manifest.json
index aa3e83a..a5033f2 100644
--- a/chrome/test/data/extensions/api_test/permissions/optional/manifest.json
+++ b/chrome/test/data/extensions/api_test/permissions/optional/manifest.json
@@ -3,6 +3,7 @@
"description": "permissions/optional",
"key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDkprt3BRSqoikAhSygI6VUzDLt18cKODYmkaa/dwPp4dboyz93RSB+v76grbqsNWrJjkrEwRD3QFeBYBq7h27XAMV4X5XvWjmWQBkRTBQyQI8cZd7M9dgfKrI3EqX9OJvd/wTJkC0dgF47nwWRa/Tvwl7Y66GwEEUjpn2MTv4klwIDAQAB",
"version": "0.1",
+ "manifest_version": 2,
"background_page": "background.html",
"permissions": [
"management",
diff --git a/chrome/test/data/extensions/api_test/permissions/optional_deny/background.html b/chrome/test/data/extensions/api_test/permissions/optional_deny/background.html
index c9ea307..ec9baec 100644
--- a/chrome/test/data/extensions/api_test/permissions/optional_deny/background.html
+++ b/chrome/test/data/extensions/api_test/permissions/optional_deny/background.html
@@ -1,64 +1,6 @@
-<script>
-
-var assertFalse = chrome.test.assertFalse;
-var assertTrue = chrome.test.assertTrue;
-var pass = chrome.test.callbackPass;
-
-var NO_TABS_PERMISSION =
- "You do not have permission to use 'windows.getAll'.";
-
-chrome.test.getConfig(function(config) {
-
- function doReq(domain, callback) {
- var req = new XMLHttpRequest();
- var url = domain + ":PORT/files/extensions/test_file.txt";
- url = url.replace(/PORT/, config.testServer.port);
-
- chrome.test.log("Requesting url: " + url);
- req.open("GET", url, true);
-
- req.onload = function() {
- assertEq(200, req.status);
- assertEq("Hello!", req.responseText);
- callback(true);
- };
-
- req.onerror = function() {
- chrome.test.log("status: " + req.status);
- chrome.test.log("text: " + req.responseText);
- callback(false);
- };
-
- req.send(null);
- }
-
- chrome.test.runTests([
- function denyRequest() {
- chrome.permissions.request(
- {permissions: ['tabs'], origins: ['http://*.c.com/*']},
- pass(function(granted) {
- // They were not granted, and there should be no error.
- assertFalse(granted);
- assertTrue(chrome.extension.lastError === undefined);
-
- // Make sure they weren't granted...
- chrome.permissions.contains(
- {permissions: ['tabs'], origins:['http://*.c.com/*']},
- pass(function(result) { assertFalse(result); }));
-
- try {
- chrome.windows.getAll({populate: true}, function() {
- chrome.test.fail("Should not have tabs API permission.");
- });
- } catch (e) {
- assertTrue(e.message.indexOf(NO_TABS_PERMISSION) == 0);
- }
-
- doReq('http://b.c.com/', pass(function(result) {
- assertFalse(result);
- }));
- }));
- }
- ]);
-});
-</script>
+<!--
+ * Copyright (c) 2011 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.
+-->
+<script src="background.js"></script>
diff --git a/chrome/test/data/extensions/api_test/permissions/optional_deny/manifest.json b/chrome/test/data/extensions/api_test/permissions/optional_deny/manifest.json
index 4a856e5..3f8219c 100644
--- a/chrome/test/data/extensions/api_test/permissions/optional_deny/manifest.json
+++ b/chrome/test/data/extensions/api_test/permissions/optional_deny/manifest.json
@@ -2,6 +2,7 @@
"name": "permissions/optional_deny",
"description": "permissions/optional_deny",
"version": "0.1",
+ "manifest_version": 2,
"background_page": "background.html",
"permissions": ["http://a.com/*"],
"optional_permissions": ["tabs", "management", "http://*.c.com/*"]
diff --git a/chrome/test/data/extensions/api_test/permissions/optional_gesture/background.html b/chrome/test/data/extensions/api_test/permissions/optional_gesture/background.html
index 63bb44e4..ec9baec 100644
--- a/chrome/test/data/extensions/api_test/permissions/optional_gesture/background.html
+++ b/chrome/test/data/extensions/api_test/permissions/optional_gesture/background.html
@@ -1,17 +1,6 @@
-<script>
-
-var fail = chrome.test.callbackFail;
-
-var GESTURE_ERROR = "This function must be called during a user gesture";
-
-chrome.test.getConfig(function(config) {
- chrome.test.runTests([
- function testGesture() {
- chrome.permissions.request(
- {permissions: ['tabs']},
- fail(GESTURE_ERROR));
- }
- ]);
-});
-
-</script>
+<!--
+ * Copyright (c) 2011 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.
+-->
+<script src="background.js"></script>
diff --git a/chrome/test/data/extensions/api_test/permissions/optional_gesture/manifest.json b/chrome/test/data/extensions/api_test/permissions/optional_gesture/manifest.json
index 61db297..8b226be 100644
--- a/chrome/test/data/extensions/api_test/permissions/optional_gesture/manifest.json
+++ b/chrome/test/data/extensions/api_test/permissions/optional_gesture/manifest.json
@@ -2,6 +2,7 @@
"name": "permissions/optional_gesture",
"description": "permissions/optional_gesture",
"version": "0.1",
+ "manifest_version": 2,
"background_page": "background.html",
"permissions": ["permissions"],
"optional_permissions": ["tabs"]
diff --git a/chrome/test/data/extensions/api_test/preference/clear/manifest.json b/chrome/test/data/extensions/api_test/preference/clear/manifest.json
index 3c21c04..958ae06 100644
--- a/chrome/test/data/extensions/api_test/preference/clear/manifest.json
+++ b/chrome/test/data/extensions/api_test/preference/clear/manifest.json
@@ -1,6 +1,7 @@
{
"name" : "Preferences API Test Extension (clear)",
"version" : "0.1",
+ "manifest_version": 2,
"description" : "Preferences API Test Extension (clear)",
"permissions": [ "experimental", "privacy" ],
"background_page": "test.html"
diff --git a/chrome/test/data/extensions/api_test/preference/clear/test.html b/chrome/test/data/extensions/api_test/preference/clear/test.html
index 6e97d10..3efb342 100644
--- a/chrome/test/data/extensions/api_test/preference/clear/test.html
+++ b/chrome/test/data/extensions/api_test/preference/clear/test.html
@@ -1,40 +1,6 @@
-<script>
-// Content settings API test
-// Run with browser_tests --gtest_filter=ExtensionApiTest.PreferenceClear
-
-var pw = chrome.experimental.privacy.websites;
-chrome.test.runTests([
- function getThirdPartyCookiesAllowed() {
- pw.thirdPartyCookiesAllowed.get({}, chrome.test.callbackPass(
- function(allowed) {
- chrome.test.assertEq(
- allowed,
- {
- 'value': false,
- 'levelOfControl': "controllable_by_this_extension"
- },
- "third-party cookies should be blocked");
- }));
- },
- function setThirdPartyCookiesAllowed() {
- pw.thirdPartyCookiesAllowed.set(
- {'value': true},
- chrome.test.callbackPass());
- },
- function clearThirdPartyCookiesAllowed() {
- pw.thirdPartyCookiesAllowed.clear({}, chrome.test.callbackPass());
- },
- function getThirdPartyCookiesAllowed2() {
- pw.thirdPartyCookiesAllowed.get({}, chrome.test.callbackPass(
- function(allowed) {
- chrome.test.assertEq(
- allowed,
- {
- 'value': false,
- 'levelOfControl': "controllable_by_this_extension"
- },
- "third-party cookies should be blocked");
- }));
- }
-]);
-</script>
+<!--
+ * Copyright (c) 2011 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.
+-->
+<script src="test.js"></script>
diff --git a/chrome/test/data/extensions/api_test/preference/onchange/manifest.json b/chrome/test/data/extensions/api_test/preference/onchange/manifest.json
index 2f79815..e9c28c4 100644
--- a/chrome/test/data/extensions/api_test/preference/onchange/manifest.json
+++ b/chrome/test/data/extensions/api_test/preference/onchange/manifest.json
@@ -1,6 +1,7 @@
{
"name" : "Preferences API Test Extension (Events)",
"version" : "0.1",
+ "manifest_version": 2,
"description" : "Preferences API Test Extension (Events)",
"permissions": [ "experimental", "privacy" ],
"background_page": "test.html"
diff --git a/chrome/test/data/extensions/api_test/preference/onchange/test.html b/chrome/test/data/extensions/api_test/preference/onchange/test.html
index 85fa8ab..3efb342 100644
--- a/chrome/test/data/extensions/api_test/preference/onchange/test.html
+++ b/chrome/test/data/extensions/api_test/preference/onchange/test.html
@@ -1,95 +1,6 @@
-<script>
-// Content settings API test
-// Run with browser_tests --gtest_filter=ExtensionApiTest.PreferenceOnChange
-
-// Listen until |event| has fired with all of the values in |expected|.
-function listenUntil(event, expected) {
- var done = chrome.test.listenForever(event, function(value) {
- for (var i = 0; i < expected.length; i++) {
- if (chrome.test.checkDeepEq(expected[i], value)) {
- expected.splice(i, 1);
- if (expected.length == 0)
- done();
- return;
- }
- }
- chrome.test.fail("Unexpected event: " + JSON.stringify(value));
- });
-}
-
-var pw = chrome.experimental.privacy.websites;
-chrome.test.runTests([
- function changeDefault() {
- // Changing the regular settings when no incognito-specific settings are
- // defined should fire two events.
- listenUntil(pw.thirdPartyCookiesAllowed.onChange, [{
- 'value': false,
- 'levelOfControl': 'controlled_by_this_extension'
- },
- {
- 'value': false,
- 'incognitoSpecific': false,
- 'levelOfControl': 'controlled_by_this_extension'
- }]);
- pw.thirdPartyCookiesAllowed.set({
- 'value':false
- }, chrome.test.callbackPass());
- },
- function changeIncognitoOnly() {
- listenUntil(pw.thirdPartyCookiesAllowed.onChange, [{
- 'value': true,
- 'incognitoSpecific': true,
- 'levelOfControl': 'controlled_by_this_extension'
- }]);
- pw.thirdPartyCookiesAllowed.set({
- 'value': true,
- 'scope': 'incognito_persistent'
- }, chrome.test.callbackPass());
- },
- function changeDefaultOnly() {
- listenUntil(pw.thirdPartyCookiesAllowed.onChange, [{
- 'value': true,
- 'levelOfControl': 'controlled_by_this_extension'
- }]);
- pw.thirdPartyCookiesAllowed.set({
- 'value': true
- }, chrome.test.callbackPass());
- },
- function changeIncognitoOnlyBack() {
- // Change the incognito setting back to false so that we get an event when
- // clearing the value.
- listenUntil(pw.thirdPartyCookiesAllowed.onChange, [{
- 'value': false,
- 'incognitoSpecific': true,
- 'levelOfControl': 'controlled_by_this_extension'
- }]);
- pw.thirdPartyCookiesAllowed.set({
- 'value': false,
- 'scope': 'incognito_persistent'
- }, chrome.test.callbackPass());
- },
- function clearIncognito() {
- listenUntil(pw.thirdPartyCookiesAllowed.onChange, [{
- 'value': true,
- 'incognitoSpecific': false,
- 'levelOfControl': 'controlled_by_this_extension'
- }]);
- pw.thirdPartyCookiesAllowed.clear({
- 'scope': 'incognito_persistent'
- }, chrome.test.callbackPass());
- },
- function clearDefault() {
- listenUntil(pw.thirdPartyCookiesAllowed.onChange, [{
- 'value': true,
- 'levelOfControl': 'controllable_by_this_extension'
- },
- {
- 'value': true,
- 'incognitoSpecific': false,
- 'levelOfControl': 'controllable_by_this_extension'
- }]);
- pw.thirdPartyCookiesAllowed.clear({}, chrome.test.callbackPass());
- }
-]);
-
-</script>
+<!--
+ * Copyright (c) 2011 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.
+-->
+<script src="test.js"></script>
diff --git a/chrome/test/data/extensions/api_test/preference/persistent_incognito/manifest.json b/chrome/test/data/extensions/api_test/preference/persistent_incognito/manifest.json
index 98d4ada..206134a 100644
--- a/chrome/test/data/extensions/api_test/preference/persistent_incognito/manifest.json
+++ b/chrome/test/data/extensions/api_test/preference/persistent_incognito/manifest.json
@@ -1,6 +1,7 @@
{
"name" : "Preference API Test Extension (Incognito)",
"version" : "0.1",
+ "manifest_version": 2,
"description" : "Preference API Test Extension (Incognito)",
"permissions": [ "experimental", "privacy" ],
"background_page": "test.html"
diff --git a/chrome/test/data/extensions/api_test/preference/persistent_incognito/test.html b/chrome/test/data/extensions/api_test/preference/persistent_incognito/test.html
index d589d5fe..3efb342 100644
--- a/chrome/test/data/extensions/api_test/preference/persistent_incognito/test.html
+++ b/chrome/test/data/extensions/api_test/preference/persistent_incognito/test.html
@@ -1,49 +1,6 @@
-<script>
-// Content settings API test
-// Run with browser_tests --gtest_filter=ExtensionApiTest.PreferencePersistentIncognito
-
-var pw = chrome.experimental.privacy.websites;
-function expect(expected, message) {
- return chrome.test.callbackPass(function(value) {
- chrome.test.assertNoLastError();
- chrome.test.assertEq(expected, value, message);
- });
-}
-chrome.test.runTests([
- function getRegular() {
- pw.thirdPartyCookiesAllowed.get(
- {},
- expect({ 'value': true,
- 'levelOfControl': "controllable_by_this_extension" },
- "third-party cookies should not be blocked"));
- },
- function getIncognito() {
- pw.thirdPartyCookiesAllowed.get(
- { 'incognito': true },
- expect({ 'value': true,
- 'incognitoSpecific': false,
- 'levelOfControl': "controllable_by_this_extension" },
- "third-party cookies should not be blocked in incognito mode"));
- },
- function set() {
- pw.thirdPartyCookiesAllowed.set(
- { 'scope': 'incognito_persistent', 'value': false },
- chrome.test.callbackPass());
- },
- function getRegular2() {
- pw.thirdPartyCookiesAllowed.get(
- {},
- expect({ 'value': true,
- 'levelOfControl': "controllable_by_this_extension" },
- "third-party cookies should not be blocked"));
- },
- function getIncognito2() {
- pw.thirdPartyCookiesAllowed.get(
- { 'incognito': true },
- expect({ 'value': false,
- 'incognitoSpecific': true,
- 'levelOfControl': "controlled_by_this_extension" },
- "third-party cookies should be blocked in incognito mode"));
- },
-]);
-</script>
+<!--
+ * Copyright (c) 2011 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.
+-->
+<script src="test.js"></script>
diff --git a/chrome/test/data/extensions/api_test/preference/session_only_incognito/manifest.json b/chrome/test/data/extensions/api_test/preference/session_only_incognito/manifest.json
index d7bbc0d..2e0f486 100644
--- a/chrome/test/data/extensions/api_test/preference/session_only_incognito/manifest.json
+++ b/chrome/test/data/extensions/api_test/preference/session_only_incognito/manifest.json
@@ -1,6 +1,7 @@
{
"name" : "Preference API Test Extension (Session-only Incognito)",
"version" : "0.1",
+ "manifest_version": 2,
"description" : "Preference API Test Extension (Session-only Incognito)",
"permissions": [ "experimental", "privacy", "tabs" ],
"background_page": "test.html"
diff --git a/chrome/test/data/extensions/api_test/preference/session_only_incognito/test.html b/chrome/test/data/extensions/api_test/preference/session_only_incognito/test.html
index f41693b..3efb342 100644
--- a/chrome/test/data/extensions/api_test/preference/session_only_incognito/test.html
+++ b/chrome/test/data/extensions/api_test/preference/session_only_incognito/test.html
@@ -1,82 +1,6 @@
-<script>
-// Content settings API test
-// Run with browser_tests --gtest_filter=ExtensionApiTest.PreferenceSessionOnlyIncognito
-
-var pw = chrome.experimental.privacy.websites;
-function expect(expected, message) {
- return chrome.test.callbackPass(function(value) {
- chrome.test.assertNoLastError();
- chrome.test.assertEq(expected, value, message);
- });
-}
-chrome.test.runTests([
- function getRegular() {
- pw.thirdPartyCookiesAllowed.get(
- {},
- expect({ 'value': true,
- 'levelOfControl': "controllable_by_this_extension" },
- "third-party cookies should not be blocked"));
- },
- function getIncognito() {
- pw.thirdPartyCookiesAllowed.get(
- { 'incognito': true },
- expect({ 'value': true,
- 'incognitoSpecific': false,
- 'levelOfControl': "controllable_by_this_extension" },
- "third-party cookies should not be blocked in incognito mode"));
- },
- function set() {
- pw.thirdPartyCookiesAllowed.set(
- { 'scope': 'incognito_persistent', 'value': false },
- chrome.test.callbackPass());
- },
- function getRegular2() {
- pw.thirdPartyCookiesAllowed.get(
- {},
- expect({ 'value': true,
- 'levelOfControl': "controllable_by_this_extension" },
- "third-party cookies should not be blocked"));
- },
- function getIncognito2() {
- pw.thirdPartyCookiesAllowed.get(
- { 'incognito': true },
- expect({ 'value': false,
- 'incognitoSpecific': true,
- 'levelOfControl': "controlled_by_this_extension" },
- "third-party cookies should be blocked in incognito mode"));
- },
- // We cannot set session_only_persistent preferences if there is no incognito
- // session.
- function set2() {
- pw.thirdPartyCookiesAllowed.set(
- { 'scope': 'incognito_session_only', 'value': true },
- chrome.test.callbackFail("You cannot set a preference with scope " +
- "'incognito_session_only' when no incognito " +
- "window is open."));
- },
- function openIncognito() {
- chrome.windows.create({incognito: true}, chrome.test.callbackPass());
- },
- // session_only_persistent overrides incognito_persistent.
- function set3() {
- pw.thirdPartyCookiesAllowed.set(
- { 'scope': 'incognito_session_only', 'value': true },
- chrome.test.callbackPass());
- },
- function getRegular3() {
- pw.thirdPartyCookiesAllowed.get(
- {},
- expect({ 'value': true,
- 'levelOfControl': "controllable_by_this_extension" },
- "third-party cookies should not be blocked"));
- },
- function getIncognito3() {
- pw.thirdPartyCookiesAllowed.get(
- { 'incognito': true },
- expect({ 'value': true,
- 'incognitoSpecific': true,
- 'levelOfControl': "controlled_by_this_extension" },
- "third-party cookies should be blocked in incognito mode"));
- },
-]);
-</script>
+<!--
+ * Copyright (c) 2011 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.
+-->
+<script src="test.js"></script>
diff --git a/chrome/test/data/extensions/api_test/preference/standard/manifest.json b/chrome/test/data/extensions/api_test/preference/standard/manifest.json
index 201f046..23f4bff 100644
--- a/chrome/test/data/extensions/api_test/preference/standard/manifest.json
+++ b/chrome/test/data/extensions/api_test/preference/standard/manifest.json
@@ -1,6 +1,7 @@
{
"name" : "Preferences API Test Extension",
"version" : "0.1",
+ "manifest_version": 2,
"description" : "Preferences API Test Extension",
"permissions": [ "experimental", "privacy" ],
"background_page": "test.html"
diff --git a/chrome/test/data/extensions/api_test/preference/standard/test.html b/chrome/test/data/extensions/api_test/preference/standard/test.html
index 9586441..3efb342 100644
--- a/chrome/test/data/extensions/api_test/preference/standard/test.html
+++ b/chrome/test/data/extensions/api_test/preference/standard/test.html
@@ -1,69 +1,6 @@
-<script>
-// Preferences API test
-// Run with browser_tests --gtest_filter=ExtensionApiTest.PreferenceApi
-
-var preferences_to_test = [
- {
- root: chrome.experimental.privacy.network,
- preferences: [
- 'networkPredictionEnabled'
- ]
- },
- {
- root: chrome.experimental.privacy.websites,
- preferences: [
- 'thirdPartyCookiesAllowed',
- 'hyperlinkAuditingEnabled',
- 'referrersEnabled'
- ]
- },
- {
- root: chrome.experimental.privacy.services,
- preferences: [
- 'alternateErrorPagesEnabled',
- 'autofillEnabled',
- 'instantEnabled',
- // TODO(mkwst): 'metricsReportingEnabled',
- 'safeBrowsingEnabled',
- 'searchSuggestEnabled',
- 'translationServiceEnabled'
- ]
- },
-];
-
-function expect(expected, message) {
- return chrome.test.callbackPass(function(value) {
- chrome.test.assertEq(expected, value, message);
- });
-}
-
-function expectFalse(pref) {
- return expect({
- value: false,
- levelOfControl: 'controllable_by_this_extension'
- }, '`' + pref + '` is expected to be false.');
-}
-
-function prefGetter(pref) {
- this[pref].get({}, expectFalse(pref));
-}
-
-function prefSetter(pref) {
- this[pref].set({value: true}, chrome.test.callbackPass());
-}
-
-chrome.test.runTests([
- function getPreferences() {
- for (var i = 0; i < preferences_to_test.length; i++) {
- preferences_to_test[i].preferences.forEach(
- prefGetter.bind(preferences_to_test[i].root));
- }
- },
- function setGlobals() {
- for (var i = 0; i < preferences_to_test.length; i++) {
- preferences_to_test[i].preferences.forEach(
- prefSetter.bind(preferences_to_test[i].root));
- }
- }
-]);
-</script>
+<!--
+ * Copyright (c) 2011 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.
+-->
+<script src="test.js"></script>
diff --git a/chrome/test/data/extensions/api_test/processes/api/a.html b/chrome/test/data/extensions/api_test/processes/api/a.html
index dcd442e..492f182 100644
--- a/chrome/test/data/extensions/api_test/processes/api/a.html
+++ b/chrome/test/data/extensions/api_test/processes/api/a.html
@@ -1,3 +1,8 @@
+<!--
+ * Copyright (c) 2011 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.
+-->
<html>
<body>
<h1>A</h1>
diff --git a/chrome/test/data/extensions/api_test/processes/api/b.html b/chrome/test/data/extensions/api_test/processes/api/b.html
index 7bff50a..64b7065 100644
--- a/chrome/test/data/extensions/api_test/processes/api/b.html
+++ b/chrome/test/data/extensions/api_test/processes/api/b.html
@@ -1,3 +1,8 @@
+<!--
+ * Copyright (c) 2011 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.
+-->
<html>
<body>
<h1>B</h1>
diff --git a/chrome/test/data/extensions/api_test/processes/api/manifest.json b/chrome/test/data/extensions/api_test/processes/api/manifest.json
index 44fcdfb..d2436d5 100644
--- a/chrome/test/data/extensions/api_test/processes/api/manifest.json
+++ b/chrome/test/data/extensions/api_test/processes/api/manifest.json
@@ -1,6 +1,7 @@
{
"name": "chrome.experimental.processes",
"version": "0.1",
+ "manifest_version": 2,
"description": "end-to-end browser test for chrome.experimental.processes API",
"background_page": "test.html",
"permissions": ["experimental", "tabs"]
diff --git a/chrome/test/data/extensions/api_test/processes/api/test.html b/chrome/test/data/extensions/api_test/processes/api/test.html
index 46f4d74..3efb342 100644
--- a/chrome/test/data/extensions/api_test/processes/api/test.html
+++ b/chrome/test/data/extensions/api_test/processes/api/test.html
@@ -1 +1,6 @@
+<!--
+ * Copyright (c) 2011 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.
+-->
<script src="test.js"></script>
diff --git a/chrome/test/data/extensions/api_test/processes/api/test.js b/chrome/test/data/extensions/api_test/processes/api/test.js
index be15c8f..de62d40 100644
--- a/chrome/test/data/extensions/api_test/processes/api/test.js
+++ b/chrome/test/data/extensions/api_test/processes/api/test.js
@@ -1,3 +1,7 @@
+// Copyright (c) 2011 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.
+
// Processes API test for Chrome.
// browser_tests.exe --gtest_filter=ExtensionApiTest.Processes
diff --git a/chrome/test/data/extensions/api_test/processes/onupdated/background.html b/chrome/test/data/extensions/api_test/processes/onupdated/background.html
index 6dd1fd2..ec9baec 100644
--- a/chrome/test/data/extensions/api_test/processes/onupdated/background.html
+++ b/chrome/test/data/extensions/api_test/processes/onupdated/background.html
@@ -1,15 +1,6 @@
-<script>
-// Add a simple listener to onUpdated to ensure it does not conflict with the
-// task manager.
-chrome.experimental.processes.onUpdated.addListener(function(processes) {
- console.log("Received update.");
-});
-
-// Add a second listener to onUpdated to ensure the task manager only hears
-// about one extension listener per process.
-chrome.experimental.processes.onUpdated.addListener(function(processes) {
- console.log("Second listener received update.");
-});
-
-chrome.test.sendMessage("ready");
-</script>
+<!--
+ * Copyright (c) 2011 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.
+-->
+<script src="background.js"></script>
diff --git a/chrome/test/data/extensions/api_test/processes/onupdated/manifest.json b/chrome/test/data/extensions/api_test/processes/onupdated/manifest.json
index 9810b2a..da5bb2e 100644
--- a/chrome/test/data/extensions/api_test/processes/onupdated/manifest.json
+++ b/chrome/test/data/extensions/api_test/processes/onupdated/manifest.json
@@ -2,6 +2,7 @@
"name": "processes onupdated test",
"description": "extension that listens to processes.onUpdated",
"version": "0.1",
+ "manifest_version": 2,
"background_page": "background.html",
"permissions": [ "tabs", "experimental" ]
}
diff --git a/chrome/test/data/extensions/api_test/proxy/auto/manifest.json b/chrome/test/data/extensions/api_test/proxy/auto/manifest.json
index 273db99..6275202 100644
--- a/chrome/test/data/extensions/api_test/proxy/auto/manifest.json
+++ b/chrome/test/data/extensions/api_test/proxy/auto/manifest.json
@@ -1,6 +1,7 @@
{
"name": "chrome.proxy",
"version": "0.1",
+ "manifest_version": 2,
"description": "end-to-end browser test for chrome.proxy API",
"background_page": "test.html",
"permissions": ["proxy"]
diff --git a/chrome/test/data/extensions/api_test/proxy/auto/test.html b/chrome/test/data/extensions/api_test/proxy/auto/test.html
index 46f4d74..3efb342 100644
--- a/chrome/test/data/extensions/api_test/proxy/auto/test.html
+++ b/chrome/test/data/extensions/api_test/proxy/auto/test.html
@@ -1 +1,6 @@
+<!--
+ * Copyright (c) 2011 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.
+-->
<script src="test.js"></script>
diff --git a/chrome/test/data/extensions/api_test/proxy/bypass/manifest.json b/chrome/test/data/extensions/api_test/proxy/bypass/manifest.json
index 273db99..6275202 100644
--- a/chrome/test/data/extensions/api_test/proxy/bypass/manifest.json
+++ b/chrome/test/data/extensions/api_test/proxy/bypass/manifest.json
@@ -1,6 +1,7 @@
{
"name": "chrome.proxy",
"version": "0.1",
+ "manifest_version": 2,
"description": "end-to-end browser test for chrome.proxy API",
"background_page": "test.html",
"permissions": ["proxy"]
diff --git a/chrome/test/data/extensions/api_test/proxy/bypass/test.html b/chrome/test/data/extensions/api_test/proxy/bypass/test.html
index 46f4d74..3efb342 100644
--- a/chrome/test/data/extensions/api_test/proxy/bypass/test.html
+++ b/chrome/test/data/extensions/api_test/proxy/bypass/test.html
@@ -1 +1,6 @@
+<!--
+ * Copyright (c) 2011 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.
+-->
<script src="test.js"></script>
diff --git a/chrome/test/data/extensions/api_test/proxy/direct/manifest.json b/chrome/test/data/extensions/api_test/proxy/direct/manifest.json
index 273db99..6275202 100644
--- a/chrome/test/data/extensions/api_test/proxy/direct/manifest.json
+++ b/chrome/test/data/extensions/api_test/proxy/direct/manifest.json
@@ -1,6 +1,7 @@
{
"name": "chrome.proxy",
"version": "0.1",
+ "manifest_version": 2,
"description": "end-to-end browser test for chrome.proxy API",
"background_page": "test.html",
"permissions": ["proxy"]
diff --git a/chrome/test/data/extensions/api_test/proxy/direct/test.html b/chrome/test/data/extensions/api_test/proxy/direct/test.html
index 46f4d74..3efb342 100644
--- a/chrome/test/data/extensions/api_test/proxy/direct/test.html
+++ b/chrome/test/data/extensions/api_test/proxy/direct/test.html
@@ -1 +1,6 @@
+<!--
+ * Copyright (c) 2011 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.
+-->
<script src="test.js"></script>
diff --git a/chrome/test/data/extensions/api_test/proxy/events/invalid_proxy.html b/chrome/test/data/extensions/api_test/proxy/events/invalid_proxy.html
index 2ae8ccc..501afe4 100644
--- a/chrome/test/data/extensions/api_test/proxy/events/invalid_proxy.html
+++ b/chrome/test/data/extensions/api_test/proxy/events/invalid_proxy.html
@@ -1,56 +1,6 @@
-<script>
-// Copyright (c) 2011 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.
-
-// proxy api test
-// browser_tests.exe --gtest_filter=ProxySettingsApiTest.ProxyEventsInvalidProxy
-
-var expected_error = {
- error: "net::ERR_PROXY_CONNECTION_FAILED",
- details: "",
- fatal: true
-};
-var empty_json_url = "";
-
-function test() {
- // Install error handler and get the test server config.
- chrome.proxy.onProxyError.addListener(function (error) {
- chrome.test.assertEq(expected_error, error);
- chrome.test.notifyPass();
- });
- chrome.test.getConfig(readConfigAndSetProxy);
-}
-
-function readConfigAndSetProxy(test_config) {
- // Construct the URL used for XHRs and set the proxy settings.
- empty_json_url = "http://127.0.0.1:" +
- test_config.testServer.port +
- "/files/extensions/api_test/proxy/events/empty.json";
-
- // Set an invalid proxy and fire of a XHR. This should trigger proxy errors.
- // There may be any number of proxy errors, as systems like safe browsing
- // might start network traffic as well.
- var rules = {
- singleProxy: { host: "does.not.exist" }
- };
- var config = { rules: rules, mode: "fixed_servers" };
- chrome.proxy.settings.set({'value': config}, sendFailingXHR);
-}
-
-function sendFailingXHR() {
- var req = new XMLHttpRequest();
- req.open("GET", empty_json_url, true);
- req.onload = function () {
- chrome.test.notifyFail("proxy settings should not work");
- }
- req.onerror = testDone;
- req.send(null);
-}
-
-function testDone() {
- // Do nothing. The test success/failure is decided in the event handler.
-}
-
-test();
-</script>
+<!--
+ * Copyright (c) 2011 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.
+-->
+<script src="invalid_proxy.js"></script>
diff --git a/chrome/test/data/extensions/api_test/proxy/events/manifest.json b/chrome/test/data/extensions/api_test/proxy/events/manifest.json
index 8408c12..32b075e 100644
--- a/chrome/test/data/extensions/api_test/proxy/events/manifest.json
+++ b/chrome/test/data/extensions/api_test/proxy/events/manifest.json
@@ -1,6 +1,7 @@
{
"name": "chrome.proxy",
"version": "0.1",
+ "manifest_version": 2,
"description": "end-to-end browser test for chrome.proxy API",
"permissions": ["proxy", "http://127.0.0.1/"]
}
diff --git a/chrome/test/data/extensions/api_test/proxy/events/parse_error.html b/chrome/test/data/extensions/api_test/proxy/events/parse_error.html
index 0593171..6608e15 100644
--- a/chrome/test/data/extensions/api_test/proxy/events/parse_error.html
+++ b/chrome/test/data/extensions/api_test/proxy/events/parse_error.html
@@ -1,38 +1,6 @@
-<script>
-// Copyright (c) 2011 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.
-
-// proxy api test
-// browser_tests.exe --gtest_filter=ProxySettingsApiTest.ProxyEventsParseError
-
-var expected_error = {
- error: "net::ERR_PAC_SCRIPT_FAILED",
- details: "line: 1: Uncaught SyntaxError: Unexpected token !",
- fatal: false
-};
-
-function test() {
- // Install error handler and get the test server config.
- chrome.proxy.onProxyError.addListener(function (error) {
- chrome.test.assertEq(expected_error, error);
- chrome.test.notifyPass();
- });
-
- // Set an invalid PAC script. This should trigger a proxy errors.
- var config = {
- mode: "pac_script",
- pacScript: {
- data: "trash!",
- mandatory: false
- }
- };
- chrome.proxy.settings.set({'value': config}, testDone);
-}
-
-function testDone() {
- // Do nothing. The test success/failure is decided in the event handler.
-}
-
-test();
-</script>
+<!--
+ * Copyright (c) 2011 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.
+-->
+<script src="parse_error.js"></script>
diff --git a/chrome/test/data/extensions/api_test/proxy/individual/manifest.json b/chrome/test/data/extensions/api_test/proxy/individual/manifest.json
index 273db99..6275202 100644
--- a/chrome/test/data/extensions/api_test/proxy/individual/manifest.json
+++ b/chrome/test/data/extensions/api_test/proxy/individual/manifest.json
@@ -1,6 +1,7 @@
{
"name": "chrome.proxy",
"version": "0.1",
+ "manifest_version": 2,
"description": "end-to-end browser test for chrome.proxy API",
"background_page": "test.html",
"permissions": ["proxy"]
diff --git a/chrome/test/data/extensions/api_test/proxy/individual/test.html b/chrome/test/data/extensions/api_test/proxy/individual/test.html
index 46f4d74..3efb342 100644
--- a/chrome/test/data/extensions/api_test/proxy/individual/test.html
+++ b/chrome/test/data/extensions/api_test/proxy/individual/test.html
@@ -1 +1,6 @@
+<!--
+ * Copyright (c) 2011 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.
+-->
<script src="test.js"></script>
diff --git a/chrome/test/data/extensions/api_test/proxy/individual_incognito_also/manifest.json b/chrome/test/data/extensions/api_test/proxy/individual_incognito_also/manifest.json
index 273db99..6275202 100644
--- a/chrome/test/data/extensions/api_test/proxy/individual_incognito_also/manifest.json
+++ b/chrome/test/data/extensions/api_test/proxy/individual_incognito_also/manifest.json
@@ -1,6 +1,7 @@
{
"name": "chrome.proxy",
"version": "0.1",
+ "manifest_version": 2,
"description": "end-to-end browser test for chrome.proxy API",
"background_page": "test.html",
"permissions": ["proxy"]
diff --git a/chrome/test/data/extensions/api_test/proxy/individual_incognito_also/test.html b/chrome/test/data/extensions/api_test/proxy/individual_incognito_also/test.html
index 46f4d74..3efb342 100644
--- a/chrome/test/data/extensions/api_test/proxy/individual_incognito_also/test.html
+++ b/chrome/test/data/extensions/api_test/proxy/individual_incognito_also/test.html
@@ -1 +1,6 @@
+<!--
+ * Copyright (c) 2011 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.
+-->
<script src="test.js"></script>
diff --git a/chrome/test/data/extensions/api_test/proxy/individual_incognito_only/manifest.json b/chrome/test/data/extensions/api_test/proxy/individual_incognito_only/manifest.json
index 273db99..6275202 100644
--- a/chrome/test/data/extensions/api_test/proxy/individual_incognito_only/manifest.json
+++ b/chrome/test/data/extensions/api_test/proxy/individual_incognito_only/manifest.json
@@ -1,6 +1,7 @@
{
"name": "chrome.proxy",
"version": "0.1",
+ "manifest_version": 2,
"description": "end-to-end browser test for chrome.proxy API",
"background_page": "test.html",
"permissions": ["proxy"]
diff --git a/chrome/test/data/extensions/api_test/proxy/individual_incognito_only/test.html b/chrome/test/data/extensions/api_test/proxy/individual_incognito_only/test.html
index 46f4d74..3efb342 100644
--- a/chrome/test/data/extensions/api_test/proxy/individual_incognito_only/test.html
+++ b/chrome/test/data/extensions/api_test/proxy/individual_incognito_only/test.html
@@ -1 +1,6 @@
+<!--
+ * Copyright (c) 2011 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.
+-->
<script src="test.js"></script>
diff --git a/chrome/test/data/extensions/api_test/proxy/individual_remove/manifest.json b/chrome/test/data/extensions/api_test/proxy/individual_remove/manifest.json
index 273db99..6275202 100644
--- a/chrome/test/data/extensions/api_test/proxy/individual_remove/manifest.json
+++ b/chrome/test/data/extensions/api_test/proxy/individual_remove/manifest.json
@@ -1,6 +1,7 @@
{
"name": "chrome.proxy",
"version": "0.1",
+ "manifest_version": 2,
"description": "end-to-end browser test for chrome.proxy API",
"background_page": "test.html",
"permissions": ["proxy"]
diff --git a/chrome/test/data/extensions/api_test/proxy/individual_remove/test.html b/chrome/test/data/extensions/api_test/proxy/individual_remove/test.html
index 46f4d74..3efb342 100644
--- a/chrome/test/data/extensions/api_test/proxy/individual_remove/test.html
+++ b/chrome/test/data/extensions/api_test/proxy/individual_remove/test.html
@@ -1 +1,6 @@
+<!--
+ * Copyright (c) 2011 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.
+-->
<script src="test.js"></script>
diff --git a/chrome/test/data/extensions/api_test/proxy/pac/manifest.json b/chrome/test/data/extensions/api_test/proxy/pac/manifest.json
index 273db99..6275202 100644
--- a/chrome/test/data/extensions/api_test/proxy/pac/manifest.json
+++ b/chrome/test/data/extensions/api_test/proxy/pac/manifest.json
@@ -1,6 +1,7 @@
{
"name": "chrome.proxy",
"version": "0.1",
+ "manifest_version": 2,
"description": "end-to-end browser test for chrome.proxy API",
"background_page": "test.html",
"permissions": ["proxy"]
diff --git a/chrome/test/data/extensions/api_test/proxy/pac/test.html b/chrome/test/data/extensions/api_test/proxy/pac/test.html
index 46f4d74..3efb342 100644
--- a/chrome/test/data/extensions/api_test/proxy/pac/test.html
+++ b/chrome/test/data/extensions/api_test/proxy/pac/test.html
@@ -1 +1,6 @@
+<!--
+ * Copyright (c) 2011 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.
+-->
<script src="test.js"></script>
diff --git a/chrome/test/data/extensions/api_test/proxy/pacdata/manifest.json b/chrome/test/data/extensions/api_test/proxy/pacdata/manifest.json
index 273db99..6275202 100644
--- a/chrome/test/data/extensions/api_test/proxy/pacdata/manifest.json
+++ b/chrome/test/data/extensions/api_test/proxy/pacdata/manifest.json
@@ -1,6 +1,7 @@
{
"name": "chrome.proxy",
"version": "0.1",
+ "manifest_version": 2,
"description": "end-to-end browser test for chrome.proxy API",
"background_page": "test.html",
"permissions": ["proxy"]
diff --git a/chrome/test/data/extensions/api_test/proxy/pacdata/test.html b/chrome/test/data/extensions/api_test/proxy/pacdata/test.html
index 46f4d74..3efb342 100644
--- a/chrome/test/data/extensions/api_test/proxy/pacdata/test.html
+++ b/chrome/test/data/extensions/api_test/proxy/pacdata/test.html
@@ -1 +1,6 @@
+<!--
+ * Copyright (c) 2011 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.
+-->
<script src="test.js"></script>
diff --git a/chrome/test/data/extensions/api_test/proxy/single/manifest.json b/chrome/test/data/extensions/api_test/proxy/single/manifest.json
index 273db99..6275202 100644
--- a/chrome/test/data/extensions/api_test/proxy/single/manifest.json
+++ b/chrome/test/data/extensions/api_test/proxy/single/manifest.json
@@ -1,6 +1,7 @@
{
"name": "chrome.proxy",
"version": "0.1",
+ "manifest_version": 2,
"description": "end-to-end browser test for chrome.proxy API",
"background_page": "test.html",
"permissions": ["proxy"]
diff --git a/chrome/test/data/extensions/api_test/proxy/single/test.html b/chrome/test/data/extensions/api_test/proxy/single/test.html
index 46f4d74..3efb342 100644
--- a/chrome/test/data/extensions/api_test/proxy/single/test.html
+++ b/chrome/test/data/extensions/api_test/proxy/single/test.html
@@ -1 +1,6 @@
+<!--
+ * Copyright (c) 2011 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.
+-->
<script src="test.js"></script>
diff --git a/chrome/test/data/extensions/api_test/proxy/system/manifest.json b/chrome/test/data/extensions/api_test/proxy/system/manifest.json
index 273db99..6275202 100644
--- a/chrome/test/data/extensions/api_test/proxy/system/manifest.json
+++ b/chrome/test/data/extensions/api_test/proxy/system/manifest.json
@@ -1,6 +1,7 @@
{
"name": "chrome.proxy",
"version": "0.1",
+ "manifest_version": 2,
"description": "end-to-end browser test for chrome.proxy API",
"background_page": "test.html",
"permissions": ["proxy"]
diff --git a/chrome/test/data/extensions/api_test/proxy/system/test.html b/chrome/test/data/extensions/api_test/proxy/system/test.html
index 46f4d74..3efb342 100644
--- a/chrome/test/data/extensions/api_test/proxy/system/test.html
+++ b/chrome/test/data/extensions/api_test/proxy/system/test.html
@@ -1 +1,6 @@
+<!--
+ * Copyright (c) 2011 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.
+-->
<script src="test.js"></script>