Home | History | Annotate | Download | only in beforeload
      1 <html>
      2 <head>
      3     <script src="resources/print.js"></script>
      4     <script>
      5         if (window.layoutTestController) {
      6             layoutTestController.dumpAsText();
      7             layoutTestController.waitUntilDone();
      8         }
      9 
     10         document.addEventListener("beforeload", function(event) {
     11             event.preventDefault();
     12         }, true);
     13 
     14         function checkObject()
     15         {
     16             var style = getComputedStyle(document.getElementsByTagName("object")[0], null);
     17             if (style.width != "0px" || style.height != "0px")
     18                 print("FAIL", "red");
     19 
     20             if (window.layoutTestController)
     21                 layoutTestController.notifyDone();
     22         }
     23     </script>
     24 </head>
     25 <body onload="checkObject();">
     26     <div id="target"></div>
     27     <div id="console"></div>
     28     <script>
     29         document.getElementById("target").innerHTML = "<object data='../../images/resources/test-load.jpg'><span style='font-family:monospace; color:green'>PASS</span></object>";
     30     </script>
     31 </body>
     32 </html>
     33