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 369fccd8b603f30ccaf0196b13e53d690d963eee..5913659abcc0c7b4f70ce9171380bdd7930b639c 100644 |
--- a/chrome/browser/download/notification/download_notification_browsertest.cc |
+++ b/chrome/browser/download/notification/download_notification_browsertest.cc |
@@ -501,6 +501,28 @@ IN_PROC_BROWSER_TEST_F(DownloadNotificationTest, DiscardDangerousFile) { |
EXPECT_FALSE(base::PathExists(GetDownloadPath().Append(filename.BaseName()))); |
} |
+IN_PROC_BROWSER_TEST_F(DownloadNotificationTest, DownloadImageFile) { |
+ ASSERT_TRUE(test_server()->Start()); |
+ GURL download_url( |
+ test_server()->GetURL("files/downloads/image-octet-stream.png")); |
+ |
+ content::DownloadTestObserverTerminal download_terminal_observer( |
+ GetDownloadManager(browser()), |
+ 1u, /* wait_count */ |
+ content::DownloadTestObserver::ON_DANGEROUS_DOWNLOAD_IGNORE); |
+ |
+ CreateDownloadForBrowserAndURL(browser(), download_url); |
+ |
+ // Wait for the download completion. |
+ download_terminal_observer.WaitForFinished(); |
+ |
+ // Waits for download completion. |
+ while (GetNotification(notification_id())->image().IsEmpty()) { |
+ NotificationUpdateObserver download_change_notification_observer; |
+ download_change_notification_observer.Wait(); |
+ } |
+} |
+ |
IN_PROC_BROWSER_TEST_F(DownloadNotificationTest, |
CloseNotificationAfterDownload) { |
CreateDownload(); |