Skip to content

Commit

Permalink
Bug 1493148 - Backout changeset 7a1ee0e4b6d7 (bug 1491061 part 3)
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan committed Sep 21, 2018
1 parent 36c45bb commit f62ff8f
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 41 deletions.
7 changes: 1 addition & 6 deletions dom/indexedDB/test/test_third_party.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,7 @@
iframe.addEventListener("load", iframeLoaded);
}
SpecialPowers.pushPrefEnv({
"set": [
["browser.contentblocking.enabled", true],
["browser.contentblocking.ui.enabled", true],
["browser.contentblocking.rejecttrackers.ui.enabled", true],
["network.cookie.cookieBehavior", testData[testIndex].cookieBehavior],
]
"set": [["network.cookie.cookieBehavior", testData[testIndex].cookieBehavior]]
}, () => {
iframe.src = testData[testIndex].host + iframe1Path;
});
Expand Down
3 changes: 0 additions & 3 deletions dom/serviceworkers/test/test_third_party_iframes.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@
// the given cookie policy.
function testShouldIntercept(behavior, lifetime, done) {
SpecialPowers.pushPrefEnv({"set": [
["browser.contentblocking.enabled", true],
["browser.contentblocking.ui.enabled", true],
["browser.contentblocking.rejecttrackers.ui.enabled", true],
["network.cookie.cookieBehavior", behavior],
["network.cookie.lifetimePolicy", lifetime],
]}, function() {
Expand Down
8 changes: 2 additions & 6 deletions dom/tests/mochitest/bugs/test_bug1171215.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,8 @@
"http://example.org/tests/dom/tests/mochitest/bugs/file_prime_cookie.html";
waitForLoad().then(function() {
// Cookies are set up, disallow third-party cookies and start the test.
SpecialPowers.pushPrefEnv({ set: [
["browser.contentblocking.enabled", true],
["browser.contentblocking.ui.enabled", true],
["browser.contentblocking.rejecttrackers.ui.enabled", true],
["network.cookie.cookieBehavior", 1],
]}, () => { continueTest(); });
SpecialPowers.pushPrefEnv({ set: [[ 'network.cookie.cookieBehavior', 1 ]] },
() => { continueTest(); });
}).catch((e) => { ok(false, `Got exception: ${e}`) });
}

Expand Down
7 changes: 1 addition & 6 deletions dom/tests/mochitest/general/storagePermissionsUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,7 @@ if (inFrame) {
}

function setCookieBehavior(behavior) {
return SpecialPowers.pushPrefEnv({"set": [
["browser.contentblocking.enabled", true],
["browser.contentblocking.ui.enabled", true],
["browser.contentblocking.rejecttrackers.ui.enabled", true],
[kPrefName, behavior],
]});
return SpecialPowers.pushPrefEnv({"set": [[kPrefName, behavior]]});
}

function runIFrame(url) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,8 @@
SimpleTest.waitForExplicitFinish();

// Set cookies behavior to "always reject".
SpecialPowers.pushPrefEnv({"set": [
["browser.contentblocking.enabled", true],
["browser.contentblocking.ui.enabled", true],
["browser.contentblocking.rejecttrackers.ui.enabled", true],
["network.cookie.cookieBehavior", 2],
]}, test1);
SpecialPowers.pushPrefEnv({"set": [["network.cookie.cookieBehavior", 2]]},
test1);

function test1() {
try {
Expand Down
3 changes: 0 additions & 3 deletions dom/workers/test/test_sharedWorker_thirdparty.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@

add_task(async function blocked() {
await SpecialPowers.pushPrefEnv({ set: [
["browser.contentblocking.enabled", true],
["browser.contentblocking.ui.enabled", true],
["browser.contentblocking.rejecttrackers.ui.enabled", true],
["network.cookie.cookieBehavior", COOKIE_BEHAVIOR_REJECTFOREIGN]
]});
let result = await testThirdPartyFrame('blocked');
Expand Down
7 changes: 1 addition & 6 deletions extensions/cookie/test/file_testcommon.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@ function setupTest(uri, cookies, loads) {
SimpleTest.waitForExplicitFinish();

var prefSet = new Promise(resolve => {
SpecialPowers.pushPrefEnv({ set: [
["browser.contentblocking.enabled", true],
["browser.contentblocking.ui.enabled", true],
["browser.contentblocking.rejecttrackers.ui.enabled", true],
["network.cookie.cookieBehavior", 1],
]}, resolve);
SpecialPowers.pushPrefEnv({ set: [["network.cookie.cookieBehavior", 1]] }, resolve);
});

gScript = SpecialPowers.loadChromeScript(SCRIPT_URL);
Expand Down
5 changes: 0 additions & 5 deletions extensions/cookie/test/unit/test_cookies_thirdparty.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@
// 2) with channel, but with no docshell parent

function run_test() {
// Set the needed content blocking prefs
Services.prefs.setBoolPref("browser.contentblocking.enabled", true);
Services.prefs.setBoolPref("browser.contentblocking.ui.enabled", true);
Services.prefs.setBoolPref("browser.contentblocking.rejecttrackers.ui.enabled", true);

// Create URIs and channels pointing to foo.com and bar.com.
// We will use these to put foo.com into first and third party contexts.
var spec1 = "http://foo.com/foo.html";
Expand Down

0 comments on commit f62ff8f

Please sign in to comment.