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

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

Issue 207833003: Update screen.orientation to follow the latest version of the specs. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@partial_enum_callback
Patch Set: ... and mac expected results Created 6 years, 9 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() 1 function collectProperties()
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, []); 5 collectPropertiesHelper(window, []);
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 case "navigator.appCodeName": 53 case "navigator.appCodeName":
54 case "navigator.appName": 54 case "navigator.appName":
55 case "navigator.language": 55 case "navigator.language":
56 case "navigator.onLine": 56 case "navigator.onLine":
57 case "navigator.platform": 57 case "navigator.platform":
58 case "navigator.product": 58 case "navigator.product":
59 case "navigator.productSub": 59 case "navigator.productSub":
60 case "navigator.vendor": 60 case "navigator.vendor":
61 expected = "window." + propertyPath; 61 expected = "window." + propertyPath;
62 break; 62 break;
63 case "screen.orientation":
64 expected = "'portrait-primary'";
65 break;
63 } 66 }
64 67
65 insertExpectedResult(path, expected); 68 insertExpectedResult(path, expected);
66 } 69 }
67 70
68 function collectPropertiesHelper(object, path) 71 function collectPropertiesHelper(object, path)
69 { 72 {
70 if (path.length > 20) 73 if (path.length > 20)
71 throw 'Error: probably looping'; 74 throw 'Error: probably looping';
72 75
(...skipping 23 matching lines...) Expand all
96 } else if (type == "string") { 99 } else if (type == "string") {
97 emitExpectedResult(path, "''"); 100 emitExpectedResult(path, "''");
98 } else if (type == "number") { 101 } else if (type == "number") {
99 emitExpectedResult(path, "0"); 102 emitExpectedResult(path, "0");
100 } else if (type == "boolean") { 103 } else if (type == "boolean") {
101 emitExpectedResult(path, "false"); 104 emitExpectedResult(path, "false");
102 } 105 }
103 path.pop(); 106 path.pop();
104 } 107 }
105 } 108 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698