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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/notifications/serviceworker-notificationclose-event-data-reflection.html

Issue 1656823002: Add layout tests for ServiceWorker's notificationclose event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactored data reflection tests + nits 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
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/notifications/serviceworker-notificationclick-event-data-reflection.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/notifications/serviceworker-notificationclose-event-data-reflection.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/notifications/serviceworker-notificationclose-event-data-reflection.html b/third_party/WebKit/LayoutTests/http/tests/notifications/serviceworker-notificationclose-event-data-reflection.html
new file mode 100644
index 0000000000000000000000000000000000000000..9203c272eb14af24812a9552f27b6a715b819071
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/notifications/serviceworker-notificationclose-event-data-reflection.html
@@ -0,0 +1,28 @@
+<!doctype html>
+<html>
+ <head>
+ <title>Notifications: Action reflection in the "notificationclose" event.</title>
+ <script src="../resources/permissions-helper.js"></script>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ <script src="../serviceworker/resources/test-helpers.js"></script>
+ <script src="resources/notification-data-reflection-test.js"></script>
+ <script src="resources/test-helpers.js"></script>
+ </head>
+ <body>
+ <script>
+ // Tests that the notification available in the "notificationclose" event in the
+ // Service Worker accurately reflects the data attributes of several type
+ // with which the notification was created (for this test --) in the document.
+
+ async_test(function(test) {
+ runNotificationDataReflectionTest(test, {
+ run: function (scope) {
+ testRunner.simulateWebNotificationClose(scope, true /* by_user */);
+ },
+ name: 'close'
+ });
+ }, 'NotificationEvent data property should be reflected when the notification is closed by the user.');
+ </script>
+ </body>
+</html>
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/notifications/serviceworker-notificationclick-event-data-reflection.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698