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

Unified Diff: chrome/test/data/notifications/notification_tester.html

Issue 11434073: Revert r170623 "Convert HTML5 notification pyauto tests to browser_tests." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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') | chrome/test/functional/PYAUTO_TESTS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/notifications/notification_tester.html
diff --git a/chrome/test/data/notifications/notification_tester.html b/chrome/test/data/notifications/notification_tester.html
index a5ad952e4a0ef3fbd7d8ff877936dc6dda9a3869..5bbe0f74126f36f9419a48e776fd7111e99380eb 100644
--- a/chrome/test/data/notifications/notification_tester.html
+++ b/chrome/test/data/notifications/notification_tester.html
@@ -26,6 +26,23 @@ function createNotification(iconUrl, title, text, replaceId) {
createNotificationHelper(note, replaceId, true);
}
+// Creates an HTML notification with a given content url.
+// Returns an id for the notification, which can be used to cancel it with
+// |cancelNotification|. If two notifications are created with the same
+// replaceId, the second one should replace the first. If the notification
+// cannot be created, this returns -1.
+// If |waitForDisplay| is true, a response will not be sent until the
+// notification is actually displayed.
+function createHTMLNotification(contentUrl, replaceId, waitForDisplay) {
+ try {
+ var note = webkitNotifications.createHTMLNotification(contentUrl);
+ } catch (exception) {
+ sendResultToTest(-1);
+ return;
+ }
+ createNotificationHelper(note, replaceId, waitForDisplay);
+}
+
// Cancels a notification with the given id. The notification must be showing,
// as opposed to waiting to be shown in the display queue.
// Returns '1' on success.
« no previous file with comments | « chrome/browser/notifications/notification_browsertest.cc ('k') | chrome/test/functional/PYAUTO_TESTS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698