Index: chrome/browser/download/notification/download_notification_browsertest.cc |
diff --git a/chrome/browser/download/notification/download_notification_browsertest.cc b/chrome/browser/download/notification/download_notification_browsertest.cc |
index 4b72ddafcd3267bea4e296b8e9fd4a2e6d265bc3..8f28c4fbbec759503e5d8beb90a9fb1f71f4e7fe 100644 |
--- a/chrome/browser/download/notification/download_notification_browsertest.cc |
+++ b/chrome/browser/download/notification/download_notification_browsertest.cc |
@@ -374,6 +374,10 @@ IN_PROC_BROWSER_TEST_F(DownloadNotificationTest, DownloadFile) { |
EXPECT_EQ(message_center::NOTIFICATION_TYPE_PROGRESS, |
GetNotification(notification_id())->type()); |
+ // Confirms that the notification is updated periodically. |
+ NotificationUpdateObserver download_notification_periodically_update_observer; |
asanka
2015/10/12 18:59:08
Does this rely on the DownloadItem firing UpdateOb
yoshiki
2015/10/14 06:53:38
Thank you for suggestion. Thanks. PTAL
|
+ download_notification_periodically_update_observer.Wait(); |
+ |
NotificationUpdateObserver download_notification_update_observer; |
// Requests to complete the download. |
@@ -784,6 +788,13 @@ IN_PROC_BROWSER_TEST_F(DownloadNotificationTest, MAYBE_DownloadMultipleFiles) { |
EXPECT_EQ(message_center::DEFAULT_PRIORITY, |
GetNotification(notification_id2)->priority()); |
+ // Confirms that both notifications are updated periodically. |
+ std::set<std::string> updated_ids; |
+ while (updated_ids.size() != 2) { |
+ NotificationUpdateObserver notification_periodically_update_observer; |
+ updated_ids.insert(notification_periodically_update_observer.Wait()); |
+ } |
+ |
// Requests to complete the downloads. |
ui_test_utils::NavigateToURL( |
browser(), GURL(net::URLRequestSlowDownloadJob::kFinishDownloadUrl)); |