Bug 1503681 - rel=noopener implicit for target=_blank in anchor and area elements when no rel attribute is set - fix tests, r=me
authorAndrea Marchesini <amarchesini@mozilla.com>
Wed, 28 Nov 2018 08:22:06 +0100
changeset 448467 e6a4330eb15f1536f505d6794c4efac3ca9fcf7e
parent 448466 45e6f25036c57ad42140e749bb2927e5365d038c
child 448483 834ac503d67e50f15dc1ca15e43cd700c571ba81
push id110182
push useramarchesini@mozilla.com
push dateWed, 28 Nov 2018 09:44:41 +0000
treeherdermozilla-inbound@e6a4330eb15f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1503681
milestone65.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 1503681 - rel=noopener implicit for target=_blank in anchor and area elements when no rel attribute is set - fix tests, r=me
accessible/tests/mochitest/actions/test_anchors.html
accessible/tests/mochitest/actions/test_aria.html
accessible/tests/mochitest/actions/test_controls.html
accessible/tests/mochitest/actions/test_general.html
accessible/tests/mochitest/actions/test_general.xul
accessible/tests/mochitest/actions/test_keys.html
accessible/tests/mochitest/actions/test_keys_menu.xul
accessible/tests/mochitest/actions/test_link.html
accessible/tests/mochitest/actions/test_media.html
accessible/tests/mochitest/actions/test_select.html
accessible/tests/mochitest/actions/test_tree.xul
accessible/tests/mochitest/actions/test_treegrid.xul
browser/base/content/test/general/browser_testOpenNewRemoteTabsFromNonRemoteBrowsers.js
browser/components/extensions/test/browser/webNav_createdTargetSource.html
browser/components/extensions/test/browser/webNav_createdTargetSource_subframe.html
dom/base/test/test_bug666604.html
dom/html/test/file_bug1108547-3.html
dom/html/test/file_fullscreen-newtab.html
dom/html/test/file_iframe_sandbox_c_if4.html
dom/html/test/file_iframe_sandbox_h_if1.html
dom/html/test/file_iframe_sandbox_k_if1.html
dom/html/test/file_iframe_sandbox_k_if4.html
dom/html/test/file_iframe_sandbox_k_if8.html
dom/html/test/file_window_open_close_outer.html
dom/security/test/mixedcontentblocker/file_frameNavigation_blankTarget.html
dom/tests/browser/test_noopener_source.html
dom/tests/mochitest/bugs/test_bug458091.html
mobile/android/geckoview/src/androidTest/assets/www/newSession.html
testing/web-platform/meta/FileAPI/url/__dir__.ini
testing/web-platform/meta/content-security-policy/unsafe-hashes/__dir__.ini
testing/web-platform/meta/html/browsers/windows/auxiliary-browsing-contexts/__dir__.ini
testing/web-platform/meta/html/semantics/embedded-content/the-iframe-element/__dir__.ini
toolkit/components/extensions/test/mochitest/head_webrequest.js
toolkit/components/extensions/test/mochitest/test_ext_new_tab_processType.html
uriloader/exthandler/tests/mochitest/download_page.html
--- a/accessible/tests/mochitest/actions/test_anchors.html
+++ b/accessible/tests/mochitest/actions/test_anchors.html
@@ -71,27 +71,27 @@
 
     SimpleTest.waitForExplicitFinish();
     addA11yLoadEvent(doTest);
   </script>
 </head>
 
 <body>
 
-  <a target="_blank"
+  <a target="_blank" rel="opener"
      href="https://bugzilla.mozilla.org/show_bug.cgi?id=506389"
      title="Some same page links do not fire EVENT_SYSTEM_SCROLLINGSTART">
     Mozilla Bug 506389
   </a><br>
-  <a target="_blank"
+  <a target="_blank" rel="opener"
      href="https://bugzilla.mozilla.org/show_bug.cgi?id=437607"
      title="Clicking the 'Skip to main content' link once works, second time fails to initiate a V cursor jump">
     Mozilla Bug 437607
   </a><br>
-  <a target="_blank"
+  <a target="_blank" rel="opener"
      href="https://bugzilla.mozilla.org/show_bug.cgi?id=519303"
      title="Same page links to targets with content fires scrolling start accessible event on leaf text node">
     Mozilla Bug 519303
   </a>
 
   <p id="display"></p>
   <div id="content" style="display: none"></div>
   <pre id="test">
--- a/accessible/tests/mochitest/actions/test_aria.html
+++ b/accessible/tests/mochitest/actions/test_aria.html
@@ -130,17 +130,17 @@
 
     SimpleTest.waitForExplicitFinish();
     addA11yLoadEvent(doTest);
   </script>
 </head>
 
 <body>
 
-  <a target="_blank"
+  <a target="_blank" rel="opener"
      href="https://bugzilla.mozilla.org/show_bug.cgi?id=410765"
      title="nsIAccessible actions testing">
     Mozilla Bug 410765
   </a>
   <p id="display"></p>
   <div id="content" style="display: none"></div>
   <pre id="test">
   </pre>
--- a/accessible/tests/mochitest/actions/test_controls.html
+++ b/accessible/tests/mochitest/actions/test_controls.html
@@ -72,17 +72,17 @@
 
     SimpleTest.waitForExplicitFinish();
     addA11yLoadEvent(doTest);
   </script>
 </head>
 
 <body>
 
-  <a target="_blank"
+  <a target="_blank" rel="opener"
      href="https://bugzilla.mozilla.org/show_bug.cgi?id=477975"
      title="nsIAccessible actions testing">
     Mozilla Bug 477975
   </a>
   <p id="display"></p>
   <div id="content" style="display: none"></div>
   <pre id="test">
   </pre>
--- a/accessible/tests/mochitest/actions/test_general.html
+++ b/accessible/tests/mochitest/actions/test_general.html
@@ -58,27 +58,27 @@
 
     SimpleTest.waitForExplicitFinish();
     addA11yLoadEvent(doTest);
   </script>
 </head>
 
 <body>
 
-  <a target="_blank"
+  <a target="_blank" rel="opener"
      href="https://bugzilla.mozilla.org/show_bug.cgi?id=523789"
      title="nsHTMLLiAccessible shouldn't be inherited from linkable accessible">
     Mozilla Bug 523789
   </a><br>
-  <a target="_blank"
+  <a target="_blank" rel="opener"
      href="https://bugzilla.mozilla.org/show_bug.cgi?id=423409"
      title="Expose click action if mouseup and mousedown are registered">
     Mozilla Bug 423409
   </a>
-  <a target="_blank"
+  <a target="_blank" rel="opener"
      href="https://bugzilla.mozilla.org/show_bug.cgi?id=659620"
      title="hang when trying to edit a page on wikimo with NVDA running">
     Mozilla Bug 659620
   </a>
   <p id="display"></p>
   <div id="content" style="display: none"></div>
   <pre id="test">
   </pre>
--- a/accessible/tests/mochitest/actions/test_general.xul
+++ b/accessible/tests/mochitest/actions/test_general.xul
@@ -87,22 +87,22 @@
 
     SimpleTest.waitForExplicitFinish();
     addA11yLoadEvent(doTest);
   ]]>
   </script>
 
   <hbox flex="1" style="overflow: auto;">
     <body xmlns="http://www.w3.org/1999/xhtml">
-      <a target="_blank"
+      <a target="_blank" rel="opener"
          href="https://bugzilla.mozilla.org/show_bug.cgi?id=410765"
          title="nsIAccessible actions testing">
         Mozilla Bug 410765
       </a>
-      <a target="_blank"
+      <a target="_blank" rel="opener"
          href="https://bugzilla.mozilla.org/show_bug.cgi?id=504252"
          title="Expose STATE_HASPOPUP on XUL elements that have an @popup attribute">
         Mozilla Bug 504252
       </a><br/>
       <p id="display"></p>
       <div id="content" style="display: none">
       </div>
       <pre id="test">
--- a/accessible/tests/mochitest/actions/test_keys.html
+++ b/accessible/tests/mochitest/actions/test_keys.html
@@ -33,17 +33,17 @@
     SimpleTest.waitForExplicitFinish();
     addA11yLoadEvent(doTest);
   </script>
 
 </head>
 
 <body>
 
-  <a target="_blank"
+  <a target="_blank" rel="opener"
      href="https://bugzilla.mozilla.org/show_bug.cgi?id=381599"
      title="Inverse relations cache">
     Mozilla Bug 381599
   </a>
   <p id="display"></p>
   <div id="content" style="display: none"></div>
   <pre id="test">
   </pre>
--- a/accessible/tests/mochitest/actions/test_keys_menu.xul
+++ b/accessible/tests/mochitest/actions/test_keys_menu.xul
@@ -61,17 +61,17 @@
 
     SimpleTest.waitForExplicitFinish();
     addA11yLoadEvent(doTest);
   ]]>
   </script>
 
   <hbox flex="1" style="overflow: auto;">
     <body xmlns="http://www.w3.org/1999/xhtml">
-      <a target="_blank"
+      <a target="_blank" rel="opener"
          href="https://bugzilla.mozilla.org/show_bug.cgi?id=672092"
          title="Reorganize access key and keyboard shortcut handling code">
         Mozilla Bug 672092
       </a><br/>
       <p id="display"></p>
       <div id="content" style="display: none">
       </div>
       <pre id="test">
--- a/accessible/tests/mochitest/actions/test_link.html
+++ b/accessible/tests/mochitest/actions/test_link.html
@@ -111,27 +111,27 @@
 
     SimpleTest.waitForExplicitFinish();
     addA11yLoadEvent(doTest);
   </script>
 </head>
 
 <body>
 
-  <a target="_blank"
+  <a target="_blank" rel="opener"
      href="https://bugzilla.mozilla.org/show_bug.cgi?id=423409"
      title="Expose click action if mouseup and mousedown are registered">
     Mozilla Bug 423409
   </a>
   <p id="display"></p>
   <div id="content" style="display: none"></div>
   <pre id="test">
   </pre>
 
-  <a href="about:mozilla" id="link1" target="_blank">
+  <a href="about:mozilla" id="link1" target="_blank" rel="opener">
     <img src="../moz.png" id="img1">
   </a>
   <a id="link2" onmousedown="">
     <img src="../moz.png" id="img2">
   </a>
   <a id="link3" onclick="">
     <img src="../moz.png" id="img3">
   </a>
--- a/accessible/tests/mochitest/actions/test_media.html
+++ b/accessible/tests/mochitest/actions/test_media.html
@@ -111,17 +111,17 @@ https://bugzilla.mozilla.org/show_bug.cg
     }
 
     SimpleTest.waitForExplicitFinish();
     addA11yLoadEvent(loadAudioSource);
   </script>
 </head>
 <body>
 
-  <a target="_blank"
+  <a target="_blank" rel="opener"
      title="Expose HTML5 video and audio elements' embedded controls through accessibility APIs"
      href="https://bugzilla.mozilla.org/show_bug.cgi?id=483573">Mozilla Bug 483573</a>
   <p id="display"></p>
   <div id="content" style="display: none"></div>
   <pre id="test">
   </pre>
 
   <audio id="audio" controls="true"></audio>
--- a/accessible/tests/mochitest/actions/test_select.html
+++ b/accessible/tests/mochitest/actions/test_select.html
@@ -76,17 +76,17 @@
 
     SimpleTest.waitForExplicitFinish();
     addA11yLoadEvent(doTest);
   </script>
 </head>
 
 <body>
 
-  <a target="_blank"
+  <a target="_blank" rel="opener"
      href="https://bugzilla.mozilla.org/show_bug.cgi?id=673958"
      title="Rework accessible focus handling">
     Mozilla Bug 673958
   </a>
   <p id="display"></p>
   <div id="content" style="display: none"></div>
   <pre id="test">
   </pre>
--- a/accessible/tests/mochitest/actions/test_tree.xul
+++ b/accessible/tests/mochitest/actions/test_tree.xul
@@ -95,17 +95,17 @@
 
     SimpleTest.waitForExplicitFinish();
     addA11yXULTreeLoadEvent(doTest, "tree", new nsTreeTreeView());
   ]]>
   </script>
 
   <hbox flex="1" style="overflow: auto;">
     <body xmlns="http://www.w3.org/1999/xhtml">
-      <a target="_blank"
+      <a target="_blank" rel="opener"
          href="https://bugzilla.mozilla.org/show_bug.cgi?id=503727"
          title="Reorganize implementation of XUL tree accessibility">
         Mozilla Bug 503727
       </a><br/>
       <p id="display"></p>
       <div id="content" style="display: none">
       </div>
       <pre id="test">
--- a/accessible/tests/mochitest/actions/test_treegrid.xul
+++ b/accessible/tests/mochitest/actions/test_treegrid.xul
@@ -160,17 +160,17 @@
 
     SimpleTest.waitForExplicitFinish();
     addA11yLoadEvent(doTest);
   ]]>
   </script>
 
   <hbox flex="1" style="overflow: auto;">
     <body xmlns="http://www.w3.org/1999/xhtml">
-      <a target="_blank"
+      <a target="_blank" rel="opener"
          href="https://bugzilla.mozilla.org/show_bug.cgi?id=503727"
          title="Reorganize implementation of XUL tree accessibility">
         Mozilla Bug 503727
       </a><br/>
       <p id="display"></p>
       <div id="content" style="display: none">
       </div>
       <pre id="test">
--- a/browser/base/content/test/general/browser_testOpenNewRemoteTabsFromNonRemoteBrowsers.js
+++ b/browser/base/content/test/general/browser_testOpenNewRemoteTabsFromNonRemoteBrowsers.js
@@ -6,17 +6,17 @@ const OPEN_LOCATION_PREF = "browser.link
 const NON_REMOTE_PAGE = "about:welcomeback";
 
 ChromeUtils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
 
 requestLongerTimeout(2);
 
 function frame_script() {
   content.document.body.innerHTML = `
-    <a href="http://example.com/" target="_blank" id="testAnchor">Open a window</a>
+    <a href="http://example.com/" target="_blank" rel="opener" id="testAnchor">Open a window</a>
   `;
 
   let element = content.document.getElementById("testAnchor");
   element.click();
 }
 
 /**
  * Takes some browser in some window, and forces that browser
--- a/browser/components/extensions/test/browser/webNav_createdTargetSource.html
+++ b/browser/components/extensions/test/browser/webNav_createdTargetSource.html
@@ -28,17 +28,17 @@
         <a id="test-create-new-window-from-mouse-click"
            href="webNav_createdTarget.html#new-window-from-mouse-click">
           Open a target page in a new window from mouse click
         </a>
       </li>
       <li>
         <a id="test-create-new-tab-from-targetblank-click"
            href="webNav_createdTarget.html#new-tab-from-targetblank-click"
-           target="_blank">
+           target="_blank" rel="opener">
           Open a target page in a new tab from click to link with target="_blank"
         </a>
       </li>
     </ul>
 
     <iframe src="webNav_createdTargetSource_subframe.html" style="width: 100%; height: 100%;">
     </iframe>
   </body>
--- a/browser/components/extensions/test/browser/webNav_createdTargetSource_subframe.html
+++ b/browser/components/extensions/test/browser/webNav_createdTargetSource_subframe.html
@@ -28,15 +28,15 @@
         <a id="test-create-new-window-from-mouse-click-subframe"
            href="webNav_createdTarget.html#new-window-from-mouse-click-subframe">
           Open a target page in a new window from mouse click (subframe)
         </a>
       </li>
       <li>
         <a id="test-create-new-tab-from-targetblank-click-subframe"
            href="webNav_createdTarget.html#new-tab-from-targetblank-click-subframe"
-           target="_blank">
+           target="_blank" rel="opener">
           Open a target page in a new tab from click to link with target="_blank"
         </a>
       </li>
     </ul>
   </body>
 </html>
--- a/dom/base/test/test_bug666604.html
+++ b/dom/base/test/test_bug666604.html
@@ -111,27 +111,29 @@ function test6() {
       SpecialPowers.pushPrefEnv({"set":[["dom.disable_open_during_load", false]]}, test7);
     }
   dispatchDOMActivate(testlink);
 }
 
 function test7() {
   testlink.href = "javascript:opener.activationListener(); window.close();";
   testlink.target = "_blank";
+  testlink.rel = "opener";
   activationListener =
     function() {
       ok(true, "Click() should activate a link");
       SpecialPowers.pushPrefEnv({"set":[["dom.disable_open_during_load", true]]}, test8);
     }
   testlink.click();
 }
 
 function test8() {
   testlink.href = "javascript:opener.activationListener(); window.close();";
   testlink.target = "_blank";
+  testlink.rel = "opener";
   activationListener =
     function() {
       ok(false, "Click() should not activate a link");
     }
   testlink.click();
   SimpleTest.executeSoon(SimpleTest.finish);
 }
 addLoadEvent(test1);
--- a/dom/html/test/file_bug1108547-3.html
+++ b/dom/html/test/file_bug1108547-3.html
@@ -1,5 +1,5 @@
 <!DOCTYPE html>
 <body onload="document.querySelector('a').click();">
-<a href="javascript:opener.document.getElementById('result').textContent = document.cookie;" target="_blank">test</a>
+<a href="javascript:opener.document.getElementById('result').textContent = document.cookie;" target="_blank" rel="opener">test</a>
 <div id="result">not tested yet</div>
 </body>
--- a/dom/html/test/file_fullscreen-newtab.html
+++ b/dom/html/test/file_fullscreen-newtab.html
@@ -1,4 +1,4 @@
 <!DOCTYPE html>
 <meta charset="UTF-8">
-<a id="link" href="about:blank" target="_blank"
+<a id="link" href="about:blank" target="_blank" rel="opener"
    onclick="document.body.requestFullscreen()">Click here</a>
--- a/dom/html/test/file_iframe_sandbox_c_if4.html
+++ b/dom/html/test/file_iframe_sandbox_c_if4.html
@@ -25,12 +25,12 @@
     }
 
     ok(threw, "window.open threw a JS exception and was not allowed");
   }
 </script>
 <body onLoad="doStuff()">
   I am sandboxed but with "allow-scripts allow-same-origin"
 
-  <a href="file_iframe_sandbox_open_window_fail.html" target="_blank" id="target_blank">open window</a>
+  <a href="file_iframe_sandbox_open_window_fail.html" target="_blank" id="target_blank" rel="opener">open window</a>
   <a href="file_iframe_sandbox_open_window_fail.html" target="BC341604" id="target_BC341604">open window</a>
 </body>
 </html>
--- a/dom/html/test/file_iframe_sandbox_h_if1.html
+++ b/dom/html/test/file_iframe_sandbox_h_if1.html
@@ -23,12 +23,12 @@
     } catch(e) {
       ok(false, "Test 3: iframes sandboxed with allow-popups, should be able to open windows");
     }
   }
 </script>
 <body onLoad="doStuff()">
   I am sandboxed but with "allow-popups allow-scripts allow-same-origin"
 
-  <a href="file_iframe_sandbox_open_window_pass.html" target="_blank" id="target_blank">open window</a>
+  <a href="file_iframe_sandbox_open_window_pass.html" target="_blank" rel="opener" id="target_blank">open window</a>
   <a href="file_iframe_sandbox_open_window_pass.html?BC766282" target="BC766282" id="target_BC766282">open window</a>
 </body>
 </html>
--- a/dom/html/test/file_iframe_sandbox_k_if1.html
+++ b/dom/html/test/file_iframe_sandbox_k_if1.html
@@ -36,12 +36,12 @@
     windowsToClose.push(window.open("file_iframe_sandbox_k_if2.html"));
   }
 </script>
 <body onLoad="doStuff()">
   I am navigated to from file_iframe_sandbox_k_if8.html.
   This was opened in an iframe with "allow-scripts allow-popups allow-same-origin".
   However allow-same-origin was removed from the iframe before navigating to me,
   so I should only have "allow-scripts allow-popups" in force.
-  <a href="file_iframe_sandbox_k_if2.html" target="_blank" id="target_blank_if2">open window</a>
+  <a href="file_iframe_sandbox_k_if2.html" target="_blank" id="target_blank_if2" rel="opener">open window</a>
   <a href="file_iframe_sandbox_k_if2.html" target="BC766282_if2" id="target_BC766282_if2">open window</a>
 </body>
 </html>
--- a/dom/html/test/file_iframe_sandbox_k_if4.html
+++ b/dom/html/test/file_iframe_sandbox_k_if4.html
@@ -20,15 +20,15 @@
     sendMouseEvent({type:'click'}, 'target_BC766282_if7');
 
     window.open("file_iframe_sandbox_k_if7.html");
   }
 </script>
 
 <body onLoad="doStuff()">
   I am sandboxed with "allow-scripts allow-popups allow-same-origin allow-forms allow-top-navigation".
-  <a href="file_iframe_sandbox_k_if5.html" target="_blank" id="target_blank_if5">open window</a>
+  <a href="file_iframe_sandbox_k_if5.html" target="_blank" id="target_blank_if5" rel="opener">open window</a>
   <a href="file_iframe_sandbox_k_if5.html" target="BC766282_if5" id="target_BC766282_if5">open window</a>
 
-  <a href="file_iframe_sandbox_k_if7.html" target="_blank" id="target_blank_if7">open window</a>
+  <a href="file_iframe_sandbox_k_if7.html" target="_blank" id="target_blank_if7" rel="opener">open window</a>
   <a href="file_iframe_sandbox_k_if7.html" target="BC766282_if7" id="target_BC766282_if7">open window</a>
 </body>
 </html>
--- a/dom/html/test/file_iframe_sandbox_k_if8.html
+++ b/dom/html/test/file_iframe_sandbox_k_if8.html
@@ -21,16 +21,16 @@
   window.doSubOpens = doSubOpens;
 </script>
 
 <body>
   I am sandboxed but with "allow-scripts allow-popups allow-same-origin".
   After my initial load, "allow-same-origin" is removed and then I open file_iframe_sandbox_k_if9.html
   in 3 different ways, which attemps to call a function in my parent.
   This should succeed since the new sandbox flags shouldn't have taken affect on me until I'm reloaded.
-  <a href="file_iframe_sandbox_k_if9.html" target="_blank" id="target_blank_if9">open window</a>
+  <a href="file_iframe_sandbox_k_if9.html" target="_blank" id="target_blank_if9" rel="opener">open window</a>
   <a href="file_iframe_sandbox_k_if9.html" target="BC766282_if9" id="target_BC766282_if9">open window</a>
 
   Now navigate to file_iframe_sandbox_k_if1.html to do tests for a sandbox opening a window
   when only "allow-scripts allow-popups" are specified.
   <a href="file_iframe_sandbox_k_if1.html" id="target_if1">navigate to if1</a>
 </body>
 </html>
--- a/dom/html/test/file_window_open_close_outer.html
+++ b/dom/html/test/file_window_open_close_outer.html
@@ -1,5 +1,5 @@
 <html>
 <body>
-<a id="link" href="file_window_open_close_inner.html" target="_blank" onclick="setTimeout(function () { window.close() }, 0)">link</a>
+<a id="link" href="file_window_open_close_inner.html" target="_blank" rel="opener" onclick="setTimeout(function () { window.close() }, 0)">link</a>
 </html>
 </body>
--- a/dom/security/test/mixedcontentblocker/file_frameNavigation_blankTarget.html
+++ b/dom/security/test/mixedcontentblocker/file_frameNavigation_blankTarget.html
@@ -4,17 +4,17 @@
 Tests for Mixed Content Blocker - Opening link with _blank target in an https iframe.
 https://bugzilla.mozilla.org/show_bug.cgi?id=841850
 -->
 <head>
   <meta charset="utf-8">
   <title>Tests for Mixed Content Frame Navigation</title>
 </head>
 <body>
-<a href="http://example.com/tests/dom/security/test/mixedcontentblocker/file_frameNavigation_innermost.html?blankTarget" id="blankTarget" target="_blank">Go to http site</a>
+<a href="http://example.com/tests/dom/security/test/mixedcontentblocker/file_frameNavigation_innermost.html?blankTarget" id="blankTarget" target="_blank" rel="opener">Go to http site</a>
 
 <script>
   var blankTarget = document.getElementById("blankTarget");
   blankTarget.click();
 
   var observer = {
     observe: function(subject, topic, data) {
       //Subject location check added for Bug 1391823 to avoid removeAsyncObserver from being called multiple times
--- a/dom/tests/browser/test_noopener_source.html
+++ b/dom/tests/browser/test_noopener_source.html
@@ -1,9 +1,9 @@
-<a id="test1" href="test_noopener_target.html" target="_blank">1</a>
+<a id="test1" href="test_noopener_target.html" target="_blank" rel="opener">1</a>
 <a id="test2" href="test_noopener_target.html" target="_blank" rel="noopener">2</a>
 <a id="test3" href="test_noopener_target.html" target="_blank" rel="noreferrer">3</a>
 
 <a id="test4" href="test_noopener_target.html" target="uniquename1">4</a>
 <a id="test5" href="test_noopener_target.html" target="uniquename2" rel="noopener">5</a>
 <a id="test6" href="test_noopener_target.html" target="uniquename3" rel="noreferrer">6</a>
 
 <a id="test7" onclick="window.open('test_noopener_target.html', '_blank')">7</a>
--- a/dom/tests/mochitest/bugs/test_bug458091.html
+++ b/dom/tests/mochitest/bugs/test_bug458091.html
@@ -11,18 +11,18 @@ https://bugzilla.mozilla.org/show_bug.cg
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=458091">Mozilla Bug 458091</a>
 
 <div id="content" style="display: none">
 
 </div>
 <pre id="test">
-<a id="testlink1" target="_blank" href="javascript:window.opener.finish(sessionStorage['testItem']);window.close();">Javascript Link</a>
-<a id="testlink2" target="_blank" href="bug458091_child.html">HTTP Link</a>
+<a id="testlink1" target="_blank" rel="opener" href="javascript:window.opener.finish(sessionStorage['testItem']);window.close();">Javascript Link</a>
+<a id="testlink2" target="_blank" rel="opener" href="bug458091_child.html">HTTP Link</a>
 <a id="testlink3" target="alreadyOpened" href="bug458091_child.html">Target Link</a>
 <script type="application/javascript">
 
 /** Test for Bug 458091 **/
 
 var gTestWin;
 var gRunningTests = 0;
 
--- a/mobile/android/geckoview/src/androidTest/assets/www/newSession.html
+++ b/mobile/android/geckoview/src/androidTest/assets/www/newSession.html
@@ -1,7 +1,7 @@
 <html>
     <head><title>Hello, world!</title></head>
     <body>
-        <a id="targetBlankLink" target="_blank" href="newSession_child.html">target="_blank"</a>
+        <a id="targetBlankLink" target="_blank" rel="opener" href="newSession_child.html">target="_blank"</a>
         <a id="noOpenerLink" target="_blank" rel="noopener" href="http://example.com">rel="noopener"</a>
     </body>
 </html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/FileAPI/url/__dir__.ini
@@ -0,0 +1,1 @@
+prefs: [dom.targetBlankNoOpener.enabled:false]
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/content-security-policy/unsafe-hashes/__dir__.ini
@@ -0,0 +1,1 @@
+prefs: [dom.targetBlankNoOpener.enabled:false]
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/html/browsers/windows/auxiliary-browsing-contexts/__dir__.ini
@@ -0,0 +1,1 @@
+prefs: [dom.targetBlankNoOpener.enabled:false]
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/html/semantics/embedded-content/the-iframe-element/__dir__.ini
@@ -0,0 +1,1 @@
+prefs: [dom.targetBlankNoOpener.enabled:false]
--- a/toolkit/components/extensions/test/mochitest/head_webrequest.js
+++ b/toolkit/components/extensions/test/mochitest/head_webrequest.js
@@ -333,16 +333,17 @@ function addStylesheet(file) {
 }
 
 /* exported addLink */
 
 function addLink(file) {
   let a = document.createElement("a");
   a.setAttribute("href", file);
   a.setAttribute("target", "_blank");
+  a.setAttribute("rel", "opener");
   document.body.appendChild(a);
   return a;
 }
 
 /* exported addImage */
 
 function addImage(file) {
   let img = document.createElement("img");
--- a/toolkit/components/extensions/test/mochitest/test_ext_new_tab_processType.html
+++ b/toolkit/components/extensions/test/mochitest/test_ext_new_tab_processType.html
@@ -37,17 +37,17 @@ add_task(async function test_target_blan
 
       web_accessible_resources: ["iframe.html"],
     },
     files: {
       "iframe.html": `<!DOCTYPE html>
         <html>
           <head><meta charset="utf-8"></html>
           <body>
-            <a href="${linkURL}" target="_blank" id="link">link</a>
+            <a href="${linkURL}" target="_blank" id="link" rel="opener">link</a>
           </body>
         </html>`,
     },
     background() {
       browser.test.sendMessage("frame_url", browser.runtime.getURL("iframe.html"));
     },
   });
 
--- a/uriloader/exthandler/tests/mochitest/download_page.html
+++ b/uriloader/exthandler/tests/mochitest/download_page.html
@@ -8,12 +8,12 @@
   <script type="text/javascript">
     function launch_download() {
       window.open("download.sjs", "_blank", "height=100,width=100");
     }
   </script>
 </head>
 <body>
   <a href="download.bin" id="regular_load">regular load</a>
-  <a href="download.bin" id="target_blank" target="_blank">target blank</a>
+  <a href="download.bin" id="target_blank" target="_blank" rel="opener">target blank</a>
   <a href="#" onclick="launch_download(); return false" id="new_window">new window</a>
   <a href="#" onclick="window.open('download_page.html?newwin'); return false" id="open_in_new_tab">click to reopen</a>
 </body>