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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/preload/single_download_late_used_preload.html

Issue 2676573004: Import wpt@6010f54a979d242f657b284bae53c2b218c533f4 (Closed)
Patch Set: Update test expectations and baselines. Created 3 years, 10 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
« no previous file with comments | « third_party/WebKit/LayoutTests/external/wpt/navigation-timing/test_unique_performance_objects.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Ensure preloaded resources are not downloaded again when used</title>
2 <script src="/resources/testharness.js"></script> 3 <script src="/resources/testharness.js"></script>
3 <script src="/resources/testharnessreport.js"></script> 4 <script src="/resources/testharnessreport.js"></script>
5 <link rel=preload href="resources/square.png?pipe=trickle(d1)" as=image>
4 <script> 6 <script>
5 var t = async_test('Makes sure that preloaded resources are not downloaded a gain when used'); 7 var link = document.getElementsByTagName("link")[0]
8 assert_equals(link.as, "image");
9 link.addEventListener("load", () => {
10 assert_equals(performance.getEntriesByType("resource").length, 3)
11 var img = document.createElement("img");
12 img.src = "resources/square.png?pipe=trickle(d1)";
13 img.onload = () => {
14 assert_equals(performance.getEntriesByType("resource").length, 3);
15 done();
16 };
17 document.body.appendChild(img);
18 });
6 </script> 19 </script>
7 <div id=result></div> 20 <body>
8 <link rel=preload href="resources/square.png" as=image>
9 <script>
10 window.addEventListener("load", t.step_func(function() {
11 t.step_timeout(function() {
12 document.getElementById("result").innerHTML = "<image src='resources /square.png'>";
13 t.step_timeout(function() {
14 assert_equals(performance.getEntriesByType("resource").length, 3 );
15 t.done();
16 }, 1000);
17 }, 1000);
18 }));
19 </script>
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/external/wpt/navigation-timing/test_unique_performance_objects.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698