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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/worklet/webexposed/resources/global-interface-listing-worklet.js

Issue 1841633002: Make constructors in Worklets be properly exposed on the global. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 /* 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
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.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698