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

Unified Diff: LayoutTests/fast/workers/resources/worker-custom-event.js

Issue 946833004: Reland of "Expose events in workers as per latest DOM specification" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 5 years, 10 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
« no previous file with comments | « no previous file | LayoutTests/fast/workers/worker-custom-event.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/workers/resources/worker-custom-event.js
diff --git a/LayoutTests/fast/workers/resources/worker-custom-event.js b/LayoutTests/fast/workers/resources/worker-custom-event.js
new file mode 100644
index 0000000000000000000000000000000000000000..c6a32262b52fa8e2d495029f347add0501c239ba
--- /dev/null
+++ b/LayoutTests/fast/workers/resources/worker-custom-event.js
@@ -0,0 +1,12 @@
+function onmessage(evt)
+{
+ var target = self;
+ target.addEventListener('custom-event', function(e) {
+ postMessage("SUCCESS");
+ }, true);
+
+ var event = new Event('custom-event');
+ target.dispatchEvent(event);
+}
+
+addEventListener("message", onmessage, true);
« no previous file with comments | « no previous file | LayoutTests/fast/workers/worker-custom-event.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698