| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../resources/testharness.js"></script> | 2 <script src="../resources/testharness.js"></script> |
| 3 <script src="../resources/testharnessreport.js"></script> | 3 <script src="../resources/testharnessreport.js"></script> |
| 4 <script> | 4 <script> |
| 5 var t = async_test('Makes sure that preloaded resources are not downloaded a
gain when used'); | 5 var t = async_test('Makes sure that preloaded resources are not downloaded a
gain when used'); |
| 6 </script> | 6 </script> |
| 7 <link rel=preload href="../resources/dummy.js" as=script> | 7 <link rel=preload href="../resources/dummy.js" as=script> |
| 8 <link rel=preload href="../resources/dummy.css" as=style> | 8 <link rel=preload href="../resources/dummy.css" as=style> |
| 9 <link rel=preload href="../resources/square.png" as=image> | 9 <link rel=preload href="../resources/square.png" as=image> |
| 10 <link rel=preload href="../resources/square.png?background" as=image> | 10 <link rel=preload href="../resources/square.png?background" as=image> |
| 11 <link rel=preload href="../resources/Ahem.ttf" as=font crossorigin> | 11 <link rel=preload href="../resources/Ahem.ttf" as=font crossorigin> |
| 12 <link rel=preload href="../resources/test.mp4" as=video> |
| 13 <link rel=preload href="../resources/test.oga" as=audio> |
| 14 <link rel=preload href="../resources/security/captions.vtt" as=track> |
| 15 <link rel=preload href="../resources/dummy.xml" as=foobarxmlthing> |
| 16 <link rel=preload href="../resources/dummy.xml"> |
| 12 <script src="../resources/slow-script.pl?delay=200"></script> | 17 <script src="../resources/slow-script.pl?delay=200"></script> |
| 13 <style> | 18 <style> |
| 14 #background { | 19 #background { |
| 15 width: 200px; | 20 width: 200px; |
| 16 height: 200px; | 21 height: 200px; |
| 17 background-image: url(../resources/square.png?background); | 22 background-image: url(../resources/square.png?background); |
| 18 } | 23 } |
| 19 @font-face { | 24 @font-face { |
| 20 font-family:ahem; | 25 font-family:ahem; |
| 21 src: url(../resources/Ahem.ttf); | 26 src: url(../resources/Ahem.ttf); |
| 22 } | 27 } |
| 23 span { font-family: ahem, Arial; } | 28 span { font-family: ahem, Arial; } |
| 24 </style> | 29 </style> |
| 25 <link rel="stylesheet" href="../resources/dummy.css"> | 30 <link rel="stylesheet" href="../resources/dummy.css"> |
| 26 <script src="../resources/dummy.js"></script> | 31 <script src="../resources/dummy.js"></script> |
| 27 <div id="background"></div> | 32 <div id="background"></div> |
| 28 <img src="../resources/square.png"> | 33 <img src="../resources/square.png"> |
| 34 <video src="../resources/test.mp4"> |
| 35 <track kind=subtitles src="../resources/security/captions.vtt" srclang=en> |
| 36 </video> |
| 37 <audio src="../resources/test/oga"></audio> |
| 29 <script> | 38 <script> |
| 39 var xhr = new XMLHttpRequest(); |
| 40 xhr.open("GET", "../resources/dummy.xml"); |
| 41 xhr.send(); |
| 42 |
| 30 window.addEventListener("load", t.step_func(function() { | 43 window.addEventListener("load", t.step_func(function() { |
| 31 assert_equals(performance.getEntriesByType("resource").length, 8); | 44 assert_equals(performance.getEntriesByType("resource").length, 12); |
| 32 t.done(); | 45 t.done(); |
| 33 })); | 46 })); |
| 34 </script> | 47 </script> |
| 35 <span>PASS - this text is here just so that the browser will download the font.<
/span | 48 <span>PASS - this text is here just so that the browser will download the font.<
/span |
| OLD | NEW |