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     <object data="../../images/resources/test-load.jpg">
     27         <span style="font-family:monospace; color:green">PASS</span>
     28     </object>
     29     <div id="console"></div>
     30 </body>
     31 </html>
     32