Bug 1427726 - remove postMessage tests for jars, r?bz draft
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Mon, 09 Apr 2018 10:09:58 +0100
changeset 780414 28a1468b3b08d74ab0d70ed2ffc8dee1a33917d5
parent 780413 29b7ce0ce1a697092a4057c182c3649e133b0c6a
child 780415 482b3eb780f22d1c2913f2e2ee050e5960851d7e
push id105989
push userbmo:gijskruitbosch+bugs@gmail.com
push dateWed, 11 Apr 2018 11:22:19 +0000
reviewersbz
bugs1427726
milestone61.0a1
Bug 1427726 - remove postMessage tests for jars, r?bz postMessage doesn't really have different origins for file: URIs; to send to them you need "*", and `location.origin` is null. So testing jar:file separately doesn't seem to make much sense, so let's just remove the test now that jar: will only really be usable with a local/file inner URI. MozReview-Commit-ID: 7vvlrugi3xv
dom/tests/mochitest/whatwg/mochitest.ini
dom/tests/mochitest/whatwg/postMessage.jar
dom/tests/mochitest/whatwg/postMessage.jar^headers^
dom/tests/mochitest/whatwg/test_postMessage_jar.html
--- a/dom/tests/mochitest/whatwg/mochitest.ini
+++ b/dom/tests/mochitest/whatwg/mochitest.ini
@@ -1,18 +1,16 @@
 [DEFAULT]
 support-files =
   browserFu.js
   postMessage_chrome_helper.html
   postMessage_closed_helper.html
   postMessage_hash.html
   postMessage_helper.html
   postMessage_idn_helper.html
-  postMessage.jar
-  postMessage.jar^headers^
   postMessage_joined_helper2.html
   postMessage_joined_helper.html
   postMessage_onOther.html
   postMessage_origin_helper.xhtml
   postMessage_override_helper.html
   postMessage_structured_clone_helper.html
   postMessage_structured_clone_helper.js
   postMessage_throw_helper.html
@@ -24,17 +22,16 @@ support-files =
 [test_MessageEvent_dispatchToOther.html]
 [test_MessageEvent.html]
 [test_postMessage_basehref.html]
 [test_postMessage_closed.html]
 skip-if = toolkit == 'android' #bug 894914 - wrong data - got FAIL, expected message
 [test_postMessage_hash.html]
 [test_postMessage.html]
 [test_postMessage_idn.xhtml]
-[test_postMessage_jar.html]
 [test_postMessage_joined.html]
 [test_postMessage_onOther.html]
 [test_postMessage_origin.xhtml]
 [test_postMessage_override.html]
 [test_postMessage_special.xhtml]
 [test_postMessage_structured_clone.html]
 [test_postMessage_throw.html]
 [test_postMessage_transfer.html]
deleted file mode 100644
index d4ee4abc3d19283fd89574bc21bd8a9b7ba571c4..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/dom/tests/mochitest/whatwg/postMessage.jar^headers^
+++ /dev/null
@@ -1,1 +0,0 @@
-Content-Type: application/java-archive
deleted file mode 100644
--- a/dom/tests/mochitest/whatwg/test_postMessage_jar.html
+++ /dev/null
@@ -1,52 +0,0 @@
-<!DOCTYPE html>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=430251
--->
-<head>
-  <title>postMessage's interaction with pages at jar: URIs</title>
-  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>        
-  <script type="text/javascript" src="browserFu.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-  <base href="http://mochi.test:8888/" />
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=430251">Mozilla Bug 430251</a>
-<p id="display"></p>
-<div id="content" style="display: none"></div>
-
-<pre id="test">
-<script class="testbody" type="application/javascript">
-/** Test for Bug 430251 **/
-
-SimpleTest.waitForExplicitFinish();
-
-function receiveMessage(evt)
-{
-  is(evt.origin, "http://mochi.test:8888", "wrong sender");
-  ok(evt.source === window.frames.kid, "wrong source");
-
-  is(evt.data, "finish-test", "wrong data");
-  is(evt.lastEventId, "", "wrong lastEventId");
-
-  SimpleTest.finish();
-}
-
-window.addEventListener("message", receiveMessage);
-
-addLoadEvent(function() {
-  SpecialPowers.pushPrefEnv({"set": [["network.jar.block-remote-files", false]]}, function() {
-    var iframe = document.createElement('iframe');
-    iframe.setAttribute('src', 'jar:http://mochi.test:8888/tests/dom/tests/mochitest/whatwg/postMessage.jar!/postMessage_jar.html');
-    iframe.setAttribute('name', 'kid');
-    document.getElementById("content").appendChild(iframe);
-
-    iframe.onload = function() {
-      window.frames.kid.postMessage("start-test", "http://mochi.test:8888");
-    }
-  });
-});
-</script>
-</pre>
-</body>
-</html>