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

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

Issue 2883763002: Expose ECT to render frames, Blink and NetInfo (Closed)
Patch Set: rebased Created 3 years, 7 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(object, windowHasBeenGCed) 1 function collectProperties(object, windowHasBeenGCed)
2 { 2 {
3 collectPropertiesHelper(object, object, windowHasBeenGCed, []); 3 collectPropertiesHelper(object, object, windowHasBeenGCed, []);
4 4
5 propertiesToVerify.sort(function (a, b) 5 propertiesToVerify.sort(function (a, b)
6 { 6 {
7 if (a.property < b.property) 7 if (a.property < b.property)
8 return -1 8 return -1
9 if (a.property > b.property) 9 if (a.property > b.property)
10 return 1; 10 return 1;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 return; 42 return;
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 if (propertyPath == 'navigator.connection.effectiveType')
53 return;
52 if (propertyPath == 'navigator.connection.rtt') 54 if (propertyPath == 'navigator.connection.rtt')
53 return; 55 return;
54 if (propertyPath == 'navigator.connection.downlink') 56 if (propertyPath == 'navigator.connection.downlink')
55 return; 57 return;
56 58
57 switch (propertyPath) { 59 switch (propertyPath) {
58 case "location.href": 60 case "location.href":
59 expected = "'about:blank'"; 61 expected = "'about:blank'";
60 break; 62 break;
61 case "location.origin": 63 case "location.origin":
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 } 137 }
136 138
137 function pathExists(object, path) { 139 function pathExists(object, path) {
138 for (var i = 0; i < path.length; i++) { 140 for (var i = 0; i < path.length; i++) {
139 if (!object || !(path[i] in object)) 141 if (!object || !(path[i] in object))
140 return false; 142 return false;
141 object = object[path[i]]; 143 object = object[path[i]];
142 } 144 }
143 return true; 145 return true;
144 } 146 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698