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

Side by Side Diff: LayoutTests/http/tests/linkHeader/link-preconnect-schemeless.php

Issue 1245223008: Add unit and layout test to <link rel=preconnect> (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 4 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 <?php 1 <?php
2 header("Link: < http://wut.com.test/>; rel=preconnect"); 2 header("Link: < //wut.com.test/>; rel=preconnect");
3 ?> 3 ?>
4 <!DOCTYPE html> 4 <!DOCTYPE html>
5 <script> 5 <script>
6 if (window.testRunner) { 6 if (window.testRunner) {
7 testRunner.dumpAsText(); 7 testRunner.dumpAsText();
8 testRunner.waitUntilDone(); 8 testRunner.waitUntilDone();
9 } 9 }
10 if (window.internals) { 10 if (window.internals) {
11 internals.settings.setLogDnsPrefetchAndPreconnect(true); 11 internals.settings.setLogDnsPrefetchAndPreconnect(true);
12 internals.settings.setLinkHeaderEnabled(true); 12 internals.settings.setLinkHeaderEnabled(true);
13 } 13 }
14 if (!localStorage.getItem("reloaded")) { 14 if (!localStorage.getItem("reloaded")) {
15 localStorage.setItem("reloaded", true); 15 localStorage.setItem("reloaded", true);
16 location.reload(); 16 location.reload();
17 } else { 17 } else {
18 localStorage.removeItem("reloaded"); 18 localStorage.removeItem("reloaded");
19 } 19 }
20 </script> 20 </script>
21 This test check if a Link header triggered a dns prefetch. 21 This test check if a Link header triggered a dns prefetch.
22 <script> 22 <script>
23 if (window.testRunner) 23 if (window.testRunner)
24 testRunner.notifyDone(); 24 testRunner.notifyDone();
25 </script> 25 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698