| 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 <body> | 4 <body> |
| 5 <script> | 5 <script> |
| 6 var t = async_test('Test that preloaded non-cacheable resources get reused even
after onload'); | 6 var t = async_test('Test that preloaded non-cacheable resources get reused even
after onload'); |
| 7 var action; | 7 var action; |
| 8 | 8 |
| 9 var test = t.step_func(function() { | 9 var test = t.step_func(function() { |
| 10 var entries = performance.getEntriesByType("resource"); | 10 var entries = performance.getEntriesByType("resource"); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 xhr.send(); | 24 xhr.send(); |
| 25 xhr.onload = t.step_func(function() { | 25 xhr.onload = t.step_func(function() { |
| 26 setTimeout(test, 0); | 26 setTimeout(test, 0); |
| 27 }); | 27 }); |
| 28 }); | 28 }); |
| 29 | 29 |
| 30 var loadTimestampWithLink = (function() { | 30 var loadTimestampWithLink = (function() { |
| 31 var l = document.createElement('link'); | 31 var l = document.createElement('link'); |
| 32 l.setAttribute('rel', 'preload'); | 32 l.setAttribute('rel', 'preload'); |
| 33 l.setAttribute('href', "resources/timestamp.php"); | 33 l.setAttribute('href', "resources/timestamp.php"); |
| 34 l.setAttribute('as', 'fetch'); |
| 34 l.onload = loadTimestampWithXHR; | 35 l.onload = loadTimestampWithXHR; |
| 35 document.body.appendChild(l); | 36 document.body.appendChild(l); |
| 36 }); | 37 }); |
| 37 | 38 |
| 38 loadTimestampWithLink(); | 39 loadTimestampWithLink(); |
| 39 </script> | 40 </script> |
| OLD | NEW |