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

Unified Diff: LayoutTests/fast/notifications/resources/notification-worker.js

Issue 624033003: [WIP] Move Web Notifications to a WebFrame-less code path (Blink). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: current state Created 6 years, 2 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/notifications/resources/notification-worker.js
diff --git a/LayoutTests/fast/notifications/resources/notification-worker.js b/LayoutTests/fast/notifications/resources/notification-worker.js
new file mode 100644
index 0000000000000000000000000000000000000000..d69be0e39e0b930bd3703318c72b9ec42644b021
--- /dev/null
+++ b/LayoutTests/fast/notifications/resources/notification-worker.js
@@ -0,0 +1,23 @@
+var port = self;
+
+function isDedicatedWorker()
+{
+ return !!self.postMessage;
+}
+
+self.addEventListener('connect', function(event)
+{
+ port = event.ports[0];
+ runTest();
+});
+
+var testRunner = {
+ simulateWebNotificationClick: function(title)
+ {
+ if (port)
+ port.postMessage('simulateClick::' + title);
+ }
+};
+
+if (isDedicatedWorker())
+ runTest();

Powered by Google App Engine
This is Rietveld 408576698