Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6496)

Unified Diff: chrome/test/data/extensions/api_test/content_settings/standard/test.html

Issue 7298005: Expose privacy-relevant preferences via Chrome's extension API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebasing. Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/extensions/api_test/content_settings/standard/test.html
diff --git a/chrome/test/data/extensions/api_test/content_settings/standard/test.html b/chrome/test/data/extensions/api_test/content_settings/standard/test.html
index 9249024bbfdaacfc8ea5ab6ea4b918f62fc4e00b..5894b7ec4aa32df2ebb03ca10a8be81483ec50f6 100644
--- a/chrome/test/data/extensions/api_test/content_settings/standard/test.html
+++ b/chrome/test/data/extensions/api_test/content_settings/standard/test.html
@@ -25,43 +25,27 @@ var settings = {
};
Object.prototype.forEach = function(f) {
- for (key in this) {
- if (this.hasOwnProperty(key))
- f(key, this[key]);
+ var k;
+ for (k in this) {
+ if (this.hasOwnProperty(k))
+ f(k, this[k]);
}
-}
-
+};
function expect(expected, message) {
return chrome.test.callbackPass(function(value) {
chrome.test.assertEq(expected, value, message);
});
}
+
+function expectFalse(message) {
+ return expect({
+ "value": false,
+ "levelOfControl": "controllable_by_this_extension"
+ }, message);
+}
+
chrome.test.runTests([
- function getThirdPartyCookiesAllowed() {
- cs.global.thirdPartyCookiesAllowed.get(
- {},
- expect({ 'value': false,
- 'levelOfControl': "controllable_by_this_extension" },
- "third-party cookies should be blocked"));
- },
- function getReferrersEnabled() {
- cs.global.referrersEnabled.get(
- {},
- expect({ 'value': false,
- 'levelOfControl': "controllable_by_this_extension" },
- "referrers should be disabled"));
- },
- function setThirdPartyCookiesAllowed() {
- cs.global.thirdPartyCookiesAllowed.set(
- {'value': true},
- chrome.test.callbackPass());
- },
- function setReferrersEnabled() {
- cs.global.referrersEnabled.set(
- {'value': true},
- chrome.test.callbackPass());
- },
function setDefaultContentSettings() {
default_content_settings.forEach(function(type, setting) {
cs[type].set({
@@ -91,7 +75,7 @@ chrome.test.runTests([
},
function invalidSettings() {
cs.cookies.get({
- 'primaryUrl': 'moo',
+ 'primaryUrl': 'moo'
}, chrome.test.callbackFail("The URL \"moo\" is invalid."));
cs.plugins.set({
'primaryPattern': 'http://example.com/*',

Powered by Google App Engine
This is Rietveld 408576698