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

Unified Diff: chrome/browser/ui/login/login_prompt_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
Index: chrome/browser/ui/login/login_prompt_browsertest.cc
diff --git a/chrome/browser/ui/login/login_prompt_browsertest.cc b/chrome/browser/ui/login/login_prompt_browsertest.cc
index e232cca5a4ac98daa4cd3b78342b2b7c60256762..47791ccf33d730c4c963695c2b625b0d813c81da 100644
--- a/chrome/browser/ui/login/login_prompt_browsertest.cc
+++ b/chrome/browser/ui/login/login_prompt_browsertest.cc
@@ -12,6 +12,7 @@
#include "chrome/browser/prerender/prerender_manager.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
+#include "chrome/browser/ui/login/login_interstitial_delegate.h"
#include "chrome/browser/ui/login/login_prompt.h"
#include "chrome/browser/ui/login/login_prompt_test_utils.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
@@ -1170,6 +1171,10 @@ void LoginPromptBrowserTest::TestCrossOriginPrompt(
// login prompt is shown.
EXPECT_EQ(auth_host, contents->GetVisibleURL().host());
EXPECT_TRUE(contents->ShowingInterstitialPage());
+ EXPECT_EQ(LoginInterstitialDelegate::kTypeForTesting,
+ contents->GetInterstitialPage()
+ ->GetDelegateForTesting()
+ ->GetTypeForTesting());
// Cancel and wait for the interstitial to detach.
LoginHandler* handler = *observer.handlers().begin();
@@ -1248,6 +1253,10 @@ IN_PROC_BROWSER_TEST_F(
// being displayed.
EXPECT_EQ("127.0.0.1", contents->GetVisibleURL().host());
EXPECT_TRUE(contents->ShowingInterstitialPage());
+ EXPECT_EQ(LoginInterstitialDelegate::kTypeForTesting,
+ contents->GetInterstitialPage()
+ ->GetDelegateForTesting()
+ ->GetTypeForTesting());
// Cancelling the login prompt should detach the interstitial while keeping
// the correct origin.

Powered by Google App Engine
This is Rietveld 408576698