Bug 1373513 - Part 2: Revert Bug 1364367. r=ckerschb
authorYoshi Huang <allstars.chh@mozilla.com>
Tue, 20 Jun 2017 14:11:18 +0800
changeset 368291 38db3cf25d6954a42feea4e4bec82c077e9181dd
parent 368290 3467531e2747be6022ae3c4b74aaf99a70d8264b
child 368292 7704471f1be7385ed88e006165d7a1dd4c723f30
push id92460
push useryhuang@mozilla.com
push dateWed, 12 Jul 2017 03:00:50 +0000
treeherdermozilla-inbound@7704471f1be7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersckerschb
bugs1373513, 1364367
milestone56.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 1373513 - Part 2: Revert Bug 1364367. r=ckerschb Revert what we did in Bug1364367, as data URI for -moz-binding should be same origin.
dom/xbl/test/mochitest.ini
dom/xbl/test/test_bug379959.html
dom/xbl/test/test_bug379959_legacy.html
--- a/dom/xbl/test/mochitest.ini
+++ b/dom/xbl/test/mochitest.ini
@@ -19,17 +19,16 @@ support-files =
   file_bug950909.html
 
 [test_bug310107.html]
 [test_bug366770.html]
 [test_bug371724.xhtml]
 [test_bug372769.html]
 [test_bug378866.xhtml]
 [test_bug379959.html]
-[test_bug379959_legacy.html]
 [test_bug389322.xhtml]
 [test_bug397934.html]
 [test_bug400705.xhtml]
 [test_bug401907.xhtml]
 [test_bug403162.xhtml]
 [test_bug468210.xhtml]
 [test_bug481558.html]
 [test_bug526178.xhtml]
--- a/dom/xbl/test/test_bug379959.html
+++ b/dom/xbl/test/test_bug379959.html
@@ -1,20 +1,16 @@
 <!DOCTYPE HTML>
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=379959
 -->
 <head>
   <title>Test for Bug 379959</title>
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <script>
-    // TODO: Bug 1324406: Treat 'data:' documents as unique, opaque origins
-    SpecialPowers.setBoolPref("security.data_uri.unique_opaque_origin", true);
-  </script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body onload="runTest();">
   <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=379959">Mozilla Bug 379959</a>
   <p id="display">
     Note: In order to re-run this test correctly you need to shift-reload
     rather than simply reload. If you just reload we will restore the
     previous url in the iframe which will result in an extra unexpected
@@ -32,17 +28,17 @@ SimpleTest.waitForExplicitFinish();
 var seenData = false;
 var seenSameOrigin = false;
 var seenCrossOrign = false;
 
 function receiveMessage(e) {
   is(e.origin, "http://mochi.test:8888", "wrong sender!");
 
   if (e.data.test === "dataIsAllowed") {
-    is(e.data.result, 0, "data-url load should have blocked");
+    is(e.data.result, 1, "data-url load should have succeeded");
     seenData = true;
   }
   else if (e.data.test === "sameOriginIsAllowed") {
     is(e.data.result, 1, "same site load should have succeeded");
     seenSameOrigin = true;
   }
   else if (e.data.test === "crossOriginIsBlocked") {
     is(e.data.result, 0, "cross site load should have failed");
deleted file mode 100644
--- a/dom/xbl/test/test_bug379959_legacy.html
+++ /dev/null
@@ -1,73 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=379959
--->
-<head>
-  <title>Test for Bug 379959</title>
-  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <script>
-    // TODO: Bug 1324406: Treat 'data:' documents as unique, opaque origins
-    SpecialPowers.setBoolPref("security.data_uri.unique_opaque_origin", false);
-  </script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body onload="runTest();">
-  <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=379959">Mozilla Bug 379959</a>
-  <p id="display">
-    Note: In order to re-run this test correctly you need to shift-reload
-    rather than simply reload. If you just reload we will restore the
-    previous url in the iframe which will result in an extra unexpected
-    message.
-  </p>
-  <div id="content" style="display: none"></div>
-  <iframe id="dataFrame"></iframe>
-  <iframe id="originFrame"></iframe>
-
-  <pre id="test">
-    <script class="testbody" type="application/javascript">
-
-SimpleTest.waitForExplicitFinish();
-
-var seenData = false;
-var seenSameOrigin = false;
-var seenCrossOrign = false;
-
-function receiveMessage(e) {
-  is(e.origin, "http://mochi.test:8888", "wrong sender!");
-
-  if (e.data.test === "dataIsAllowed") {
-    is(e.data.result, 1, "data-url load should have succeeded");
-    seenData = true;
-  }
-  else if (e.data.test === "sameOriginIsAllowed") {
-    is(e.data.result, 1, "same site load should have succeeded");
-    seenSameOrigin = true;
-  }
-  else if (e.data.test === "crossOriginIsBlocked") {
-    is(e.data.result, 0, "cross site load should have failed");
-    seenCrossOrign = true;
-  }
-  else {
-    ok (false, "unrecognized test");
-  }
-
-  if (seenData && seenSameOrigin && seenCrossOrign) {
-    window.removeEventListener("message", receiveMessage);
-    SimpleTest.finish();
-  }
-}
-
-window.addEventListener("message", receiveMessage);
-
-function runTest() {
-  // make sure data: is allowed
-  document.getElementById('dataFrame').src = "file_bug379959_data.html";
-  // make sure same-origin is allowed but cross site is blocked
-  document.getElementById('originFrame').src = "file_bug379959_cross.html";
-}
-
-    </script>
-  </pre>
-</body>
-</html>