test_frame_count_with_synthetic_doc.html (857B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <script src="/tests/SimpleTest/SimpleTest.js"></script> 5 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 6 </head> 7 <body> 8 <script> 9 SimpleTest.waitForExplicitFinish(); 10 function getWindowLength() { 11 setTimeout(function() { 12 if (window.length) { 13 ok(false, "Synthetic document shouldn't be exposed"); 14 } 15 16 // Keep running this check until the test stops 17 getWindowLength(); 18 }); 19 } 20 21 function addObject() { 22 const object = document.createElement("object"); 23 object.data = 'file_bug417760.png'; 24 document.body.appendChild(object); 25 26 object.onload = function() { 27 ok(true, "Test passes"); 28 SimpleTest.finish(); 29 } 30 } 31 32 getWindowLength(); 33 addObject(); 34 </script> 35 </body> 36 </html>