Skip to content

Commit

Permalink
[MemSheriff] Add ASSERTs to ferret out test flakes.
Browse files Browse the repository at this point in the history
SSLUITest::TestBrokenHTTPSReporting occasionally crashes around the
GetInterstitialPage() call on line 470. See e.g. http://build.chromium.org/p/chromium.memory.fyi/builders/Windows%20Browser%20%28DrMemory%20full%29%20%287%29/builds/1934.

Added ASSERTs to narrow down what is happening.

R=felt@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1495683002

Cr-Commit-Position: refs/heads/master@{#363596}
  • Loading branch information
chroby authored and Commit bot committed Dec 7, 2015
1 parent a97dd34 commit 59eec41
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions chrome/browser/ssl/ssl_browser_tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -459,15 +459,18 @@ class SSLUITest
ui_test_utils::NavigateToURL(browser, https_server_expired_.GetURL("/"));

WebContents* tab = browser->tab_strip_model()->GetActiveWebContents();
ASSERT_TRUE(tab != nullptr);
CheckAuthenticationBrokenState(tab, net::CERT_STATUS_DATE_INVALID,
AuthState::SHOWING_INTERSTITIAL);

scoped_ptr<SSLCertReporter> ssl_cert_reporter =
certificate_reporting_test_utils::SetUpMockSSLCertReporter(
&run_loop, expect_report);

ASSERT_TRUE(tab->GetInterstitialPage() != nullptr);
SSLBlockingPage* interstitial_page = static_cast<SSLBlockingPage*>(
tab->GetInterstitialPage()->GetDelegateForTesting());
ASSERT_TRUE(interstitial_page != nullptr);
interstitial_page->SetSSLCertReporterForTesting(ssl_cert_reporter.Pass());

EXPECT_EQ(std::string(), GetLatestHostnameReported());
Expand Down

0 comments on commit 59eec41

Please sign in to comment.