test_sibling-matching-parent.html (2003B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <script src="/tests/SimpleTest/SimpleTest.js"></script> 5 <script src="/tests/SimpleTest/EventUtils.js"></script> 6 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 7 <script type="text/javascript" src="NavigationUtils.js"></script> 8 <style type="text/css"> 9 iframe { width: 90%; height: 50px; } 10 </style> 11 <script> 12 window.onload = async function() { 13 document.getElementById("active").innerHTML = 14 '<iframe src="navigate.html#parent.frames[0],location"></iframe>' + 15 '<iframe src="navigate.html#child1,open"></iframe>' + 16 '<iframe src="navigate.html#child2,form"></iframe>' + 17 '<iframe src="navigate.html#child3,hyperlink"></iframe>'; 18 19 await waitForFinishedFrames(4); 20 21 await isNavigated(frames[0], "Should be able to navigate sibling with on-domain parent by setting location."); 22 await isNavigated(frames[1], "Should be able to navigate sibling with on-domain parent by calling window.open."); 23 await isNavigated(frames[2], "Should be able to navigate sibling with on-domain parent by submitting form."); 24 await isNavigated(frames[3], "Should be able to navigate sibling with on-domain parent by targeted hyperlink."); 25 26 await cleanupWindows(); 27 SimpleTest.finish(); 28 }; 29 </script> 30 </head> 31 <body> 32 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=408052">Mozilla Bug 408052</a> 33 <div id="frames"> 34 <iframe name="child0" src="http://test1.example.org:80/tests/docshell/test/navigation/blank.html"></iframe> 35 <iframe name="child1" src="http://test1.example.org:80/tests/docshell/test/navigation/blank.html"></iframe> 36 <iframe name="child2" src="http://test1.example.org:80/tests/docshell/test/navigation/blank.html"></iframe> 37 <iframe name="child3" src="http://test1.example.org:80/tests/docshell/test/navigation/blank.html"></iframe> 38 </div> 39 <div id="active"></div> 40 <pre id="test"> 41 <script type="text/javascript"> 42 SimpleTest.waitForExplicitFinish(); 43 </script> 44 </pre> 45 </body> 46 </html>