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

Unified Diff: LayoutTests/fast/workers/resources/messageevent-source.js

Issue 23319002: Set MessageEvent.source to the newly created port for shared workers' connect events (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add test and assertions Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/workers/resources/messageevent-source.js
diff --git a/LayoutTests/fast/workers/resources/messageevent-source.js b/LayoutTests/fast/workers/resources/messageevent-source.js
new file mode 100644
index 0000000000000000000000000000000000000000..c1b72adb097a09969f0753b0247736c47fe9d238
--- /dev/null
+++ b/LayoutTests/fast/workers/resources/messageevent-source.js
@@ -0,0 +1,11 @@
+onconnect = function(event) {
+ if (event.__proto__ === MessageEvent.prototype)
+ event.ports[0].postMessage("PASS: event.__proto__ is MessageEvent.prototype");
+ else
+ event.ports[0].postMessage("FAIL: event.__proto__ is not MessageEvent.prototype");
+ if (event.source === event.ports[0])
+ event.ports[0].postMessage("PASS: event.source is event.ports[0]");
+ else
+ event.ports[0].postMessage("FAIL: event.source is not event.ports[0]");
+ event.ports[0].postMessage("DONE:");
+};

Powered by Google App Engine
This is Rietveld 408576698