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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/Window/resources/window-property-collector.js

Issue 1475863005: [Async][WIP] Call FrameLoader::checkCompleted() asynchronously to avoid sync body.onload() Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 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
1 function collectProperties(windowHasBeenGCed) 1 function collectProperties(windowHasBeenGCed)
2 { 2 {
3 // Collect properties of the top-level window, since touching the properties 3 // Collect properties of the top-level window, since touching the properties
4 // of a DOMWindow affects its internal C++ state. 4 // of a DOMWindow affects its internal C++ state.
5 collectPropertiesHelper(window, windowHasBeenGCed, []); 5 collectPropertiesHelper(window, windowHasBeenGCed, []);
6 6
7 propertiesToVerify.sort(function (a, b) 7 propertiesToVerify.sort(function (a, b)
8 { 8 {
9 if (a.property < b.property) 9 if (a.property < b.property)
10 return -1 10 return -1
11 if (a.property > b.property) 11 if (a.property > b.property)
12 return 1; 12 return 1;
13 return 0; 13 return 0;
14 }); 14 });
15 } 15 }
16 16
17 function emitExpectedResult(path, expected) 17 function emitExpectedResult(path, expected)
18 { 18 {
19 // Skip internals properties, since they aren't web accessible. 19 // Skip internals properties, since they aren't web accessible.
20 if (path[0] == 'internals' 20 if (path[0] == 'internals'
21 || path[0] == 'propertiesToVerify' // Skip the list we're building... 21 || path[0] == 'propertiesToVerify' // Skip the list we're building...
22 || path[0] == 'clientInformation' // Just an alias for navigator. 22 || path[0] == 'clientInformation' // Just an alias for navigator.
23 || path[0] == 'testRunner' // Skip testRunner since they are only for te sting. 23 || path[0] == 'testRunner' // Skip testRunner since they are only for te sting.
24 || path[0] == 'layoutTestController' // Just an alias for testRunner. 24 || path[0] == 'layoutTestController' // Just an alias for testRunner.
25 || path[0] == 'eventSender') { // Skip eventSender since they are only f or testing. 25 || path[0] == 'eventSender' // Skip eventSender since they are only for testing.
26 // Skip variables related to js-test.js since they are only for testing.
27 || path[0] == 'isJsTest'
28 || path[0] == 'jsTestIsAsync'
29 || path[0] == 'successfullyParsed'
30 || path[0] == 'wasFinishJSTestCalled'
31 || path[0] == 'wasPostTestScriptParsed') {
26 return; 32 return;
27 } 33 }
28 34
29 // Skip the properties which are hard to expect a stable result. 35 // Skip the properties which are hard to expect a stable result.
30 if (path[0] == 'accessibilityController' // we can hardly estimate the state s of the cached WebAXObjects. 36 if (path[0] == 'accessibilityController' // we can hardly estimate the state s of the cached WebAXObjects.
31 || path[0] == 'localStorage') { // local storage is not reliably cleared between tests. 37 || path[0] == 'localStorage') { // local storage is not reliably cleared between tests.
32 return; 38 return;
33 } 39 }
34 40
35 // FIXME: Skip MemoryInfo for now, since it's not implemented as a DOMWindow Property, and has 41 // FIXME: Skip MemoryInfo for now, since it's not implemented as a DOMWindow Property, and has
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 emitExpectedResult(path, "0"); 118 emitExpectedResult(path, "0");
113 } else if (type == "boolean") { 119 } else if (type == "boolean") {
114 expected = "false"; 120 expected = "false";
115 if (path == "closed" && windowHasBeenGCed ) 121 if (path == "closed" && windowHasBeenGCed )
116 expected = "true"; 122 expected = "true";
117 emitExpectedResult(path, expected); 123 emitExpectedResult(path, expected);
118 } 124 }
119 path.pop(); 125 path.pop();
120 } 126 }
121 } 127 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698