Index: content/test/notifications/test.html |
diff --git a/content/test/notifications/test.html b/content/test/notifications/test.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ed03b739f9623ae7168d845e157b59ea4774c868 |
--- /dev/null |
+++ b/content/test/notifications/test.html |
@@ -0,0 +1,27 @@ |
+<!doctype html> |
+<html lang="en"> |
+ <head> |
+ <meta charset="utf-8"> |
+ <title>Web Notification test-page</title> |
+ </head> |
+ <body> |
+ <p>This page is used to power the NotificationBrowserTest suite.</p> |
+ <script src="notification_test_utils.js"></script> |
+ <script> |
+ function DisplayPersistentNotification(title, options) { |
+ options = options || { body: 'Hello, world!', |
+ icon: 'icon.png' }; |
+ |
+ GetActivatedServiceWorker('service_worker.js', |
+ location.pathname) |
+ .then(function (registration) { |
+ return registration.showNotification(title, options); |
+ }).then(function () { |
+ domAutomationController.send('ok'); |
+ }).catch(function (error) { |
+ domAutomationController.send('' + error); |
+ }); |
+ } |
+ </script> |
+ </body> |
+</html> |