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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/notifications/resources/instrumentation-service-worker.js

Issue 1656823002: Add layout tests for ServiceWorker's notificationclose event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Now the test actually works Created 4 years, 11 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: third_party/WebKit/LayoutTests/http/tests/notifications/resources/instrumentation-service-worker.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/notifications/resources/instrumentation-service-worker.js b/third_party/WebKit/LayoutTests/http/tests/notifications/resources/instrumentation-service-worker.js
index a46fa7b04847fdcd0f8aa4eeb328a225f5d2fec4..dba8725f6fb2071cdebf128ae4b4e3fe54bd4b7b 100644
--- a/third_party/WebKit/LayoutTests/http/tests/notifications/resources/instrumentation-service-worker.js
+++ b/third_party/WebKit/LayoutTests/http/tests/notifications/resources/instrumentation-service-worker.js
@@ -102,3 +102,9 @@ addEventListener('notificationclick', function(event) {
notification: notificationCopy,
action: event.action });
});
+
+addEventListener('notificationclose', function(event) {
+ var notificationCopy = cloneNotification(event.notification);
+ messagePort.postMessage({ command: 'close',
+ notification: notificationCopy});
Peter Beverloo 2016/02/02 23:50:10 micro nit: space before }
Nina 2016/02/03 15:04:23 Done.
+});

Powered by Google App Engine
This is Rietveld 408576698