dom/tests/mochitest/bugs/test_bug49312.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/tests/mochitest/bugs/test_bug49312.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,47 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +<!--
     1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=49312
     1.8 +-->
     1.9 +<head>
    1.10 +  <title>Test for Bug 49312</title>
    1.11 +  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    1.12 +  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    1.13 +  <script>
    1.14 +    // Hack to set things up so that parent.fakeOpener works the same way for
    1.15 +    // both test subframes.
    1.16 +    var framesToLoad = 2;
    1.17 +    function subframeLoaded(win) {
    1.18 +      is(win.location.href
    1.19 +            .replace(/iframe_bug49312\.html$/, "test_bug49312.html"),
    1.20 +         window.location.href,
    1.21 +         "Unexpected subframe href");
    1.22 +      if (win == opened) {
    1.23 +        opened.close();
    1.24 +      }
    1.25 +      if (--framesToLoad == 0) {
    1.26 +        SimpleTest.finish();
    1.27 +      }
    1.28 +    }
    1.29 +         
    1.30 +  </script>
    1.31 +</head>
    1.32 +<body>
    1.33 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=49312">Mozilla Bug 49312</a>
    1.34 +<p id="display">
    1.35 +  <iframe src="javascript:'<script>location=\'iframe_bug49312.html\'</script>'"></iframe>
    1.36 +</p>
    1.37 +<div id="content" style="display: none">
    1.38 +  
    1.39 +</div>
    1.40 +<pre id="test">
    1.41 +<script type="application/javascript">
    1.42 +
    1.43 +/** Test for Bug 49312 **/
    1.44 +SimpleTest.waitForExplicitFinish();
    1.45 +var opened = window.open("javascript:'<script>location=\\\'iframe_bug49312.html\\\'</" + "script>'", "", "width=100,height=100")
    1.46 +
    1.47 +</script>
    1.48 +</pre>
    1.49 +</body>
    1.50 +</html>

mercurial