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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/script-tests/webtiming-navigate-within-document.js

Issue 2667393002: Stop using script-tests in fast/dom/. (Closed)
Patch Set: . Created 3 years, 10 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
(Empty)
1 description("This test checks that navigating within the document does not reset Web Timing numbers.");
2
3 window.performance = window.performance || {};
4 var timing = performance.timing || {};
5
6 function checkTimingNotChanged()
7 {
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.");
13 else
14 testFailed(property + " changed.");
15 }
16 finishJSTest();
17 }
18
19 var initialTiming = {};
20 function saveTimingAfterLoad()
21 {
22 for (var property in timing) {
23 initialTiming[property] = timing[property];
24 }
25 window.location.href = "#1";
26 setTimeout("checkTimingNotChanged()", 0);
27 }
28
29 function loadHandler()
30 {
31 window.removeEventListener("load", loadHandler);
32 setTimeout("saveTimingAfterLoad()", 0);
33 }
34 window.addEventListener("load", loadHandler, false);
35
36 jsTestIsAsync = true;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698