Bug 1544131 - Part 2: Remove the script test from browser_referrerDefaultPolicy.js since the <script> element doesn't provide support for the referrerPolicy API; r=baku
authorEhsan Akhgari <ehsan@mozilla.com>
Mon, 15 Apr 2019 08:08:05 +0000
changeset 469665 272dbcb4bc39
parent 469664 2fcb6eeb5afd
child 469666 66ca3efa1ac2
push id35879
push usernerli@mozilla.com
push dateTue, 16 Apr 2019 22:01:48 +0000
treeherdermozilla-central@12a60898fdc1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1544131
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1544131 - Part 2: Remove the script test from browser_referrerDefaultPolicy.js since the <script> element doesn't provide support for the referrerPolicy API; r=baku Differential Revision: https://phabricator.services.mozilla.com/D27394
toolkit/components/antitracking/test/browser/browser_referrerDefaultPolicy.js
--- a/toolkit/components/antitracking/test/browser/browser_referrerDefaultPolicy.js
+++ b/toolkit/components/antitracking/test/browser/browser_referrerDefaultPolicy.js
@@ -8,44 +8,30 @@ async function testOnWindow(private, exp
   let browser = win.gBrowser;
   let tab = browser.selectedTab;
   let b = browser.getBrowserForTab(tab);
   await promiseTabLoadEvent(tab, TEST_TOP_PAGE);
 
   info("Loading tracking scripts and tracking images");
   await ContentTask.spawn(b, null, async function() {
     {
-      let src = content.document.createElement("script");
-      let p = new content.Promise(resolve => { src.onload = resolve; });
-      content.document.body.appendChild(src);
-      src.src = "https://tracking.example.org/browser/toolkit/components/antitracking/test/browser/referrer.sjs?what=script";
-      await p;
-    }
-
-    {
       let img = content.document.createElement("img");
       let p = new content.Promise(resolve => { img.onload = resolve; });
       content.document.body.appendChild(img);
       img.src = "https://tracking.example.org/browser/toolkit/components/antitracking/test/browser/referrer.sjs?what=image";
       await p;
     }
   });
 
   await fetch("https://tracking.example.org/browser/toolkit/components/antitracking/test/browser/referrer.sjs?result&what=image")
     .then(r => r.text())
     .then(text => {
       is(text, expectedReferrer, "We sent the correct Referer header");
     });
 
-  await fetch("https://tracking.example.org/browser/toolkit/components/antitracking/test/browser/referrer.sjs?result&what=script")
-    .then(r => r.text())
-    .then(text => {
-      is(text, expectedReferrer, "We sent the correct Referer header");
-    });
-
   await BrowserTestUtils.closeWindow(win);
 }
 
 add_task(async function() {
   info("Starting referrer default policy test");
 
   await SpecialPowers.flushPrefEnv();
   await SpecialPowers.pushPrefEnv({"set": [