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

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

Issue 1892083002: Generic Sensor API : Ambient Light Sensor API. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: re entrancy fix 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 // 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.
45 var propertyPath = path.join('.'); 45 var propertyPath = path.join('.');
46 46
47 // Connection type depends on the host, skip. 47 // Connection type depends on the host, skip.
48 if (propertyPath == 'navigator.connection.type') 48 if (propertyPath == 'navigator.connection.type')
49 return; 49 return;
50 if (propertyPath == 'navigator.connection.downlinkMax') 50 if (propertyPath == 'navigator.connection.downlinkMax')
51 return; 51 return;
52 52
53 // Skip some lightSensor properties.
54 if (propertyPath == 'navigator.lightSensor.reading.illuminance' || propertyP ath == 'navigator.lightSensor.state')
55 return;
56
53 switch (propertyPath) { 57 switch (propertyPath) {
54 case "location.href": 58 case "location.href":
55 expected = "'about:blank'"; 59 expected = "'about:blank'";
56 break; 60 break;
57 case "location.origin": 61 case "location.origin":
58 expected = "'null'"; 62 expected = "'null'";
59 break; 63 break;
60 case "location.pathname": 64 case "location.pathname":
61 expected = "'blank'"; 65 expected = "'blank'";
62 break; 66 break;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 emitExpectedResult(path, "0"); 116 emitExpectedResult(path, "0");
113 } else if (type == "boolean") { 117 } else if (type == "boolean") {
114 expected = "false"; 118 expected = "false";
115 if (path == "closed" && windowHasBeenGCed ) 119 if (path == "closed" && windowHasBeenGCed )
116 expected = "true"; 120 expected = "true";
117 emitExpectedResult(path, expected); 121 emitExpectedResult(path, expected);
118 } 122 }
119 path.pop(); 123 path.pop();
120 } 124 }
121 } 125 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698