Index: chrome/browser/ssl/ssl_browser_tests.cc |
diff --git a/chrome/browser/ssl/ssl_browser_tests.cc b/chrome/browser/ssl/ssl_browser_tests.cc |
index 0329ebcdc372558612719be1b5111ae2ea01ffed..a0f8d9be7f624a1f00ea64556915c7f8beaa7986 100644 |
--- a/chrome/browser/ssl/ssl_browser_tests.cc |
+++ b/chrome/browser/ssl/ssl_browser_tests.cc |
@@ -9,6 +9,8 @@ |
#include "base/time.h" |
#include "base/utf_string_conversions.h" |
#include "chrome/app/chrome_command_ids.h" |
+#include "chrome/browser/download/download_test_observer.h" |
+#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/ui/browser.h" |
#include "chrome/browser/ui/browser_commands.h" |
#include "chrome/browser/ui/browser_navigator.h" |
@@ -21,6 +23,7 @@ |
#include "chrome/common/chrome_switches.h" |
#include "chrome/test/base/in_process_browser_test.h" |
#include "chrome/test/base/ui_test_utils.h" |
+#include "content/public/browser/browser_context.h" |
#include "content/public/browser/interstitial_page.h" |
#include "content/public/browser/navigation_controller.h" |
#include "content/public/browser/navigation_entry.h" |
@@ -635,9 +638,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, MAYBE_TestHTTPSErrorWithNoNavEntry) { |
ASSERT_TRUE(tab2->web_contents()->GetInterstitialPage()); |
} |
-// Disabled due to crash in downloads code that this triggers. |
-// http://crbug.com/95331 |
-IN_PROC_BROWSER_TEST_F(SSLUITest, DISABLED_TestBadHTTPSDownload) { |
+IN_PROC_BROWSER_TEST_F(SSLUITest, TestBadHTTPSDownload) { |
ASSERT_TRUE(test_server()->Start()); |
ASSERT_TRUE(https_server_expired_.Start()); |
GURL url_non_dangerous = test_server()->GetURL(""); |
@@ -677,7 +678,15 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, DISABLED_TestBadHTTPSDownload) { |
// active interstitial simply hides the interstitial. |
ASSERT_TRUE(tab->GetInterstitialPage() != NULL); |
EXPECT_TRUE(chrome::CanGoBack(browser())); |
- chrome::GoBack(browser(), CURRENT_TAB); |
+ { |
+ // To exit the browser cleanly we need to complete the download. |
+ DownloadTestObserverTerminal observer( |
+ content::BrowserContext::GetDownloadManager(browser()->profile()), |
+ 1, |
+ DownloadTestObserver::ON_DANGEROUS_DOWNLOAD_ACCEPT); |
+ chrome::GoBack(browser(), CURRENT_TAB); |
+ observer.WaitForFinished(); |
+ } |
} |
// |