Backed out changeset 2450366cf7ca (bug 1891629) for causing win msix mochitest failures
[gecko.git] / dom / url / tests / test_bloburl_location.html
bloba20229bd9ae710278afdf062d48e7942dd579c90
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <title>Test for blobURL in location</title>
6 <script src="/tests/SimpleTest/SimpleTest.js"></script>
7 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
8 </head>
9 <body>
10 <script type="application/javascript">
12 var expectedData = null;
13 onmessage = function(e) {
14 if (expectedData === null) {
15 expectedData = e.data;
16 } else {
17 is(e.data, expectedData, "Pathname should be not be changed");
18 SimpleTest.finish();
23 var ifr = document.createElement("iframe");
24 document.body.appendChild(ifr);
26 ifr.src = "data:text/html,<script>location=URL.createObjectURL(new%20Blob(['<script>parent.postMessage(location.pathname,\"*\");location.pathname=\"foo\";parent.postMessage(location.pathname,\"*\");<\/s' +'cript>'], {type:\"text/html\"}));<\/script>";
28 SimpleTest.waitForExplicitFinish();
30 </script>
31 </body>
32 </html>