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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/prefetch/link_header_prefetch.php

Issue 2602233002: Prefetch Link header support. (Closed)
Patch Set: Created 3 years, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/LinkLoader.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/prefetch/link_header_prefetch.php
diff --git a/third_party/WebKit/LayoutTests/http/tests/prefetch/link_header_prefetch.php b/third_party/WebKit/LayoutTests/http/tests/prefetch/link_header_prefetch.php
new file mode 100644
index 0000000000000000000000000000000000000000..f3c915902363ff85b423537c834b71a04e8a22c2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/prefetch/link_header_prefetch.php
@@ -0,0 +1,22 @@
+<?php
+ header("Link: <http://127.0.0.1:8000/resources/square.png?background>;rel=prefetch", false);
+?>
+<!DOCTYPE html>
+<html>
+<head></head>
+<body>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+ var t = async_test('Makes sure that Link headers prefetch resources');
+</script>
+<script src="/resources/slow-script.pl?delay=200"></script>
Charlie Harrison 2017/01/01 18:36:04 Why do we need to load this script at all?
+<script>
+ window.addEventListener("load", t.step_func(function() {
+ var entries = performance.getEntriesByType("resource");
+ assert_equals(entries.length, 4);
+ t.done();
+ }));
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/LinkLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698