From 73345dc5599f38de3ffcde3c3dd31769097fa83e Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Tue, 27 Aug 2019 21:27:50 +0300 Subject: [PATCH] Bug 1540117 - Part 4: Fix browser_webconsole_trackingprotection_errors.js by ensuring that the test page does set a cookie. r=fix CLOSED TREE Differential Revision: https://phabricator.services.mozilla.com//D43652 --HG-- extra : histedit_source : 296fb0ecbd7b1540bba93ea1d8490629a04fa91a --- devtools/client/webconsole/test/browser/browser.ini | 1 + .../browser_webconsole_trackingprotection_errors.js | 9 +++++---- .../client/webconsole/test/browser/cookieSetter.html | 7 +++++++ .../browser/test-trackingprotection-securityerrors.html | 2 +- 4 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 devtools/client/webconsole/test/browser/cookieSetter.html diff --git a/devtools/client/webconsole/test/browser/browser.ini b/devtools/client/webconsole/test/browser/browser.ini index b080a2595760..fda19c734231 100644 --- a/devtools/client/webconsole/test/browser/browser.ini +++ b/devtools/client/webconsole/test/browser/browser.ini @@ -6,6 +6,7 @@ support-files = code_bundle_invalidmap.js.map code_bundle_nosource.js code_bundle_nosource.js.map + cookieSetter.html head.js sjs_cors-test-server.sjs sjs_slow-response-test-server.sjs diff --git a/devtools/client/webconsole/test/browser/browser_webconsole_trackingprotection_errors.js b/devtools/client/webconsole/test/browser/browser_webconsole_trackingprotection_errors.js index eef925845c3e..4e30e54b75d2 100644 --- a/devtools/client/webconsole/test/browser/browser_webconsole_trackingprotection_errors.js +++ b/devtools/client/webconsole/test/browser/browser_webconsole_trackingprotection_errors.js @@ -7,12 +7,13 @@ "use strict"; requestLongerTimeout(2); -const TEST_FILE = - "browser/devtools/client/webconsole/test/browser/" + - "test-trackingprotection-securityerrors.html"; +const TEST_PATH = "browser/devtools/client/webconsole/test/browser/"; +const TEST_FILE = TEST_PATH + "test-trackingprotection-securityerrors.html"; const TEST_URI = "http://example.com/" + TEST_FILE; const TRACKER_URL = "http://tracking.example.org/"; -const BLOCKED_URL = `\u201c${TRACKER_URL}\u201d`; +const BLOCKED_URL = `\u201c${TRACKER_URL + + TEST_PATH + + "cookieSetter.html"}\u201d`; const COOKIE_BEHAVIOR_PREF = "network.cookie.cookieBehavior"; const COOKIE_BEHAVIORS = { diff --git a/devtools/client/webconsole/test/browser/cookieSetter.html b/devtools/client/webconsole/test/browser/cookieSetter.html new file mode 100644 index 000000000000..58b061ca436f --- /dev/null +++ b/devtools/client/webconsole/test/browser/cookieSetter.html @@ -0,0 +1,7 @@ + + + + diff --git a/devtools/client/webconsole/test/browser/test-trackingprotection-securityerrors.html b/devtools/client/webconsole/test/browser/test-trackingprotection-securityerrors.html index bb22cd3d14d3..da84fe1ab19f 100644 --- a/devtools/client/webconsole/test/browser/test-trackingprotection-securityerrors.html +++ b/devtools/client/webconsole/test/browser/test-trackingprotection-securityerrors.html @@ -7,7 +7,7 @@ - +