Commit 56e0c61a authored by Lucas Garron's avatar Lucas Garron Committed by Commit Bot

SSL browser tests: Use a WaitForInterstitial() wrapper compatible with committed interstitials.

Bug: 752372
Change-Id: I931681551c7c38a42cfef5c941d620c18c4562a3
Reviewed-on: https://chromium-review.googlesource.com/773563
Commit-Queue: Lucas Garron <lgarron@chromium.org>
Reviewed-by: default avatarMustafa Emre Acer <meacer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517259}
parent 227c3bf3
......@@ -420,6 +420,46 @@ void SetHSTSForHostName(
EXPECT_TRUE(state->ShouldUpgradeToSSL(kHstsTestHostName));
}
bool AreCommittedInterstitialsEnabled() {
return base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kCommittedInterstitials);
}
// A getter for the tab's InterstitialPageDelegate that is agnostic about
// whether we are using committed interstitials. Returns null if
// there is no delegate.
content::InterstitialPageDelegate* GetInterstitialPageDelegate(
content::WebContents* tab) {
if (AreCommittedInterstitialsEnabled()) {
SSLErrorTabHelper* helper = SSLErrorTabHelper::FromWebContents(tab);
if (!helper) {
return nullptr;
}
return helper->GetBlockingPageForCurrentlyCommittedNavigationForTesting();
}
InterstitialPage* interstitial_page = tab->GetInterstitialPage();
if (!interstitial_page)
return nullptr;
return interstitial_page->GetDelegateForTesting();
}
bool IsShowingInterstitial(content::WebContents* tab) {
return GetInterstitialPageDelegate(tab) != nullptr;
}
// Waits until an interstitial is showing.
//
// TODO(crbug.com/752372): This should not be needed for committed
// interstitials. Replace all call sites directly with the assert.
void WaitForInterstitial(content::WebContents* tab) {
if (!IsShowingInterstitial(tab)) {
ASSERT_TRUE(!AreCommittedInterstitialsEnabled());
content::WaitForInterstitialAttach(tab);
}
ASSERT_TRUE(IsShowingInterstitial(tab));
}
} // namespace
class SSLUITest : public InProcessBrowserTest {
......@@ -821,21 +861,14 @@ class SSLUITestTransientAndCommitted
WebContents* tab,
security_interstitials::SecurityInterstitialCommands command) {
// TODO(crbug.com/785077): Execute script inside the interstitial.
GetDelegate(tab)->CommandReceived(base::IntToString(command));
GetInterstitialPageDelegate(tab)->CommandReceived(
base::IntToString(command));
}
bool IsCommittedInterstitialTest() const { return GetParam(); }
content::InterstitialPageDelegate* GetDelegate(WebContents* tab) {
if (!IsCommittedInterstitialTest()) {
return tab->GetInterstitialPage()->GetDelegateForTesting();
}
return SSLErrorTabHelper::FromWebContents(tab)
->GetBlockingPageForCurrentlyCommittedNavigationForTesting();
}
SSLBlockingPage* GetBlockingPage(WebContents* tab) {
return static_cast<SSLBlockingPage*>(GetDelegate(tab));
return static_cast<SSLBlockingPage*>(GetInterstitialPageDelegate(tab));
}
};
......@@ -1169,8 +1202,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestBrokenHTTPSMetricsReporting_Proceed) {
// After navigating to the page, the totals should be set.
ui_test_utils::NavigateToURL(browser(),
https_server_expired_.GetURL("/title1.html"));
content::WaitForInterstitialAttach(
browser()->tab_strip_model()->GetActiveWebContents());
WaitForInterstitial(browser()->tab_strip_model()->GetActiveWebContents());
histograms.ExpectTotalCount(decision_histogram, 1);
histograms.ExpectBucketCount(decision_histogram,
security_interstitials::MetricsHelper::SHOW, 1);
......@@ -1206,8 +1238,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestBrokenHTTPSMetricsReporting_DontProceed) {
// After navigating to the page, the totals should be set.
ui_test_utils::NavigateToURL(browser(),
https_server_expired_.GetURL("/title1.html"));
content::WaitForInterstitialAttach(
browser()->tab_strip_model()->GetActiveWebContents());
WaitForInterstitial(browser()->tab_strip_model()->GetActiveWebContents());
histograms.ExpectTotalCount(decision_histogram, 1);
histograms.ExpectBucketCount(decision_histogram,
security_interstitials::MetricsHelper::SHOW, 1);
......@@ -1249,8 +1280,7 @@ IN_PROC_BROWSER_TEST_P(SSLUITestTransientAndCommitted,
browser(), https_server_expired_.GetURL("/ssl/google.html"));
WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents();
if (!IsCommittedInterstitialTest())
WaitForInterstitialAttach(tab);
WaitForInterstitial(tab);
CheckAuthenticationBrokenState(tab, net::CERT_STATUS_DATE_INVALID,
AuthState::SHOWING_INTERSTITIAL);
......@@ -1283,7 +1313,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestInterstitialCrossSiteNavigation) {
ASSERT_EQ("localhost", cross_site_url.host());
ui_test_utils::NavigateToURL(browser(), cross_site_url);
// An interstitial should be showing.
WaitForInterstitialAttach(tab);
WaitForInterstitial(tab);
CheckAuthenticationBrokenState(tab, net::CERT_STATUS_COMMON_NAME_INVALID,
AuthState::SHOWING_INTERSTITIAL);
......@@ -1347,7 +1377,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestHTTPSErrorCausedByClockUsingBuildTime) {
ui_test_utils::NavigateToURL(browser(),
https_server_expired_.GetURL("/title1.html"));
WebContents* clock_tab = browser()->tab_strip_model()->GetActiveWebContents();
content::WaitForInterstitialAttach(clock_tab);
WaitForInterstitial(clock_tab);
InterstitialPage* clock_interstitial = clock_tab->GetInterstitialPage();
ASSERT_TRUE(clock_interstitial);
EXPECT_EQ(BadClockBlockingPage::kTypeForTesting,
......@@ -1371,7 +1401,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestHTTPSErrorCausedByClockUsingNetwork) {
ui_test_utils::NavigateToURL(browser(),
https_server_expired_.GetURL("/title1.html"));
WebContents* clock_tab = browser()->tab_strip_model()->GetActiveWebContents();
content::WaitForInterstitialAttach(clock_tab);
WaitForInterstitial(clock_tab);
InterstitialPage* clock_interstitial = clock_tab->GetInterstitialPage();
ASSERT_TRUE(clock_interstitial);
EXPECT_EQ(BadClockBlockingPage::kTypeForTesting,
......@@ -1859,7 +1889,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestHTTPSErrorWithNoNavEntry) {
EXPECT_FALSE(chrome::CanGoBack(browser()));
// We should have an interstitial page showing.
WaitForInterstitialAttach(tab2);
WaitForInterstitial(tab2);
ASSERT_TRUE(tab2->GetInterstitialPage());
ASSERT_EQ(SSLBlockingPage::kTypeForTesting, tab2->GetInterstitialPage()
->GetDelegateForTesting()
......@@ -2441,7 +2471,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestCloseTabWithUnsafePopup) {
nav_observer.Wait();
// Since the popup is showing an interstitial, it shouldn't have a last
// committed entry.
content::WaitForInterstitialAttach(popup);
WaitForInterstitial(popup);
EXPECT_FALSE(popup->GetController().GetLastCommittedEntry());
ASSERT_TRUE(popup->GetController().GetVisibleEntry());
EXPECT_EQ(https_server_expired_.GetURL("/ssl/bad_iframe.html"),
......@@ -2491,7 +2521,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestRedirectGoodToBadHTTPS) {
GURL url2 = https_server_expired_.GetURL("/ssl/google.html");
WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents();
ui_test_utils::NavigateToURL(browser(), GURL(url1.spec() + url2.spec()));
content::WaitForInterstitialAttach(tab);
WaitForInterstitial(tab);
CheckAuthenticationBrokenState(tab, net::CERT_STATUS_DATE_INVALID,
AuthState::SHOWING_INTERSTITIAL);
......@@ -2530,7 +2560,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestRedirectHTTPToBadHTTPS) {
const GURL bad_https_url = https_server_expired_.GetURL("/ssl/google.html");
ui_test_utils::NavigateToURL(browser(),
GURL(http_url.spec() + bad_https_url.spec()));
WaitForInterstitialAttach(tab);
WaitForInterstitial(tab);
CheckAuthenticationBrokenState(tab, net::CERT_STATUS_DATE_INVALID,
AuthState::SHOWING_INTERSTITIAL);
......@@ -3636,7 +3666,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, ProceedLinkOverridable) {
WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents();
ui_test_utils::NavigateToURL(
browser(), https_server_expired_.GetURL("/ssl/google.html"));
content::WaitForInterstitialAttach(tab);
WaitForInterstitial(tab);
CheckAuthenticationBrokenState(tab, net::CERT_STATUS_DATE_INVALID,
AuthState::SHOWING_INTERSTITIAL);
......@@ -3683,7 +3713,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITestHSTS, TestInterstitialOptionsNonOverridable) {
.ReplaceComponents(replacements);
ui_test_utils::NavigateToURL(browser(), url);
content::WaitForInterstitialAttach(tab);
WaitForInterstitial(tab);
// Since we are connecting to a different domain than the test server default,
// we also expect CERT_STATUS_COMMON_NAME_INVALID.
CheckAuthenticationBrokenState(
......@@ -3720,8 +3750,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestInterstitialLinksOpenInNewTab) {
browser()->tab_strip_model()->GetActiveWebContents();
ui_test_utils::NavigateToURL(
browser(), https_server_expired_.GetURL("/ssl/google.html"));
content::WaitForInterstitialAttach(
browser()->tab_strip_model()->GetActiveWebContents());
WaitForInterstitial(browser()->tab_strip_model()->GetActiveWebContents());
InterstitialPage* interstitial_page = interstitial_tab->GetInterstitialPage();
ASSERT_TRUE(
content::WaitForRenderFrameReady(interstitial_page->GetMainFrame()));
......@@ -3841,7 +3870,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest,
ui_test_utils::NavigateToURL(
browser(), https_server_expired_.GetURL("/ssl/google.html"));
content::WaitForInterstitialAttach(tab);
WaitForInterstitial(tab);
EXPECT_TRUE(tab->ShowingInterstitialPage());
content::NavigationEntry* entry = tab->GetController().GetActiveEntry();
......@@ -3876,7 +3905,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest,
ui_test_utils::NavigateToURL(browser(),
https_server_expired_.GetURL("/title1.html"));
content::WaitForInterstitialAttach(tab);
WaitForInterstitial(tab);
InterstitialPage* clock_interstitial = tab->GetInterstitialPage();
ASSERT_TRUE(clock_interstitial);
EXPECT_EQ(BadClockBlockingPage::kTypeForTesting,
......@@ -3892,7 +3921,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest,
mock_clock.SetNow(base::Time::NowFromSystemTime());
ui_test_utils::NavigateToURL(browser(),
https_server_expired_.GetURL("/title1.html"));
content::WaitForInterstitialAttach(tab);
WaitForInterstitial(tab);
InterstitialPage* ssl_interstitial = tab->GetInterstitialPage();
ASSERT_TRUE(ssl_interstitial);
EXPECT_EQ(SSLBlockingPage::kTypeForTesting,
......@@ -4178,7 +4207,7 @@ IN_PROC_BROWSER_TEST_F(SSLNetworkTimeBrowserTest, OnDemandFetchClockOk) {
EXPECT_TRUE(contents->IsLoading());
observer.Wait();
content::WaitForInterstitialAttach(contents);
WaitForInterstitial(contents);
EXPECT_TRUE(contents->ShowingInterstitialPage());
InterstitialPage* interstitial_page = contents->GetInterstitialPage();
......@@ -4231,7 +4260,7 @@ IN_PROC_BROWSER_TEST_F(SSLNetworkTimeBrowserTest, OnDemandFetchClockWrong) {
EXPECT_TRUE(contents->IsLoading());
observer.Wait();
content::WaitForInterstitialAttach(contents);
WaitForInterstitial(contents);
EXPECT_TRUE(contents->ShowingInterstitialPage());
InterstitialPage* interstitial_page = contents->GetInterstitialPage();
......@@ -4251,7 +4280,7 @@ IN_PROC_BROWSER_TEST_F(SSLNetworkTimeBrowserTest,
ui_test_utils::NavigateToURL(browser(), https_server_expired_.GetURL("/"));
WebContents* contents = browser()->tab_strip_model()->GetActiveWebContents();
ASSERT_TRUE(contents);
content::WaitForInterstitialAttach(contents);
WaitForInterstitial(contents);
EXPECT_TRUE(contents->ShowingInterstitialPage());
InterstitialPage* interstitial_page = contents->GetInterstitialPage();
......@@ -4387,7 +4416,7 @@ IN_PROC_BROWSER_TEST_F(SSLNetworkTimeBrowserTest,
ui_test_utils::NavigateToURL(browser(), https_server_expired_.GetURL("/"));
WebContents* contents = browser()->tab_strip_model()->GetActiveWebContents();
ASSERT_TRUE(contents);
content::WaitForInterstitialAttach(contents);
WaitForInterstitial(contents);
EXPECT_TRUE(contents->ShowingInterstitialPage());
InterstitialPage* interstitial_page = contents->GetInterstitialPage();
......@@ -4657,7 +4686,7 @@ IN_PROC_BROWSER_TEST_F(CommonNameMismatchBrowserTest,
// (https://www.example.org) redirected to http://example.org.
WebContents* contents = browser()->tab_strip_model()->GetActiveWebContents();
ui_test_utils::NavigateToURL(browser(), https_server_mismatched_url);
WaitForInterstitialAttach(contents);
WaitForInterstitial(contents);
CheckSecurityState(contents, net::CERT_STATUS_COMMON_NAME_INVALID,
security_state::DANGEROUS,
......@@ -5210,7 +5239,7 @@ IN_PROC_BROWSER_TEST_F(SSLUICaptivePortalListTest, Disabled) {
SSLInterstitialTimerObserver interstitial_timer_observer(tab);
ui_test_utils::NavigateToURL(
browser(), https_server_mismatched_.GetURL("/ssl/blank_page.html"));
content::WaitForInterstitialAttach(tab);
WaitForInterstitial(tab);
InterstitialPage* interstitial_page = tab->GetInterstitialPage();
ASSERT_EQ(SSLBlockingPage::kTypeForTesting,
......@@ -5251,7 +5280,7 @@ IN_PROC_BROWSER_TEST_F(SSLUICaptivePortalListTest, Enabled_FromProto) {
SSLInterstitialTimerObserver interstitial_timer_observer(tab);
ui_test_utils::NavigateToURL(
browser(), https_server_mismatched_.GetURL("/ssl/blank_page.html"));
content::WaitForInterstitialAttach(tab);
WaitForInterstitial(tab);
InterstitialPage* interstitial_page = tab->GetInterstitialPage();
ASSERT_EQ(CaptivePortalBlockingPage::kTypeForTesting,
......@@ -5282,7 +5311,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, OSReportsCaptivePortal) {
SSLInterstitialTimerObserver interstitial_timer_observer(tab);
ui_test_utils::NavigateToURL(
browser(), https_server_mismatched_.GetURL("/ssl/blank_page.html"));
content::WaitForInterstitialAttach(tab);
WaitForInterstitial(tab);
InterstitialPage* interstitial_page = tab->GetInterstitialPage();
ASSERT_EQ(CaptivePortalBlockingPage::kTypeForTesting,
......@@ -5318,7 +5347,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, OSReportsCaptivePortal_FeatureDisabled) {
SSLInterstitialTimerObserver interstitial_timer_observer(tab);
ui_test_utils::NavigateToURL(
browser(), https_server_mismatched_.GetURL("/ssl/blank_page.html"));
content::WaitForInterstitialAttach(tab);
WaitForInterstitial(tab);
InterstitialPage* interstitial_page = tab->GetInterstitialPage();
ASSERT_EQ(SSLBlockingPage::kTypeForTesting,
......@@ -5406,7 +5435,7 @@ class SSLUICaptivePortalListResourceBundleTest
WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents();
SSLInterstitialTimerObserver interstitial_timer_observer(tab);
ui_test_utils::NavigateToURL(browser(), https_server()->GetURL("/"));
content::WaitForInterstitialAttach(tab);
WaitForInterstitial(tab);
InterstitialPage* interstitial_page = tab->GetInterstitialPage();
ASSERT_EQ(SSLBlockingPage::kTypeForTesting,
......@@ -5468,7 +5497,7 @@ IN_PROC_BROWSER_TEST_F(SSLUICaptivePortalListResourceBundleTest, Enabled) {
WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents();
SSLInterstitialTimerObserver interstitial_timer_observer(tab);
ui_test_utils::NavigateToURL(browser(), https_server()->GetURL("/"));
content::WaitForInterstitialAttach(tab);
WaitForInterstitial(tab);
InterstitialPage* interstitial_page = tab->GetInterstitialPage();
ASSERT_EQ(CaptivePortalBlockingPage::kTypeForTesting,
......@@ -5518,7 +5547,7 @@ IN_PROC_BROWSER_TEST_F(SSLUICaptivePortalListResourceBundleTest,
base::HistogramTester histograms;
SSLInterstitialTimerObserver interstitial_timer_observer(tab);
ui_test_utils::NavigateToURL(browser(), https_server()->GetURL("/"));
content::WaitForInterstitialAttach(tab);
WaitForInterstitial(tab);
InterstitialPage* interstitial_page = tab->GetInterstitialPage();
ASSERT_EQ(SSLBlockingPage::kTypeForTesting,
......@@ -5550,7 +5579,7 @@ IN_PROC_BROWSER_TEST_F(SSLUICaptivePortalListResourceBundleTest,
base::HistogramTester histograms;
SSLInterstitialTimerObserver interstitial_timer_observer(tab);
ui_test_utils::NavigateToURL(browser(), https_server()->GetURL("/"));
content::WaitForInterstitialAttach(tab);
WaitForInterstitial(tab);
InterstitialPage* interstitial_page = tab->GetInterstitialPage();
ASSERT_EQ(CaptivePortalBlockingPage::kTypeForTesting,
......@@ -5582,7 +5611,7 @@ IN_PROC_BROWSER_TEST_F(SSLUICaptivePortalListResourceBundleTest,
base::HistogramTester histograms;
SSLInterstitialTimerObserver interstitial_timer_observer(tab);
ui_test_utils::NavigateToURL(browser(), https_server()->GetURL("/"));
content::WaitForInterstitialAttach(tab);
WaitForInterstitial(tab);
InterstitialPage* interstitial_page = tab->GetInterstitialPage();
ASSERT_EQ(CaptivePortalBlockingPage::kTypeForTesting,
......@@ -5709,7 +5738,7 @@ class SSLUIMITMSoftwareTest : public CertVerifierBrowserTest {
WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents();
SSLInterstitialTimerObserver interstitial_timer_observer(tab);
ui_test_utils::NavigateToURL(browser(), GetHSTSTestURL());
content::WaitForInterstitialAttach(tab);
WaitForInterstitial(tab);
InterstitialPage* interstitial_page = tab->GetInterstitialPage();
ASSERT_EQ(MITMSoftwareBlockingPage::kTypeForTesting,
interstitial_page->GetDelegateForTesting()->GetTypeForTesting());
......@@ -5740,7 +5769,7 @@ class SSLUIMITMSoftwareTest : public CertVerifierBrowserTest {
WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents();
SSLInterstitialTimerObserver interstitial_timer_observer(tab);
ui_test_utils::NavigateToURL(browser(), GetHSTSTestURL());
content::WaitForInterstitialAttach(tab);
WaitForInterstitial(tab);
InterstitialPage* interstitial_page = tab->GetInterstitialPage();
ASSERT_EQ(SSLBlockingPage::kTypeForTesting,
interstitial_page->GetDelegateForTesting()->GetTypeForTesting());
......@@ -5861,7 +5890,7 @@ IN_PROC_BROWSER_TEST_F(
WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents();
SSLInterstitialTimerObserver interstitial_timer_observer(tab);
ui_test_utils::NavigateToURL(browser(), GetHSTSTestURL());
content::WaitForInterstitialAttach(tab);
WaitForInterstitial(tab);
InterstitialPage* interstitial_page = tab->GetInterstitialPage();
ASSERT_EQ(SSLBlockingPage::kTypeForTesting,
interstitial_page->GetDelegateForTesting()->GetTypeForTesting());
......@@ -5909,7 +5938,7 @@ IN_PROC_BROWSER_TEST_F(
WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents();
SSLInterstitialTimerObserver interstitial_timer_observer(tab);
ui_test_utils::NavigateToURL(browser(), GetHSTSTestURL());
content::WaitForInterstitialAttach(tab);
WaitForInterstitial(tab);
InterstitialPage* interstitial_page = tab->GetInterstitialPage();
ASSERT_EQ(SSLBlockingPage::kTypeForTesting,
interstitial_page->GetDelegateForTesting()->GetTypeForTesting());
......@@ -5955,7 +5984,7 @@ IN_PROC_BROWSER_TEST_F(SSLUIMITMSoftwareEnabledTest,
WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents();
SSLInterstitialTimerObserver interstitial_timer_observer(tab);
ui_test_utils::NavigateToURL(browser(), GetHSTSTestURL());
content::WaitForInterstitialAttach(tab);
WaitForInterstitial(tab);
InterstitialPage* interstitial_page = tab->GetInterstitialPage();
ASSERT_EQ(SSLBlockingPage::kTypeForTesting,
interstitial_page->GetDelegateForTesting()->GetTypeForTesting());
......@@ -6009,7 +6038,7 @@ IN_PROC_BROWSER_TEST_F(SSLUIMITMSoftwareEnabledTest,
SSLInterstitialTimerObserver interstitial_timer_observer(tab);
ui_test_utils::NavigateToURL(browser(),
https_server()->GetURL("/ssl/blank_page.html"));
content::WaitForInterstitialAttach(tab);
WaitForInterstitial(tab);
InterstitialPage* interstitial_page = tab->GetInterstitialPage();
ASSERT_EQ(SSLBlockingPage::kTypeForTesting,
interstitial_page->GetDelegateForTesting()->GetTypeForTesting());
......@@ -6237,7 +6266,7 @@ IN_PROC_BROWSER_TEST_F(SuperfishSSLUITest, SuperfishInterstitial) {
https_server_.GetURL("/ssl/google.html"));
content::WebContents* tab =
browser()->tab_strip_model()->GetActiveWebContents();
content::WaitForInterstitialAttach(tab);
WaitForInterstitial(tab);
InterstitialPage* interstitial_page = tab->GetInterstitialPage();
ASSERT_TRUE(interstitial_page);
EXPECT_TRUE(WaitForRenderFrameReady(interstitial_page->GetMainFrame()));
......@@ -6272,7 +6301,7 @@ IN_PROC_BROWSER_TEST_F(SuperfishSSLUITest, SuperfishInterstitialDisabled) {
https_server_.GetURL("/ssl/google.html"));
content::WebContents* tab =
browser()->tab_strip_model()->GetActiveWebContents();
content::WaitForInterstitialAttach(tab);
WaitForInterstitial(tab);
InterstitialPage* interstitial_page = tab->GetInterstitialPage();
ASSERT_TRUE(interstitial_page);
EXPECT_TRUE(WaitForRenderFrameReady(interstitial_page->GetMainFrame()));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment