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

Unified Diff: chrome/browser/chromeos/login/captive_portal_window_browsertest.cc

Issue 245113003: Removed dependency on the UI from the NetworkPortalDetector. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 7 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/chromeos/login/screens/error_screen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/captive_portal_window_browsertest.cc
diff --git a/chrome/browser/chromeos/login/captive_portal_window_browsertest.cc b/chrome/browser/chromeos/login/captive_portal_window_browsertest.cc
index cccf9aefb5aaafde0c50b5b39910ff1928898532..23b2d1f7072f6e23277606a1a603e0fbc8f4886d 100644
--- a/chrome/browser/chromeos/login/captive_portal_window_browsertest.cc
+++ b/chrome/browser/chromeos/login/captive_portal_window_browsertest.cc
@@ -199,6 +199,10 @@ class CaptivePortalWindowCtorDtorTest : public LoginManagerTest {
return network_portal_detector_;
}
+ PortalDetectorStrategy::StrategyId strategy_id() {
+ return network_portal_detector_->strategy_id();
+ }
+
private:
NetworkPortalDetectorTestImpl* network_portal_detector_;
@@ -210,16 +214,22 @@ IN_PROC_BROWSER_TEST_F(CaptivePortalWindowCtorDtorTest, PRE_OpenPortalDialog) {
}
IN_PROC_BROWSER_TEST_F(CaptivePortalWindowCtorDtorTest, OpenPortalDialog) {
- network_portal_detector()->NotifyObserversForTesting();
- OobeScreenWaiter(OobeDisplay::SCREEN_ERROR_MESSAGE).Wait();
LoginDisplayHostImpl* host =
static_cast<LoginDisplayHostImpl*>(LoginDisplayHostImpl::default_host());
-
ASSERT_TRUE(host);
OobeUI* oobe = host->GetOobeUI();
ASSERT_TRUE(oobe);
ErrorScreenActor* actor = oobe->GetErrorScreenActor();
ASSERT_TRUE(actor);
+
+ // Error screen asks portal detector to change detection strategy.
+ ErrorScreen error_screen(NULL, actor);
+
+ ASSERT_EQ(PortalDetectorStrategy::STRATEGY_ID_LOGIN_SCREEN, strategy_id());
+ network_portal_detector()->NotifyObserversForTesting();
+ OobeScreenWaiter(OobeDisplay::SCREEN_ERROR_MESSAGE).Wait();
+ ASSERT_EQ(PortalDetectorStrategy::STRATEGY_ID_ERROR_SCREEN, strategy_id());
+
actor->ShowCaptivePortal();
}
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/screens/error_screen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698