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 are not downloaded a
gain when used'); |
| 6 </script> |
| 7 <link rel=preload href="../resources/dummy.js" as=script> |
| 8 <link rel=preload href="../resources/dummy.css" as=stylesheet> |
| 9 <link rel=preload href="../resources/square.png" as=image> |
| 10 <link rel=preload href="../resources/square.png?background" as=image> |
| 11 <script src="../resources/slow-script.pl?delay=200"></script> |
| 12 <style> |
| 13 #background { |
| 14 width: 200px; |
| 15 height: 200px; |
| 16 background-image: url(../resources/square.png?background); |
| 17 } |
| 18 </style> |
| 19 <link rel="stylesheet" href="../resources/dummy.css"> |
| 20 <script src="../resources/dummy.js"></script> |
| 21 <div id="background"></div> |
| 22 <img src="../resources/square.png"> |
| 23 <script> |
| 24 window.addEventListener("load", t.step_func(function() { |
| 25 assert_equals(performance.getEntriesByType("resource").length, 7); |
| 26 t.done(); |
| 27 })); |
| 28 </script> |
OLD | NEW |