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

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

Issue 2070563002: Seperate DOMVisualViewport from Blink's VisualViewport class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 4 years, 6 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
(...skipping 19 matching lines...) Expand all
30 if (path[0] == 'accessibilityController' // we can hardly estimate the state s of the cached WebAXObjects. 30 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. 31 || path[0] == 'localStorage') { // local storage is not reliably cleared between tests.
32 return; 32 return;
33 } 33 }
34 34
35 // FIXME: Skip MemoryInfo for now, since it's not implemented as a DOMWindow Property, and has 35 // FIXME: Skip MemoryInfo for now, since it's not implemented as a DOMWindow Property, and has
36 // no way of knowing when it's detached. Eventually this should have the sam e behavior. 36 // no way of knowing when it's detached. Eventually this should have the sam e behavior.
37 if (path.length >= 2 && (path[0] == 'console' || path[0] == 'performance') & & path[1] == 'memory') 37 if (path.length >= 2 && (path[0] == 'console' || path[0] == 'performance') & & path[1] == 'memory')
38 return; 38 return;
39 39
40 // TODO(bokan): Skip visualViewport for now since it returns the page-global VisualViewport
41 // object and we have no way of creating a VisualViewport yet. This should b e fixed with
42 // crbug.com/604928.
43 if (path[0] == 'visualViewport')
44 return;
45
46 // Skip things that are assumed to be constants. 40 // Skip things that are assumed to be constants.
47 if (path[path.length - 1].toUpperCase() == path[path.length - 1]) 41 if (path[path.length - 1].toUpperCase() == path[path.length - 1])
48 return; 42 return;
49 43
50 // Various special cases for legacy reasons. Please do not add entries to th is list. 44 // Various special cases for legacy reasons. Please do not add entries to th is list.
51 var propertyPath = path.join('.'); 45 var propertyPath = path.join('.');
52 46
53 // Connection type depends on the host, skip. 47 // Connection type depends on the host, skip.
54 if (propertyPath == 'navigator.connection.type') 48 if (propertyPath == 'navigator.connection.type')
55 return; 49 return;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 emitExpectedResult(path, "0"); 112 emitExpectedResult(path, "0");
119 } else if (type == "boolean") { 113 } else if (type == "boolean") {
120 expected = "false"; 114 expected = "false";
121 if (path == "closed" && windowHasBeenGCed ) 115 if (path == "closed" && windowHasBeenGCed )
122 expected = "true"; 116 expected = "true";
123 emitExpectedResult(path, expected); 117 emitExpectedResult(path, expected);
124 } 118 }
125 path.pop(); 119 path.pop();
126 } 120 }
127 } 121 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698