| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head></head> | |
| 4 <body> | |
| 5 <script src="../resources/testharness.js"></script> | |
| 6 <script src="../resources/testharnessreport.js"></script> | |
| 7 <script> | |
| 8 var t = async_test('Makes sure that preloaded resources are not downloaded a
gain when used'); | |
| 9 </script> | |
| 10 <link rel=preload href="../resources/dummy.js" as=script> | |
| 11 <link rel=preload href="../resources/dummy.css" as=style> | |
| 12 <link rel=preload href="../resources/square.png" as=image> | |
| 13 <link rel=preload href="../resources/square.png?background" as=image> | |
| 14 <link rel=preload href="../resources/Ahem.ttf" as=font crossorigin> | |
| 15 <link rel=preload href="../resources/test.mp4" as=media> | |
| 16 <link rel=preload href="../resources/test.oga" as=media> | |
| 17 <link rel=preload href="../security/resources/captions.vtt" as=track> | |
| 18 <link rel=preload href="../resources/dummy.xml" as=foobarxmlthing> | |
| 19 <link rel=preload href="../resources/dummy.xml"> | |
| 20 <script src="../resources/slow-script.pl?delay=200"></script> | |
| 21 <script> | |
| 22 window.addEventListener("load", t.step_func(function() { | |
| 23 var entries = performance.getEntriesByType("resource"); | |
| 24 for (var i = 0; i < entries.length; ++i) { | |
| 25 console.log(entries[i].name); | |
| 26 } | |
| 27 assert_equals(performance.getEntriesByType("resource").length, 12); | |
| 28 t.done(); | |
| 29 })); | |
| 30 </script> | |
| 31 </body> | |
| 32 </html> | |
| OLD | NEW |