Chromium Code Reviews| 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> |