file_bug1758664.html (840B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <script> 5 var onIframeOnload = function() { 6 var iframe = window.document.getElementById('applicationIframe'); 7 opener.is(iframe.contentWindow.location.search, "?iframe", "Should have loaded the iframe"); 8 window.close(); 9 opener.SimpleTest.finish(); 10 } 11 12 var onPageOnload = function() { 13 if (location.search == "?iframe") { 14 return; 15 } 16 if(!window.name) { 17 window.name = 'file_bug1758664.html'; 18 window.location.reload(); 19 return; 20 } 21 var iframe = window.document.getElementById('applicationIframe'); 22 iframe.addEventListener('load', onIframeOnload); 23 iframe.src = "file_bug1758664.html?iframe"; 24 } 25 window.document.addEventListener("DOMContentLoaded", onPageOnload); 26 27 </script> 28 </head> 29 <body> 30 <iframe id="applicationIframe"></iframe> 31 </body> 32 </html>