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

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

Issue 2889423003: Unify webexposed/global-interface-listing scripts (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
« no previous file with comments | « third_party/WebKit/LayoutTests/webexposed/resources/global-interface-listing.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Avoid polluting the global scope.
2 (function(globalObject) {
3
4 // Save the list of property names of the global object before loading other s cripts.
5 var propertyNamesInGlobal = Object.getOwnPropertyNames(globalObject);
6
7 importScripts('../../resources/js-test.js');
8 importScripts('../../resources/global-interface-listing.js');
9
10 if (!self.postMessage) {
11 // Shared worker. Make postMessage send to the newest client, which in
12 // our tests is the only client.
13
14 // Store messages for sending until we have somewhere to send them.
15 self.postMessage = function(message) {
16 if (typeof self.pendingMessages === "undefined")
17 self.pendingMessages = [];
18 self.pendingMessages.push(message);
19 };
20 self.onconnect = function(event) {
21 self.postMessage = function(message) {
22 event.ports[0].postMessage(message);
23 };
24 // Offload any stored messages now that someone has connected to us.
25 if (typeof self.pendingMessages === "undefined")
26 return;
27 while (self.pendingMessages.length)
28 event.ports[0].postMessage(self.pendingMessages.shift());
29 };
30 }
31
32 globalInterfaceListing(globalObject, propertyNamesInGlobal, debug);
33
34 finishJSTest();
35
36 })(this);
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/webexposed/resources/global-interface-listing.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698