test_bug49312.html (1320B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=49312 5 --> 6 <head> 7 <title>Test for Bug 49312</title> 8 <script src="/tests/SimpleTest/SimpleTest.js"></script> 9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 10 <script> 11 // Hack to set things up so that parent.fakeOpener works the same way for 12 // both test subframes. 13 var framesToLoad = 2; 14 function subframeLoaded(win) { 15 is(win.location.href 16 .replace(/iframe_bug49312\.html$/, "test_bug49312.html"), 17 window.location.href, 18 "Unexpected subframe href"); 19 if (win == opened) { 20 opened.close(); 21 } 22 if (--framesToLoad == 0) { 23 SimpleTest.finish(); 24 } 25 } 26 27 </script> 28 </head> 29 <body> 30 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=49312">Mozilla Bug 49312</a> 31 <p id="display"> 32 <iframe src="javascript:'<script>location=\'iframe_bug49312.html\'</script>'"></iframe> 33 </p> 34 <div id="content" style="display: none"> 35 36 </div> 37 <pre id="test"> 38 <script type="application/javascript"> 39 40 /** Test for Bug 49312 */ 41 SimpleTest.waitForExplicitFinish(); 42 var opened = window.open("javascript:'<script>location=\\\'iframe_bug49312.html\\\'</" + "script>'", "", "width=100,height=100") 43 44 </script> 45 </pre> 46 </body> 47 </html>