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

Side by Side Diff: LayoutTests/fast/notifications/notification-click.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
« no previous file with comments | « no previous file | LayoutTests/fast/notifications/notification-click-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.click() will result in the onclick event being cal led. When
9 running this test manually, accept the permission and click on the shown n otification.
10 </p>
11 <div id="console"></div>
12 <script>
13 if (window.testRunner) {
14 testRunner.grantWebNotificationPermission("file://", true);
15 testRunner.waitUntilDone();
16 }
17
18 var notification = new Notification("Notification");
19 notification.addEventListener("show", function() {
20 testPassed("notification.onshow() has been called.");
21 if (window.testRunner)
22 testRunner.simulateWebNotificationClick("Notification");
23 });
24
25 notification.addEventListener("click", function() {
26 testPassed("notification.onclick() has been called.");
27 notification.close();
28
29 if (window.testRunner)
30 testRunner.notifyDone();
31 });
32 </script>
33 </body>
34 </body>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/notifications/notification-click-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698