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

Unified Diff: chrome/test/data/notifications/notification-double-close.html

Issue 752533002: Add a browser test to verify that double-closing a notification does not crash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 | « chrome/browser/notifications/notification_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/notifications/notification-double-close.html
diff --git a/chrome/test/data/notifications/notification-double-close.html b/chrome/test/data/notifications/notification-double-close.html
new file mode 100644
index 0000000000000000000000000000000000000000..45ae47bf7b2d3831b447b0d509d9c7be5e1a1f27
--- /dev/null
+++ b/chrome/test/data/notifications/notification-double-close.html
@@ -0,0 +1,30 @@
+<!doctype html>
+<html>
+ <head>
+ <title>Verifies that double-closing a notification doesn't crash.</title>
+ <meta charset="utf-8">
+ </head>
+ <body>
+ <script>
+ function createNotification(iconUrl, title, text, tag) {
+ var notification = new Notification(title, {
+ icon: iconUrl,
+ body: text,
+ tag: tag
+ });
+
+ notification.onshow = function() {
+ window.domAutomationController.send("0"); // success
+ };
+
+ notification.onerror = function() {
+ window.domAutomationController.send("-1"); // failure
+ };
+
+ notification.onclose = function() {
+ notification.close();
+ };
+ }
+ </script>
+ </body>
+</html>
« no previous file with comments | « chrome/browser/notifications/notification_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698