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

Unified Diff: chrome/browser/captive_portal/captive_portal_browsertest.cc

Issue 962413002: Add type for testing to interstitials. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bauerb comments Created 5 years, 10 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 | chrome/browser/interstitials/security_interstitial_page.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/captive_portal/captive_portal_browsertest.cc
diff --git a/chrome/browser/captive_portal/captive_portal_browsertest.cc b/chrome/browser/captive_portal/captive_portal_browsertest.cc
index 5491de756c0833d5faf5ca0f1c7c6e84be18472b..32b297190e169019fcb9a0838dd6ad5333b2cfc2 100644
--- a/chrome/browser/captive_portal/captive_portal_browsertest.cc
+++ b/chrome/browser/captive_portal/captive_portal_browsertest.cc
@@ -900,7 +900,8 @@ class CaptivePortalBrowserTest : public InProcessBrowserTest {
bool CheckPending(Browser* browser);
// Returns the type of the interstitial being shown.
- const void* GetInterstitialType(WebContents* contents) const;
+ content::InterstitialPageDelegate::TypeID GetInterstitialType(
+ WebContents* contents) const;
// Returns the CaptivePortalTabReloader::State of |web_contents|.
CaptivePortalTabReloader::State GetStateOfTabReloader(
@@ -1142,14 +1143,13 @@ bool CaptivePortalBrowserTest::CheckPending(Browser* browser) {
captive_portal_service->TimerRunning();
}
-const void* CaptivePortalBrowserTest::GetInterstitialType(
- WebContents* contents) const {
+content::InterstitialPageDelegate::TypeID
+CaptivePortalBrowserTest::GetInterstitialType(WebContents* contents) const {
if (!contents->ShowingInterstitialPage())
return nullptr;
- SecurityInterstitialPage* blocking_page =
- static_cast<SecurityInterstitialPage*>(
- contents->GetInterstitialPage()->GetDelegateForTesting());
- return blocking_page->GetTypeForTesting();
+ return contents->GetInterstitialPage()
+ ->GetDelegateForTesting()
+ ->GetTypeForTesting();
}
CaptivePortalTabReloader::State CaptivePortalBrowserTest::GetStateOfTabReloader(
« no previous file with comments | « no previous file | chrome/browser/interstitials/security_interstitial_page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698