OLD | NEW |
1 /* Adopted from LayoutTests/webexposed/resources/global-interface-listing.js */ | 1 /* Adopted from LayoutTests/webexposed/resources/global-interface-listing.js */ |
2 | 2 |
3 // Run all the code in a local scope. | 3 // Run all the code in a local scope. |
4 (function(global_object) { | 4 (function(global_object) { |
5 | 5 |
6 var globals = []; | 6 var globals = []; |
7 | 7 |
8 // List of builtin JS constructors; Blink is not controlling what properties the
se | 8 // List of builtin JS constructors; Blink is not controlling what properties the
se |
9 // objects have, so exercising them in a Blink test doesn't make sense. | 9 // objects have, so exercising them in a Blink test doesn't make sense. |
10 // | 10 // |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 globals.push('global object'); | 126 globals.push('global object'); |
127 var property_strings = []; | 127 var property_strings = []; |
128 var member_names = Object.getOwnPropertyNames(global_object).filter(function(pro
perty_name) { | 128 var member_names = Object.getOwnPropertyNames(global_object).filter(function(pro
perty_name) { |
129 return !js_builtins.has(property_name) && !is_web_idl_constructor(property_nam
e); | 129 return !js_builtins.has(property_name) && !is_web_idl_constructor(property_nam
e); |
130 }); | 130 }); |
131 member_names.forEach(function(property_name) { | 131 member_names.forEach(function(property_name) { |
132 collect_property_info(global_object, property_name, property_strings); | 132 collect_property_info(global_object, property_name, property_strings); |
133 }); | 133 }); |
134 globals.push.apply(globals, property_strings.sort()); | 134 globals.push.apply(globals, property_strings.sort()); |
135 | 135 |
136 self.addEventListener('message', function(event) { | 136 // Worklets don't have a mechanism to communicate back to the main page, dump |
137 event.ports[0].postMessage({ result: globals }); | 137 // results into the console. |
| 138 globals.forEach(function(global) { |
| 139 console.log(global); |
138 }); | 140 }); |
139 | 141 |
140 })(this); // Run all the code in a local scope. | 142 })(this); // Run all the code in a local scope. |
OLD | NEW |