JS Test Harness: Remove more link tags
[WebKit-https.git] / LayoutTests / http / tests / misc / resources / webtiming-cross-origin-redirect.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../js-test-resources/js-test-pre.js"></script>
5 </head>
6 <body>
7 <p id="description"></p>
8 <div id="console"></div>
9 <script>
10 description("Web Timing should zero out redirect stats after a cross-origin redirect.");
11
12 var performance = window.performance || {};
13 var navigation = performance.navigation || {};
14 var timing = performance.timing || {};
15
16 function performTest() {
17     // FIXME: Need a way to synchronize the test so that loadEventEnd is non-zero.
18     var shouldBeZeroList = ["loadEventEnd", "redirectStart", "redirectEnd", "secureConnectionStart", "unloadEventEnd", "unloadEventStart"];
19
20     var timingProperties = new Array;
21     for (var property in timing) {
22         timingProperties.push(property);
23     }
24     timingProperties.sort();
25     for (var i = 0; i < timingProperties.length; ++i) {
26         if (shouldBeZeroList.indexOf(timingProperties[i]) >= 0)
27             shouldBe("timing." + timingProperties[i], "0");
28         else
29             shouldBeNonZero("timing." + timingProperties[i]);
30     }
31     shouldBe("navigation.redirectCount", "0");
32
33     finishJSTest();
34 }
35
36 window.addEventListener("load", performTest);
37
38 var jsTestIsAsync = true;
39 var successfullyParsed = true;
40 </script>
41 <script src="../../js-test-resources/js-test-post.js"></script>
42 </body>
43 </html>