From 87edbe15d3e681f5a842fd08a46ca4b8ff64c7f3 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Mon, 13 Aug 2018 17:34:28 -0400 Subject: [PATCH] Bug 1480899 follow-up - address the review comments properly, DONTBUILD --- .../components/antitracking/test/browser/3rdParty.html | 1 - .../components/antitracking/test/browser/3rdPartyUI.html | 2 -- .../components/antitracking/test/browser/3rdPartyWO.html | 2 -- toolkit/components/antitracking/test/browser/head.js | 8 +++++--- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/toolkit/components/antitracking/test/browser/3rdParty.html b/toolkit/components/antitracking/test/browser/3rdParty.html index 7c29bf534f33..3f0e04d65a4b 100644 --- a/toolkit/components/antitracking/test/browser/3rdParty.html +++ b/toolkit/components/antitracking/test/browser/3rdParty.html @@ -21,7 +21,6 @@ function is(a, b, msg) { onmessage = function(e) { let runnableStr = `(() => {return (${e.data});})();`; let runnable = eval(runnableStr); // eslint-disable-line no-eval - // Phase 1: Here we want to test that a 3rd party context is not blocked if pref is off runnable.call(this, /* Phase */ 1).then(_ => { parent.postMessage({ type: "finish" }, "*"); }); diff --git a/toolkit/components/antitracking/test/browser/3rdPartyUI.html b/toolkit/components/antitracking/test/browser/3rdPartyUI.html index 5e9925563a3a..bf17dc70817b 100644 --- a/toolkit/components/antitracking/test/browser/3rdPartyUI.html +++ b/toolkit/components/antitracking/test/browser/3rdPartyUI.html @@ -21,8 +21,6 @@ function is(a, b, msg) { onmessage = function(e) { let runnableStr = `(() => {return (${e.data.callback});})();`; let runnable = eval(runnableStr); // eslint-disable-line no-eval - // Phase 3: Here we want to test that a third-party context doesn't - // get blocked with user interaction present runnable.call(this, /* Phase */ 3).then(_ => { parent.postMessage({ type: "finish" }, "*"); }); diff --git a/toolkit/components/antitracking/test/browser/3rdPartyWO.html b/toolkit/components/antitracking/test/browser/3rdPartyWO.html index deb10c25c423..493f13048b03 100644 --- a/toolkit/components/antitracking/test/browser/3rdPartyWO.html +++ b/toolkit/components/antitracking/test/browser/3rdPartyWO.html @@ -21,8 +21,6 @@ function is(a, b, msg) { onmessage = function(e) { let runnableStr = `(() => {return (${e.data.blockingCallback});})();`; let runnable = eval(runnableStr); // eslint-disable-line no-eval - // Phase 2: Here we want to test that a third-party context doesn't - // get blocked with when the same origin is opened through window.open(). runnable.call(this, /* Phase */ 2).then(_ => { info("Let's do a window.open()"); return new Promise(resolve => { diff --git a/toolkit/components/antitracking/test/browser/head.js b/toolkit/components/antitracking/test/browser/head.js index 4ec993ac279b..3ee12de0a49b 100644 --- a/toolkit/components/antitracking/test/browser/head.js +++ b/toolkit/components/antitracking/test/browser/head.js @@ -20,17 +20,19 @@ this.AntiTracking = { this._createCleanupTask(cleanupFunction); if (callbackNonTracking) { - // Here we want to test that a 3rd party context is not blocked if pref is off. + // Phase 1: Here we want to test that a 3rd party context is not blocked if pref is off. this._createTask(name, false, callbackNonTracking); this._createCleanupTask(cleanupFunction); - // Permission granted when there is a window.open() + // Phase 2: Here we want to test that a third-party context doesn't + // get blocked with when the same origin is opened through window.open(). if (windowOpenTest) { this._createWindowOpenTask(name, callbackTracking, callbackNonTracking, extraPrefs); this._createCleanupTask(cleanupFunction); } - // Permission granted when there is user-interaction. + // Phase 3: Here we want to test that a third-party context doesn't + // get blocked with user interaction present if (userInteractionTest) { this._createUserInteractionTask(name, callbackTracking, callbackNonTracking, extraPrefs); this._createCleanupTask(cleanupFunction);