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

Unified Diff: chrome/browser/push_messaging/push_messaging_browsertest.cc

Issue 1149243005: Automatically close the default push notification when a real one appears. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/push_messaging/push_messaging_browsertest.cc
diff --git a/chrome/browser/push_messaging/push_messaging_browsertest.cc b/chrome/browser/push_messaging/push_messaging_browsertest.cc
index b03f0825b18d8b21aefc31a8bb12c1275775a298..aac984dc3145e866f7410f5450442bbb3296ba62 100644
--- a/chrome/browser/push_messaging/push_messaging_browsertest.cc
+++ b/chrome/browser/push_messaging/push_messaging_browsertest.cc
@@ -568,13 +568,13 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest,
EXPECT_EQ(kPushMessagingForcedNotificationTag, forced_notification.tag());
EXPECT_TRUE(forced_notification.silent());
- // Currently, this notification will stick around until the user or webapp
- // explicitly dismisses it (though we may change this later).
+ // The notification will be automatically dismissed when the developer shows
+ // a new notification themselves at a later point in time.
message.data["data"] = "shownotification";
SendMessageAndWaitUntilHandled(app_identifier, message);
ASSERT_TRUE(RunScript("resultQueue.pop()", &script_result, web_contents));
EXPECT_EQ("shownotification", script_result);
- EXPECT_EQ(2u, notification_manager()->GetNotificationCount());
+ EXPECT_EQ(1u, notification_manager()->GetNotificationCount());
johnme 2015/06/02 13:43:52 It would be nice to check that the right notificat
Peter Beverloo 2015/06/02 13:58:08 Done.
notification_manager()->CancelAll();
EXPECT_EQ(0u, notification_manager()->GetNotificationCount());

Powered by Google App Engine
This is Rietveld 408576698