Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/preload/memcache_reuse_of_non_cacheable_preload.html

Issue 2903653005: [preload] Mandatory `as` value and related spec alignments (Closed)
Patch Set: IDL changes Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698