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

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

Issue 1416673008: Converge <link rel=preload> loading logic with preloadScanner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fetch/ResourceFetcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/preload/single_download_preload.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/preload/single_download_preload.html b/third_party/WebKit/LayoutTests/http/tests/preload/single_download_preload.html
new file mode 100644
index 0000000000000000000000000000000000000000..f0267ae3a263553171ac88fd77d3bbddb86cf2d3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/preload/single_download_preload.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script>
+ var t = async_test('Makes sure that preloaded resources are not downloaded again when used');
+</script>
+<link rel=preload href="../resources/dummy.js" as=script>
+<link rel=preload href="../resources/dummy.css" as=stylesheet>
+<link rel=preload href="../resources/square.png" as=image>
+<link rel=preload href="../resources/square.png?background" as=image>
+<script src="../resources/slow-script.pl?delay=200"></script>
+<style>
+ #background {
+ width: 200px;
+ height: 200px;
+ background-image: url(../resources/square.png?background);
+ }
+</style>
+<link rel="stylesheet" href="../resources/dummy.css">
+<script src="../resources/dummy.js"></script>
+<div id="background"></div>
+<img src="../resources/square.png">
+<script>
+ window.addEventListener("load", t.step_func(function() {
+ assert_equals(performance.getEntriesByType("resource").length, 7);
+ t.done();
+ }));
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fetch/ResourceFetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698