OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../resources/testharness.js"></script> |
| 3 <script src="../resources/testharnessreport.js"></script> |
| 4 <script> |
| 5 var t = async_test('Makes sure that preloaded resources trigger the onload e
vent'); |
| 6 var scriptLoaded = false; |
| 7 var styleLoaded = false; |
| 8 </script> |
| 9 <link rel=preload href="../resources/dummy.js" as=script onload="scriptLoaded =
true;"> |
| 10 <link rel=preload href="../resources/dummy.css" as=style onload="styleLoaded = t
rue;"> |
| 11 <script src="../resources/slow-script.pl?delay=500"></script> |
| 12 <script> |
| 13 window.onload = t.step(function(){ |
| 14 assert_true(window.scriptLoaded, "script triggered load event"); |
| 15 assert_true(styleLoaded, "style triggered load event"); |
| 16 t.done(); |
| 17 }); |
| 18 </script> |
| 19 |
OLD | NEW |