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

Unified Diff: LayoutTests/http/tests/notifications/serviceworker-throw-constructor.html

Issue 923443005: Disallow constructing the Notification object in a Service Worker. (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
Index: LayoutTests/http/tests/notifications/serviceworker-throw-constructor.html
diff --git a/LayoutTests/http/tests/notifications/serviceworker-throw-constructor.html b/LayoutTests/http/tests/notifications/serviceworker-throw-constructor.html
new file mode 100644
index 0000000000000000000000000000000000000000..0ca9390af645eedcd1331d85e5d7a5756f998c62
--- /dev/null
+++ b/LayoutTests/http/tests/notifications/serviceworker-throw-constructor.html
@@ -0,0 +1,19 @@
+<!doctype html>
+<html>
+ <head>
+ <title>Notifications: Constructing a Notification should throw in a Service Worker.</title>
+ <script src="../resources/testharness.js"></script>
+ <script src="../resources/testharnessreport.js"></script>
+ <script src="../serviceworker/resources/test-helpers.js"></script>
+ </head>
+ <body>
+ <script>
+ // Tests that the constructing a Notification object in a Service Worker
Michael van Ouwerkerk 2015/02/16 18:16:09 s/that the/that/
Peter Beverloo 2015/02/16 18:23:57 Done.
+ // throws a TypeError per the specification. Developers should be using
+ // registration.showNotification() instead.
+ service_worker_test(
+ 'resources/serviceworker-notification-constructor.js',
+ 'Notification constructor behavior in a Service Worker.');
+ </script>
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698