Index: chrome/test/data/extensions/api_test/content_settings/onchange/test.html |
diff --git a/chrome/test/data/extensions/api_test/content_settings/onchange/test.html b/chrome/test/data/extensions/api_test/content_settings/onchange/test.html |
deleted file mode 100644 |
index 20be7d6fbd88348b14df1e430d0152f580e0751d..0000000000000000000000000000000000000000 |
--- a/chrome/test/data/extensions/api_test/content_settings/onchange/test.html |
+++ /dev/null |
@@ -1,95 +0,0 @@ |
-<script> |
-// Content settings API test |
-// Run with browser_tests --gtest_filter=ExtensionApiTest.ContentSettingsOnChange |
- |
-// 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 cs = chrome.experimental.contentSettings; |
-chrome.test.runTests([ |
- function changeDefault() { |
- // Changing the regular settings when no incognito-specific settings are |
- // defined should fire two events. |
- listenUntil(cs.global.thirdPartyCookiesAllowed.onChange, [{ |
- 'value': false, |
- 'levelOfControl': 'controlled_by_this_extension' |
- }, |
- { |
- 'value': false, |
- 'incognitoSpecific': false, |
- 'levelOfControl': 'controlled_by_this_extension' |
- }]); |
- cs.global.thirdPartyCookiesAllowed.set({ |
- 'value':false |
- }, chrome.test.callbackPass()); |
- }, |
- function changeIncognitoOnly() { |
- listenUntil(cs.global.thirdPartyCookiesAllowed.onChange, [{ |
- 'value': true, |
- 'incognitoSpecific': true, |
- 'levelOfControl': 'controlled_by_this_extension' |
- }]); |
- cs.global.thirdPartyCookiesAllowed.set({ |
- 'value': true, |
- 'scope': 'incognito_persistent' |
- }, chrome.test.callbackPass()); |
- }, |
- function changeDefaultOnly() { |
- listenUntil(cs.global.thirdPartyCookiesAllowed.onChange, [{ |
- 'value': true, |
- 'levelOfControl': 'controlled_by_this_extension' |
- }]); |
- cs.global.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(cs.global.thirdPartyCookiesAllowed.onChange, [{ |
- 'value': false, |
- 'incognitoSpecific': true, |
- 'levelOfControl': 'controlled_by_this_extension' |
- }]); |
- cs.global.thirdPartyCookiesAllowed.set({ |
- 'value': false, |
- 'scope': 'incognito_persistent' |
- }, chrome.test.callbackPass()); |
- }, |
- function clearIncognito() { |
- listenUntil(cs.global.thirdPartyCookiesAllowed.onChange, [{ |
- 'value': true, |
- 'incognitoSpecific': false, |
- 'levelOfControl': 'controlled_by_this_extension' |
- }]); |
- cs.global.thirdPartyCookiesAllowed.clear({ |
- 'scope': 'incognito_persistent' |
- }, chrome.test.callbackPass()); |
- }, |
- function clearDefault() { |
- listenUntil(cs.global.thirdPartyCookiesAllowed.onChange, [{ |
- 'value': true, |
- 'levelOfControl': 'controllable_by_this_extension' |
- }, |
- { |
- 'value': true, |
- 'incognitoSpecific': false, |
- 'levelOfControl': 'controllable_by_this_extension' |
- }]); |
- cs.global.thirdPartyCookiesAllowed.clear({}, chrome.test.callbackPass()); |
- } |
-]); |
- |
-</script> |