1 window.performance = window.performance || {};
2 var navigation = performance.navigation || {};
3 var timing = performance.timing || {};
4 var originalTiming = {};
6 window.addEventListener("load", function() { setTimeout(testTimingWithDocumentOpen, 0); }, false);
8 function testTimingWithDocumentOpen()
10 for (property in timing) {
11 originalTiming[property] = timing[property];
15 document.write("<html>");
16 document.write("<head>");
17 document.write("<script src=\"../../resources/js-test.js\"></script>");
18 document.write("</head>");
19 document.write("<body>");
20 document.write("</body>");
21 document.write("</html>");
24 description("This test verifies that the NavigationTimings don't change after a document.open().");
26 setTimeout(finishTest, 0);
29 function finishTest() {
30 var properties = getAllPropertyNames(timing);
31 for (var i = 0; i < properties.length; ++i) {
32 shouldBe("timing." + properties[i], "originalTiming." + properties[i]);