Bug 1480899 follow-up - address the review comments properly, DONTBUILD

This commit is contained in:
Ehsan Akhgari 2018-08-13 17:34:28 -04:00
Родитель a1ed764131
Коммит 87edbe15d3
4 изменённых файлов: 5 добавлений и 8 удалений

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

@ -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" }, "*");
});

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

@ -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" }, "*");
});

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

@ -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 => {

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

@ -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);