Bug 1495130 - Part 2: Remove the test cases that are no longer necessary after bug 1494737 r=baku

Depends on D7229

Differential Revision: https://phabricator.services.mozilla.com/D7230

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Ehsan Akhgari 2018-10-05 16:38:51 +00:00
Родитель 7ce7bddda7
Коммит a68ffa3c04
32 изменённых файлов: 5 добавлений и 526 удалений

Просмотреть файл

@ -28,32 +28,16 @@ skip-if = (os == "win" && os_version == "6.1" && bits == 32 && !debug) # Bug 149
[browser_imageCache1.js]
[browser_imageCache1-1.js]
[browser_imageCache1-2.js]
[browser_imageCache2.js]
[browser_imageCache2-1.js]
[browser_imageCache2-2.js]
[browser_imageCache4.js]
[browser_imageCache4-1.js]
[browser_imageCache4-2.js]
[browser_imageCache5.js]
[browser_imageCache5-1.js]
[browser_imageCache5-2.js]
[browser_imageCache6-1.js]
[browser_imageCache6-2.js]
[browser_imageCache6.js]
[browser_imageCache8.js]
[browser_imageCache9.js]
[browser_imageCache10.js]
[browser_imageCache10-1.js]
[browser_imageCache10-2.js]
[browser_imageCache11.js]
[browser_imageCache11-1.js]
[browser_imageCache11-2.js]
[browser_imageCache13.js]
[browser_imageCache13-1.js]
[browser_imageCache13-2.js]
[browser_imageCache14.js]
[browser_imageCache14-1.js]
[browser_imageCache14-2.js]
[browser_onBeforeRequestNotificationForTrackingResources.js]
[browser_onModifyRequestNotificationForTrackingResources.js]
[browser_permissionInNormalWindows.js]

Просмотреть файл

@ -2,7 +2,6 @@ ChromeUtils.import("resource://gre/modules/Services.jsm");
let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
let blockingByContentBlocking = false;
let blockingByContentBlockingUI = true;
let blockingByContentBlockingRTUI = false;
let blockingByAllowList = true;
let expectedBlockingNotifications = true;

Просмотреть файл

@ -2,7 +2,6 @@ ChromeUtils.import("resource://gre/modules/Services.jsm");
let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
let blockingByContentBlocking = false;
let blockingByContentBlockingUI = true;
let blockingByContentBlockingRTUI = false;
let blockingByAllowList = false;
let expectedBlockingNotifications = true;

Просмотреть файл

@ -2,7 +2,6 @@ ChromeUtils.import("resource://gre/modules/Services.jsm");
let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
let blockingByContentBlocking = false;
let blockingByContentBlockingUI = true;
let blockingByContentBlockingRTUI = true;
let blockingByAllowList = false;
let expectedBlockingNotifications = true;

Просмотреть файл

@ -2,7 +2,6 @@ ChromeUtils.import("resource://gre/modules/Services.jsm");
let cookieBehavior = BEHAVIOR_REJECT_FOREIGN;
let blockingByContentBlocking = false;
let blockingByContentBlockingUI = true;
let blockingByContentBlockingRTUI = false;
let blockingByAllowList = true;
let expectedBlockingNotifications = true;

Просмотреть файл

@ -2,7 +2,6 @@ ChromeUtils.import("resource://gre/modules/Services.jsm");
let cookieBehavior = BEHAVIOR_REJECT_FOREIGN;
let blockingByContentBlocking = false;
let blockingByContentBlockingUI = true;
let blockingByContentBlockingRTUI = false;
let blockingByAllowList = false;
let expectedBlockingNotifications = true;

Просмотреть файл

@ -2,7 +2,6 @@ ChromeUtils.import("resource://gre/modules/Services.jsm");
let cookieBehavior = BEHAVIOR_REJECT_FOREIGN;
let blockingByContentBlocking = false;
let blockingByContentBlockingUI = true;
let blockingByContentBlockingRTUI = true;
let blockingByAllowList = false;
let expectedBlockingNotifications = true;

Просмотреть файл

@ -1,18 +0,0 @@
ChromeUtils.import("resource://gre/modules/Services.jsm");
let cookieBehavior = BEHAVIOR_REJECT_FOREIGN;
let blockingByContentBlocking = true;
let blockingByContentBlockingUI = false;
let blockingByContentBlockingRTUI = false;
let blockingByAllowList = true;
let expectedBlockingNotifications = true;
let rootDir = getRootDirectory(gTestPath);
let jar = getJar(rootDir);
if (jar) {
let tmpdir = extractJarToTmp(jar);
rootDir = "file://" + tmpdir.path + "/";
}
/* import-globals-from imageCacheWorker.js */
Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);

Просмотреть файл

@ -1,18 +0,0 @@
ChromeUtils.import("resource://gre/modules/Services.jsm");
let cookieBehavior = BEHAVIOR_REJECT_FOREIGN;
let blockingByContentBlocking = true;
let blockingByContentBlockingUI = false;
let blockingByContentBlockingRTUI = false;
let blockingByAllowList = false;
let expectedBlockingNotifications = true;
let rootDir = getRootDirectory(gTestPath);
let jar = getJar(rootDir);
if (jar) {
let tmpdir = extractJarToTmp(jar);
rootDir = "file://" + tmpdir.path + "/";
}
/* import-globals-from imageCacheWorker.js */
Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);

Просмотреть файл

@ -1,18 +0,0 @@
ChromeUtils.import("resource://gre/modules/Services.jsm");
let cookieBehavior = BEHAVIOR_REJECT_FOREIGN;
let blockingByContentBlocking = true;
let blockingByContentBlockingUI = false;
let blockingByContentBlockingRTUI = true;
let blockingByAllowList = false;
let expectedBlockingNotifications = true;
let rootDir = getRootDirectory(gTestPath);
let jar = getJar(rootDir);
if (jar) {
let tmpdir = extractJarToTmp(jar);
rootDir = "file://" + tmpdir.path + "/";
}
/* import-globals-from imageCacheWorker.js */
Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);

Просмотреть файл

@ -6,7 +6,6 @@ Services.perms.add(uriObj, "cookie", Services.perms.ALLOW_ACTION);
let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
let blockingByContentBlocking = false;
let blockingByContentBlockingUI = true;
let blockingByContentBlockingRTUI = false;
let blockingByAllowList = true;
let expectedBlockingNotifications = false;

Просмотреть файл

@ -6,7 +6,6 @@ Services.perms.add(uriObj, "cookie", Services.perms.ALLOW_ACTION);
let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
let blockingByContentBlocking = false;
let blockingByContentBlockingUI = true;
let blockingByContentBlockingRTUI = false;
let blockingByAllowList = false;
let expectedBlockingNotifications = false;

Просмотреть файл

@ -6,7 +6,6 @@ Services.perms.add(uriObj, "cookie", Services.perms.ALLOW_ACTION);
let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
let blockingByContentBlocking = false;
let blockingByContentBlockingUI = true;
let blockingByContentBlockingRTUI = true;
let blockingByAllowList = false;
let expectedBlockingNotifications = false;

Просмотреть файл

@ -1,21 +0,0 @@
ChromeUtils.import("resource://gre/modules/Services.jsm");
/* Setting a custom permission for this website */
let uriObj = Services.io.newURI(TEST_DOMAIN);
Services.perms.add(uriObj, "cookie", Services.perms.ALLOW_ACTION);
let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
let blockingByContentBlocking = true;
let blockingByContentBlockingUI = false;
let blockingByContentBlockingRTUI = false;
let blockingByAllowList = true;
let expectedBlockingNotifications = false;
let rootDir = getRootDirectory(gTestPath);
let jar = getJar(rootDir);
if (jar) {
let tmpdir = extractJarToTmp(jar);
rootDir = "file://" + tmpdir.path + "/";
}
/* import-globals-from imageCacheWorker.js */
Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);

Просмотреть файл

@ -1,21 +0,0 @@
ChromeUtils.import("resource://gre/modules/Services.jsm");
/* Setting a custom permission for this website */
let uriObj = Services.io.newURI(TEST_DOMAIN);
Services.perms.add(uriObj, "cookie", Services.perms.ALLOW_ACTION);
let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
let blockingByContentBlocking = true;
let blockingByContentBlockingUI = false;
let blockingByContentBlockingRTUI = false;
let blockingByAllowList = false;
let expectedBlockingNotifications = false;
let rootDir = getRootDirectory(gTestPath);
let jar = getJar(rootDir);
if (jar) {
let tmpdir = extractJarToTmp(jar);
rootDir = "file://" + tmpdir.path + "/";
}
/* import-globals-from imageCacheWorker.js */
Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);

Просмотреть файл

@ -1,21 +0,0 @@
ChromeUtils.import("resource://gre/modules/Services.jsm");
/* Setting a custom permission for this website */
let uriObj = Services.io.newURI(TEST_DOMAIN);
Services.perms.add(uriObj, "cookie", Services.perms.ALLOW_ACTION);
let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
let blockingByContentBlocking = true;
let blockingByContentBlockingUI = false;
let blockingByContentBlockingRTUI = true;
let blockingByAllowList = false;
let expectedBlockingNotifications = false;
let rootDir = getRootDirectory(gTestPath);
let jar = getJar(rootDir);
if (jar) {
let tmpdir = extractJarToTmp(jar);
rootDir = "file://" + tmpdir.path + "/";
}
/* import-globals-from imageCacheWorker.js */
Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);

Просмотреть файл

@ -1,18 +0,0 @@
ChromeUtils.import("resource://gre/modules/Services.jsm");
let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
let blockingByContentBlocking = true;
let blockingByContentBlockingUI = false;
let blockingByContentBlockingRTUI = false;
let blockingByAllowList = true;
let expectedBlockingNotifications = true;
let rootDir = getRootDirectory(gTestPath);
let jar = getJar(rootDir);
if (jar) {
let tmpdir = extractJarToTmp(jar);
rootDir = "file://" + tmpdir.path + "/";
}
/* import-globals-from imageCacheWorker.js */
Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);

Просмотреть файл

@ -1,18 +0,0 @@
ChromeUtils.import("resource://gre/modules/Services.jsm");
let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
let blockingByContentBlocking = true;
let blockingByContentBlockingUI = false;
let blockingByContentBlockingRTUI = false;
let blockingByAllowList = false;
let expectedBlockingNotifications = true;
let rootDir = getRootDirectory(gTestPath);
let jar = getJar(rootDir);
if (jar) {
let tmpdir = extractJarToTmp(jar);
rootDir = "file://" + tmpdir.path + "/";
}
/* import-globals-from imageCacheWorker.js */
Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);

Просмотреть файл

@ -1,18 +0,0 @@
ChromeUtils.import("resource://gre/modules/Services.jsm");
let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
let blockingByContentBlocking = true;
let blockingByContentBlockingUI = false;
let blockingByContentBlockingRTUI = true;
let blockingByAllowList = false;
let expectedBlockingNotifications = true;
let rootDir = getRootDirectory(gTestPath);
let jar = getJar(rootDir);
if (jar) {
let tmpdir = extractJarToTmp(jar);
rootDir = "file://" + tmpdir.path + "/";
}
/* import-globals-from imageCacheWorker.js */
Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);

Просмотреть файл

@ -2,7 +2,6 @@ ChromeUtils.import("resource://gre/modules/Services.jsm");
let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
let blockingByContentBlocking = true;
let blockingByContentBlockingUI = true;
let blockingByContentBlockingRTUI = false;
let blockingByAllowList = true;
let expectedBlockingNotifications = true;

Просмотреть файл

@ -2,7 +2,6 @@ ChromeUtils.import("resource://gre/modules/Services.jsm");
let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
let blockingByContentBlocking = true;
let blockingByContentBlockingUI = true;
let blockingByContentBlockingRTUI = false;
let blockingByAllowList = false;
let expectedBlockingNotifications = true;

Просмотреть файл

@ -2,7 +2,6 @@ ChromeUtils.import("resource://gre/modules/Services.jsm");
let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
let blockingByContentBlocking = true;
let blockingByContentBlockingUI = true;
let blockingByContentBlockingRTUI = true;
let blockingByAllowList = false;
let expectedBlockingNotifications = true;

Просмотреть файл

@ -1,18 +0,0 @@
ChromeUtils.import("resource://gre/modules/Services.jsm");
let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
let blockingByContentBlocking = false;
let blockingByContentBlockingUI = true;
let blockingByContentBlockingRTUI = false;
let blockingByAllowList = true;
let expectedBlockingNotifications = true;
let rootDir = getRootDirectory(gTestPath);
let jar = getJar(rootDir);
if (jar) {
let tmpdir = extractJarToTmp(jar);
rootDir = "file://" + tmpdir.path + "/";
}
/* import-globals-from imageCacheWorker.js */
Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);

Просмотреть файл

@ -1,18 +0,0 @@
ChromeUtils.import("resource://gre/modules/Services.jsm");
let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
let blockingByContentBlocking = false;
let blockingByContentBlockingUI = true;
let blockingByContentBlockingRTUI = false;
let blockingByAllowList = false;
let expectedBlockingNotifications = true;
let rootDir = getRootDirectory(gTestPath);
let jar = getJar(rootDir);
if (jar) {
let tmpdir = extractJarToTmp(jar);
rootDir = "file://" + tmpdir.path + "/";
}
/* import-globals-from imageCacheWorker.js */
Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);

Просмотреть файл

@ -1,18 +0,0 @@
ChromeUtils.import("resource://gre/modules/Services.jsm");
let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
let blockingByContentBlocking = false;
let blockingByContentBlockingUI = true;
let blockingByContentBlockingRTUI = true;
let blockingByAllowList = false;
let expectedBlockingNotifications = true;
let rootDir = getRootDirectory(gTestPath);
let jar = getJar(rootDir);
if (jar) {
let tmpdir = extractJarToTmp(jar);
rootDir = "file://" + tmpdir.path + "/";
}
/* import-globals-from imageCacheWorker.js */
Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);

Просмотреть файл

@ -1,18 +0,0 @@
ChromeUtils.import("resource://gre/modules/Services.jsm");
let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
let blockingByContentBlocking = true;
let blockingByContentBlockingUI = false;
let blockingByContentBlockingRTUI = false;
let blockingByAllowList = true;
let expectedBlockingNotifications = true;
let rootDir = getRootDirectory(gTestPath);
let jar = getJar(rootDir);
if (jar) {
let tmpdir = extractJarToTmp(jar);
rootDir = "file://" + tmpdir.path + "/";
}
/* import-globals-from imageCacheWorker.js */
Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);

Просмотреть файл

@ -1,18 +0,0 @@
ChromeUtils.import("resource://gre/modules/Services.jsm");
let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
let blockingByContentBlocking = true;
let blockingByContentBlockingUI = false;
let blockingByContentBlockingRTUI = false;
let blockingByAllowList = false;
let expectedBlockingNotifications = true;
let rootDir = getRootDirectory(gTestPath);
let jar = getJar(rootDir);
if (jar) {
let tmpdir = extractJarToTmp(jar);
rootDir = "file://" + tmpdir.path + "/";
}
/* import-globals-from imageCacheWorker.js */
Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);

Просмотреть файл

@ -1,18 +0,0 @@
ChromeUtils.import("resource://gre/modules/Services.jsm");
let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
let blockingByContentBlocking = true;
let blockingByContentBlockingUI = false;
let blockingByContentBlockingRTUI = true;
let blockingByAllowList = false;
let expectedBlockingNotifications = true;
let rootDir = getRootDirectory(gTestPath);
let jar = getJar(rootDir);
if (jar) {
let tmpdir = extractJarToTmp(jar);
rootDir = "file://" + tmpdir.path + "/";
}
/* import-globals-from imageCacheWorker.js */
Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);

Просмотреть файл

@ -2,7 +2,6 @@ ChromeUtils.import("resource://gre/modules/Services.jsm");
let cookieBehavior = BEHAVIOR_REJECT_TRACKER;
let blockingByContentBlocking = true;
let blockingByContentBlockingUI = true;
let blockingByContentBlockingRTUI = true;
let blockingByAllowList = true;
let expectedBlockingNotifications = true;

Просмотреть файл

@ -1,18 +0,0 @@
ChromeUtils.import("resource://gre/modules/Services.jsm");
let cookieBehavior = BEHAVIOR_REJECT_FOREIGN;
let blockingByContentBlocking = true;
let blockingByContentBlockingUI = true;
let blockingByContentBlockingRTUI = true;
let blockingByAllowList = true;
let expectedBlockingNotifications = true;
let rootDir = getRootDirectory(gTestPath);
let jar = getJar(rootDir);
if (jar) {
let tmpdir = extractJarToTmp(jar);
rootDir = "file://" + tmpdir.path + "/";
}
/* import-globals-from imageCacheWorker.js */
Services.scriptloader.loadSubScript(rootDir + "imageCacheWorker.js", this);

Просмотреть файл

@ -31,7 +31,6 @@ this.AntiTracking = {
name,
cookieBehavior: BEHAVIOR_REJECT_TRACKER,
blockingByContentBlocking: true,
blockingByContentBlockingUI: true,
blockingByContentBlockingRTUI: true,
allowList: false,
callback: callbackTracking,
@ -46,7 +45,6 @@ this.AntiTracking = {
name,
cookieBehavior: BEHAVIOR_REJECT_TRACKER,
blockingByContentBlocking: true,
blockingByContentBlockingUI: true,
blockingByContentBlockingRTUI: false,
allowList: true,
callback: callbackTracking,
@ -74,12 +72,6 @@ this.AntiTracking = {
} else {
options.blockingByContentBlocking = false;
}
if ("blockingByContentBlockingUI" in callbackNonTracking) {
options.blockingByContentBlockingUI =
callbackNonTracking.blockingByContentBlockingUI;
} else {
options.blockingByContentBlockingUI = false;
}
if ("blockingByContentBlockingRTUI" in callbackNonTracking) {
options.blockingByContentBlockingRTUI =
callbackNonTracking.blockingByContentBlockingRTUI;
@ -97,10 +89,9 @@ this.AntiTracking = {
// Phase 1: Here we want to test that a 3rd party context is not blocked if pref is off.
if (runExtraTests) {
// There are six ways in which the third-party context may not be blocked:
// There are five ways in which the third-party context may not be blocked:
// * If the cookieBehavior pref causes it to not be blocked.
// * If the contentBlocking pref causes it to not be blocked.
// * If the contentBlocking UI pref causes it to not be blocked.
// * If both of these prefs cause it to not be blocked.
// * If the top-level page is on the content blocking allow list.
// * If the contentBlocking third-party cookies UI pref is off, the allow list will be ignored.
@ -109,7 +100,6 @@ this.AntiTracking = {
name,
cookieBehavior: BEHAVIOR_ACCEPT,
blockingByContentBlocking: true,
blockingByContentBlockingUI: true,
blockingByContentBlockingRTUI: true,
allowList: false,
callback: callbackNonTracking,
@ -124,7 +114,6 @@ this.AntiTracking = {
name,
cookieBehavior: BEHAVIOR_ACCEPT,
blockingByContentBlocking: true,
blockingByContentBlockingUI: true,
blockingByContentBlockingRTUI: false,
allowList: true,
callback: callbackNonTracking,
@ -139,7 +128,6 @@ this.AntiTracking = {
name,
cookieBehavior: BEHAVIOR_ACCEPT,
blockingByContentBlocking: true,
blockingByContentBlockingUI: true,
blockingByContentBlockingRTUI: false,
allowList: false,
callback: callbackNonTracking,
@ -154,7 +142,6 @@ this.AntiTracking = {
name,
cookieBehavior: BEHAVIOR_ACCEPT,
blockingByContentBlocking: false,
blockingByContentBlockingUI: true,
blockingByContentBlockingRTUI: true,
allowList: false,
callback: callbackNonTracking,
@ -169,7 +156,6 @@ this.AntiTracking = {
name,
cookieBehavior: BEHAVIOR_ACCEPT,
blockingByContentBlocking: false,
blockingByContentBlockingUI: true,
blockingByContentBlockingRTUI: false,
allowList: true,
callback: callbackNonTracking,
@ -184,52 +170,6 @@ this.AntiTracking = {
name,
cookieBehavior: BEHAVIOR_ACCEPT,
blockingByContentBlocking: false,
blockingByContentBlockingUI: true,
blockingByContentBlockingRTUI: false,
allowList: false,
callback: callbackNonTracking,
extraPrefs: [],
expectedBlockingNotifications: false,
runInPrivateWindow,
iframeSandbox,
});
this._createCleanupTask(cleanupFunction);
this._createTask({
name,
cookieBehavior: BEHAVIOR_ACCEPT,
blockingByContentBlocking: true,
blockingByContentBlockingUI: false,
blockingByContentBlockingRTUI: true,
allowList: false,
callback: callbackNonTracking,
extraPrefs: [],
expectedBlockingNotifications: false,
runInPrivateWindow,
iframeSandbox,
});
this._createCleanupTask(cleanupFunction);
this._createTask({
name,
cookieBehavior: BEHAVIOR_ACCEPT,
blockingByContentBlocking: true,
blockingByContentBlockingUI: false,
blockingByContentBlockingRTUI: false,
allowList: true,
callback: callbackNonTracking,
extraPrefs: [],
expectedBlockingNotifications: false,
runInPrivateWindow,
iframeSandbox,
});
this._createCleanupTask(cleanupFunction);
this._createTask({
name,
cookieBehavior: BEHAVIOR_ACCEPT,
blockingByContentBlocking: true,
blockingByContentBlockingUI: false,
blockingByContentBlockingRTUI: false,
allowList: false,
callback: callbackNonTracking,
@ -244,7 +184,6 @@ this.AntiTracking = {
name,
cookieBehavior: BEHAVIOR_REJECT_FOREIGN,
blockingByContentBlocking: false,
blockingByContentBlockingUI: true,
blockingByContentBlockingRTUI: true,
allowList: false,
callback: callbackNonTracking,
@ -259,7 +198,6 @@ this.AntiTracking = {
name,
cookieBehavior: BEHAVIOR_REJECT_FOREIGN,
blockingByContentBlocking: false,
blockingByContentBlockingUI: true,
blockingByContentBlockingRTUI: false,
allowList: true,
callback: callbackNonTracking,
@ -274,52 +212,6 @@ this.AntiTracking = {
name,
cookieBehavior: BEHAVIOR_REJECT_FOREIGN,
blockingByContentBlocking: false,
blockingByContentBlockingUI: true,
blockingByContentBlockingRTUI: false,
allowList: false,
callback: callbackNonTracking,
extraPrefs: [],
expectedBlockingNotifications: false,
runInPrivateWindow,
iframeSandbox,
});
this._createCleanupTask(cleanupFunction);
this._createTask({
name,
cookieBehavior: BEHAVIOR_REJECT_FOREIGN,
blockingByContentBlocking: true,
blockingByContentBlockingUI: false,
blockingByContentBlockingRTUI: true,
allowList: false,
callback: callbackNonTracking,
extraPrefs: [],
expectedBlockingNotifications: false,
runInPrivateWindow,
iframeSandbox,
});
this._createCleanupTask(cleanupFunction);
this._createTask({
name,
cookieBehavior: BEHAVIOR_REJECT_FOREIGN,
blockingByContentBlocking: true,
blockingByContentBlockingUI: false,
blockingByContentBlockingRTUI: false,
allowList: true,
callback: callbackNonTracking,
extraPrefs: [],
expectedBlockingNotifications: false,
runInPrivateWindow,
iframeSandbox,
});
this._createCleanupTask(cleanupFunction);
this._createTask({
name,
cookieBehavior: BEHAVIOR_REJECT_FOREIGN,
blockingByContentBlocking: true,
blockingByContentBlockingUI: false,
blockingByContentBlockingRTUI: false,
allowList: false,
callback: callbackNonTracking,
@ -334,7 +226,6 @@ this.AntiTracking = {
name,
cookieBehavior: BEHAVIOR_REJECT_FOREIGN,
blockingByContentBlocking: false,
blockingByContentBlockingUI: true,
blockingByContentBlockingRTUI: true,
allowList: true,
callback: callbackNonTracking,
@ -349,22 +240,6 @@ this.AntiTracking = {
name,
cookieBehavior: BEHAVIOR_REJECT_FOREIGN,
blockingByContentBlocking: true,
blockingByContentBlockingUI: false,
blockingByContentBlockingRTUI: true,
allowList: true,
callback: callbackNonTracking,
extraPrefs: [],
expectedBlockingNotifications: false,
runInPrivateWindow,
iframeSandbox,
});
this._createCleanupTask(cleanupFunction);
this._createTask({
name,
cookieBehavior: BEHAVIOR_REJECT_FOREIGN,
blockingByContentBlocking: true,
blockingByContentBlockingUI: true,
blockingByContentBlockingRTUI: true,
allowList: true,
callback: callbackNonTracking,
@ -379,7 +254,6 @@ this.AntiTracking = {
name,
cookieBehavior: BEHAVIOR_REJECT_TRACKER,
blockingByContentBlocking: false,
blockingByContentBlockingUI: true,
blockingByContentBlockingRTUI: true,
allowList: false,
callback: callbackNonTracking,
@ -394,7 +268,6 @@ this.AntiTracking = {
name,
cookieBehavior: BEHAVIOR_REJECT_TRACKER,
blockingByContentBlocking: false,
blockingByContentBlockingUI: true,
blockingByContentBlockingRTUI: false,
allowList: true,
callback: callbackNonTracking,
@ -409,52 +282,6 @@ this.AntiTracking = {
name,
cookieBehavior: BEHAVIOR_REJECT_TRACKER,
blockingByContentBlocking: false,
blockingByContentBlockingUI: true,
blockingByContentBlockingRTUI: false,
allowList: false,
callback: callbackNonTracking,
extraPrefs: [],
expectedBlockingNotifications: false,
runInPrivateWindow,
iframeSandbox,
});
this._createCleanupTask(cleanupFunction);
this._createTask({
name,
cookieBehavior: BEHAVIOR_REJECT_TRACKER,
blockingByContentBlocking: true,
blockingByContentBlockingUI: false,
blockingByContentBlockingRTUI: true,
allowList: false,
callback: callbackNonTracking,
extraPrefs: [],
expectedBlockingNotifications: false,
runInPrivateWindow,
iframeSandbox,
});
this._createCleanupTask(cleanupFunction);
this._createTask({
name,
cookieBehavior: BEHAVIOR_REJECT_TRACKER,
blockingByContentBlocking: true,
blockingByContentBlockingUI: false,
blockingByContentBlockingRTUI: false,
allowList: true,
callback: callbackNonTracking,
extraPrefs: [],
expectedBlockingNotifications: false,
runInPrivateWindow,
iframeSandbox,
});
this._createCleanupTask(cleanupFunction);
this._createTask({
name,
cookieBehavior: BEHAVIOR_REJECT_TRACKER,
blockingByContentBlocking: true,
blockingByContentBlockingUI: false,
blockingByContentBlockingRTUI: false,
allowList: false,
callback: callbackNonTracking,
@ -469,7 +296,6 @@ this.AntiTracking = {
name,
cookieBehavior: BEHAVIOR_REJECT_TRACKER,
blockingByContentBlocking: false,
blockingByContentBlockingUI: true,
blockingByContentBlockingRTUI: true,
allowList: true,
callback: callbackNonTracking,
@ -484,7 +310,6 @@ this.AntiTracking = {
name,
cookieBehavior: BEHAVIOR_REJECT_TRACKER,
blockingByContentBlocking: true,
blockingByContentBlockingUI: false,
blockingByContentBlockingRTUI: true,
allowList: true,
callback: callbackNonTracking,
@ -494,29 +319,12 @@ this.AntiTracking = {
iframeSandbox,
});
this._createCleanupTask(cleanupFunction);
this._createTask({
name,
cookieBehavior: BEHAVIOR_REJECT_TRACKER,
blockingByContentBlocking: true,
blockingByContentBlockingUI: true,
blockingByContentBlockingRTUI: true,
allowList: true,
callback: callbackNonTracking,
extraPrefs: [],
expectedBlockingNotifications: false,
runInPrivateWindow,
iframeSandbox,
});
this._createCleanupTask(cleanupFunction);
} else if (!options.blockingByContentBlocking ||
!options.blockingByContentBlockingUI) {
} else if (!options.blockingByContentBlocking) {
// Don't run this extra test if we are in blocking mode!
this._createTask({
name,
cookieBehavior: options.cookieBehavior,
blockingByContentBlocking: options.blockingByContentBlocking,
blockingByContentBlockingUI: options.blockingByContentBlockingUI,
blockingByContentBlockingRTUI: options.blockingByContentBlockingRTUI,
allowList: options.blockingByAllowList,
callback: callbackNonTracking,
@ -548,14 +356,14 @@ this.AntiTracking = {
},
async _setupTest(win, cookieBehavior, blockingByContentBlocking,
blockingByContentBlockingUI, blockingByContentBlockingRTUI,
blockingByContentBlockingRTUI,
extraPrefs) {
await SpecialPowers.flushPrefEnv();
await SpecialPowers.pushPrefEnv({"set": [
["dom.storage_access.enabled", true],
["browser.contentblocking.allowlist.annotations.enabled", blockingByContentBlockingRTUI],
["browser.contentblocking.allowlist.storage.enabled", blockingByContentBlockingRTUI],
["browser.contentblocking.enabled", blockingByContentBlocking && blockingByContentBlockingUI],
["browser.contentblocking.enabled", blockingByContentBlocking],
["network.cookie.cookieBehavior", cookieBehavior],
["privacy.trackingprotection.enabled", false],
["privacy.trackingprotection.pbmode.enabled", false],
@ -575,7 +383,6 @@ this.AntiTracking = {
add_task(async function() {
info("Starting " + (options.cookieBehavior != BEHAVIOR_ACCEPT ? "blocking" : "non-blocking") + " cookieBehavior (" + options.cookieBehavior + ") and " +
(options.blockingByContentBlocking ? "blocking" : "non-blocking") + " contentBlocking and " +
(options.blockingByContentBlockingUI ? "" : "no") + " contentBlocking UI and " +
(options.blockingByContentBlockingRTUI ? "" : "no") + " contentBlocking third-party cookies UI with" +
(options.allowList ? "" : "out") + " allow list test " + options.name +
" running in a " + (options.runInPrivateWindow ? "private" : "normal") + " window " +
@ -589,7 +396,6 @@ this.AntiTracking = {
await AntiTracking._setupTest(win, options.cookieBehavior,
options.blockingByContentBlocking,
options.blockingByContentBlockingUI,
options.blockingByContentBlockingRTUI,
options.extraPrefs);

Просмотреть файл

@ -24,7 +24,6 @@ AntiTracking.runTest("Image cache - should load the image three times.",
runExtraTests: false,
cookieBehavior,
blockingByContentBlocking,
blockingByContentBlockingUI,
blockingByContentBlockingRTUI,
blockingByAllowList,
callback: async _ => {
@ -51,7 +50,7 @@ AntiTracking.runTest("Image cache - should load the image three times.",
// If we didn't run the non-blocking test, only expect to have seen two images.
// Otherwise, expect to have seen three images.
let expected = (blockingByContentBlocking && blockingByContentBlockingUI) ? 2 : 3;
let expected = blockingByContentBlocking ? 2 : 3;
// We still want to see just expected requests.
add_task(async _ => {