indexed-browsing-contexts-03.html (1066B)
1 <!DOCTYPE html> 2 <head> 3 <meta charset="utf-8"> 4 <title>HTML Test: indexed property of a Window object</title> 5 <link rel="author" title="Intel" href="http://www.intel.com/" /> 6 <script src="/resources/testharness.js"></script> 7 <script src="/resources/testharnessreport.js"></script> 8 <script> 9 10 var t1 = async_test("Indexed child browsing contexts"); 11 function on_load() { 12 t1.step(function () { 13 assert_equals(window[0], document.getElementsByTagName("object")[0].contentWindow, 14 "The first child browsing context's container should be the object element."); 15 assert_equals(window[1], document.getElementsByTagName("iframe")[0].contentWindow, 16 "The second child browsing context's container should be the iframe element."); 17 }); 18 t1.done(); 19 } 20 21 </script> 22 </head> 23 <body onload="on_load()"> 24 <div id="log"></div> 25 <div style="display:none"> 26 <div id="0"></div> 27 <object name="0" type="text/html" data="test2.html"></object> 28 <iframe name="0" src="about:blank"></iframe> 29 </div> 30 </body>