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

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

Issue 1563263002: Add HTMLPreloadScanner support for <link rel=preload> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed a test as well as 2 bugs that other tests revealed Created 4 years, 11 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 <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=stylesheet> 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 <script src="../resources/slow-script.pl?delay=200"></script> 11 <script src="../resources/slow-script.pl?delay=200"></script>
12 <style> 12 <style>
13 #background { 13 #background {
14 width: 200px; 14 width: 200px;
15 height: 200px; 15 height: 200px;
16 background-image: url(../resources/square.png?background); 16 background-image: url(../resources/square.png?background);
17 } 17 }
18 </style> 18 </style>
19 <link rel="stylesheet" href="../resources/dummy.css"> 19 <link rel="stylesheet" href="../resources/dummy.css">
20 <script src="../resources/dummy.js"></script> 20 <script src="../resources/dummy.js"></script>
21 <div id="background"></div> 21 <div id="background"></div>
22 <img src="../resources/square.png"> 22 <img src="../resources/square.png">
23 <script> 23 <script>
24 window.addEventListener("load", t.step_func(function() { 24 window.addEventListener("load", t.step_func(function() {
25 assert_equals(performance.getEntriesByType("resource").length, 7); 25 assert_equals(performance.getEntriesByType("resource").length, 7);
26 t.done(); 26 t.done();
27 })); 27 }));
28 </script> 28 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698