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

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

Issue 2025393003: Move document.visualViewport to window.visualViewport (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing expectations 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
40 // Skip things that are assumed to be constants. 46 // Skip things that are assumed to be constants.
41 if (path[path.length - 1].toUpperCase() == path[path.length - 1]) 47 if (path[path.length - 1].toUpperCase() == path[path.length - 1])
42 return; 48 return;
43 49
44 // Various special cases for legacy reasons. Please do not add entries to th is list. 50 // Various special cases for legacy reasons. Please do not add entries to th is list.
45 var propertyPath = path.join('.'); 51 var propertyPath = path.join('.');
46 52
47 // Connection type depends on the host, skip. 53 // Connection type depends on the host, skip.
48 if (propertyPath == 'navigator.connection.type') 54 if (propertyPath == 'navigator.connection.type')
49 return; 55 return;
(...skipping 62 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