1 description("This test checks that navigating within the document does not reset Web Timing numbers.");
3 window
.performance
= window
.performance
|| {};
4 var timing
= performance
.timing
|| {};
6 function checkTimingNotChanged()
8 var properties
= getAllPropertyNames(timing
);
9 for (var i
= 0; i
< properties
.length
; ++i
) {
10 var property
= properties
[i
];
11 if (timing
[property
] === initialTiming
[property
])
12 testPassed(property
+ " is unchanged.");
14 testFailed(property
+ " changed.");
19 var initialTiming
= {};
20 function saveTimingAfterLoad()
22 for (var property
in timing
) {
23 initialTiming
[property
] = timing
[property
];
25 window
.location
.href
= "#1";
26 setTimeout("checkTimingNotChanged()", 0);
29 function loadHandler()
31 window
.removeEventListener("load", loadHandler
);
32 setTimeout("saveTimingAfterLoad()", 0);
34 window
.addEventListener("load", loadHandler
, false);