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

Side by Side Diff: LayoutTests/fast/notifications/notification-close.html

Issue 186713002: Add new layout tests for the Web Notification API. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <p>
8 Tests that Notification.close() closes the notification, and the Notificat ion.onclose event gets called.
9 </p>
10 <div id="console"></div>
11 <script>
12 if (window.testRunner) {
13 testRunner.grantWebNotificationPermission("file://", true);
14 testRunner.waitUntilDone();
15 }
16
17 var notification = new Notification("Notification");
18 notification.addEventListener("show", function() {
19 testPassed("notification.onshow() has been called.");
20 notification.close();
21 });
22
23 notification.addEventListener("close", function() {
24 testPassed("notification.onclose() has been called.");
25 if (window.testRunner)
26 testRunner.notifyDone();
27 });
28 </script>
29 </body>
30 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698