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

Unified Diff: LayoutTests/fast/notifications/notifications-replace.html

Issue 187323005: Revert of Remove support for legacy WebKit Notifications (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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/fast/notifications/notifications-replace.html
diff --git a/LayoutTests/fast/notifications/notifications-replace.html b/LayoutTests/fast/notifications/notifications-replace.html
new file mode 100644
index 0000000000000000000000000000000000000000..cc56cf6721a6268b5aa5952844f53ead5baf1b2d
--- /dev/null
+++ b/LayoutTests/fast/notifications/notifications-replace.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script type="text/javascript">
+ function log(message)
+ {
+ document.getElementById("result").innerHTML += message + "<br>";
+ }
+
+ function runTests()
+ {
+ if (window.testRunner) {
+ testRunner.grantWebNotificationPermission("file://");
+ testRunner.dumpAsText();
+ if (testRunner.dumpNotifications)
+ testRunner.dumpNotifications();
+ }
+
+ if (!window.webkitNotifications) {
+ log("FAIL: No webkitNotifications interface!");
+ }
+
+ var M = window.webkitNotifications.createNotification("", "New E-mail", "Meet me tonight at 8!");
+ M.replaceId = "NewMail";
+ M.show();
+ var other = window.webkitNotifications.createNotification("", "Alarm", "It's time to wake up!");
+ other.show();
+ var N = window.webkitNotifications.createNotification("", "New reply", "Correction, 8:15");
+ N.replaceId = "NewMail";
+ N.show();
+ }
+ </script>
+</head>
+<body>
+<p>Showing notifications with replace ID...</p>
+<div id="result"></div>
+<script type="text/javascript">
+runTests();
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698