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

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

Issue 821303006: bindings: Fixes layouttests when moving attributes to prototype chains. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed performance memory tests and addressed review comments. Created 5 years, 11 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 | Annotate | Revision Log
OLDNEW
1 description("This test checks that navigating within the document does not reset Web Timing numbers."); 1 description("This test checks that navigating within the document does not reset Web Timing numbers.");
2 2
3 window.performance = window.performance || {}; 3 window.performance = window.performance || {};
4 var timing = performance.timing || {}; 4 var timing = performance.timing || {};
5 5
6 function checkTimingNotChanged() 6 function checkTimingNotChanged()
7 { 7 {
8 properties = Object.keys(timing).sort(); 8 var properties = getAllPropertyNames(timing);
9 for (var i = 0; i < properties.length; ++i) { 9 for (var i = 0; i < properties.length; ++i) {
10 property = properties[i]; 10 var property = properties[i];
11 if (timing[property] === initialTiming[property]) 11 if (timing[property] === initialTiming[property])
12 testPassed(property + " is unchanged."); 12 testPassed(property + " is unchanged.");
13 else 13 else
14 testFailed(property + " changed."); 14 testFailed(property + " changed.");
15 } 15 }
16 finishJSTest(); 16 finishJSTest();
17 } 17 }
18 18
19 var initialTiming = {}; 19 var initialTiming = {};
20 function saveTimingAfterLoad() 20 function saveTimingAfterLoad()
21 { 21 {
22 for (var property in timing) { 22 for (var property in timing) {
23 initialTiming[property] = timing[property]; 23 initialTiming[property] = timing[property];
24 } 24 }
25 window.location.href = "#1"; 25 window.location.href = "#1";
26 setTimeout("checkTimingNotChanged()", 0); 26 setTimeout("checkTimingNotChanged()", 0);
27 } 27 }
28 28
29 function loadHandler() 29 function loadHandler()
30 { 30 {
31 window.removeEventListener("load", loadHandler); 31 window.removeEventListener("load", loadHandler);
32 setTimeout("saveTimingAfterLoad()", 0); 32 setTimeout("saveTimingAfterLoad()", 0);
33 } 33 }
34 window.addEventListener("load", loadHandler, false); 34 window.addEventListener("load", loadHandler, false);
35 35
36 jsTestIsAsync = true; 36 jsTestIsAsync = true;
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/script-tests/webtiming-document-open.js ('k') | LayoutTests/fast/js/script-tests/delete-syntax.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698