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

Unified Diff: chrome/browser/ssl/ssl_browser_tests.cc

Issue 10837262: Re-enable SSLUITest.TestBadHTTPSDownload and get test exiting cleanly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..26b76cc1bfeae2b0a0a34fd8f6fa58ac422b61bd 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("");
@@ -678,6 +679,15 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, DISABLED_TestBadHTTPSDownload) {
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);
Randy Smith (Not in Mondays) 2012/08/15 18:27:06 You want to split these two lines apart, and make
+ observer.WaitForFinished();
+ }
}
//
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698