OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/compiler_specific.h" | 6 #include "base/compiler_specific.h" |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "chrome/browser/chromeos/login/login_manager_test.h" | 9 #include "chrome/browser/chromeos/login/login_manager_test.h" |
10 #include "chrome/browser/chromeos/login/startup_utils.h" | 10 #include "chrome/browser/chromeos/login/startup_utils.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 captive_portal_window_proxy_->OnOriginalURLLoaded(); | 67 captive_portal_window_proxy_->OnOriginalURLLoaded(); |
68 } | 68 } |
69 | 69 |
70 void CheckState(bool is_shown, int num_portal_notifications) { | 70 void CheckState(bool is_shown, int num_portal_notifications) { |
71 bool actual_is_shown = (CaptivePortalWindowProxy::STATE_DISPLAYED == | 71 bool actual_is_shown = (CaptivePortalWindowProxy::STATE_DISPLAYED == |
72 captive_portal_window_proxy_->GetState()); | 72 captive_portal_window_proxy_->GetState()); |
73 ASSERT_EQ(is_shown, actual_is_shown); | 73 ASSERT_EQ(is_shown, actual_is_shown); |
74 ASSERT_EQ(num_portal_notifications, delegate_.num_portal_notifications()); | 74 ASSERT_EQ(num_portal_notifications, delegate_.num_portal_notifications()); |
75 } | 75 } |
76 | 76 |
77 virtual void SetUpCommandLine(CommandLine* command_line) override { | 77 virtual void SetUpCommandLine(base::CommandLine* command_line) override { |
78 command_line->AppendSwitch(chromeos::switches::kForceLoginManagerInTests); | 78 command_line->AppendSwitch(chromeos::switches::kForceLoginManagerInTests); |
79 command_line->AppendSwitch(chromeos::switches::kLoginManager); | 79 command_line->AppendSwitch(chromeos::switches::kLoginManager); |
80 } | 80 } |
81 | 81 |
82 virtual void SetUpOnMainThread() override { | 82 virtual void SetUpOnMainThread() override { |
83 host_ = LoginDisplayHostImpl::default_host(); | 83 host_ = LoginDisplayHostImpl::default_host(); |
84 CHECK(host_); | 84 CHECK(host_); |
85 content::WebContents* web_contents = | 85 content::WebContents* web_contents = |
86 LoginDisplayHostImpl::default_host()->GetWebUILoginView()-> | 86 LoginDisplayHostImpl::default_host()->GetWebUILoginView()-> |
87 GetWebContents(); | 87 GetWebContents(); |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 | 227 |
228 ASSERT_EQ(PortalDetectorStrategy::STRATEGY_ID_LOGIN_SCREEN, strategy_id()); | 228 ASSERT_EQ(PortalDetectorStrategy::STRATEGY_ID_LOGIN_SCREEN, strategy_id()); |
229 network_portal_detector()->NotifyObserversForTesting(); | 229 network_portal_detector()->NotifyObserversForTesting(); |
230 OobeScreenWaiter(OobeDisplay::SCREEN_ERROR_MESSAGE).Wait(); | 230 OobeScreenWaiter(OobeDisplay::SCREEN_ERROR_MESSAGE).Wait(); |
231 ASSERT_EQ(PortalDetectorStrategy::STRATEGY_ID_ERROR_SCREEN, strategy_id()); | 231 ASSERT_EQ(PortalDetectorStrategy::STRATEGY_ID_ERROR_SCREEN, strategy_id()); |
232 | 232 |
233 actor->ShowCaptivePortal(); | 233 actor->ShowCaptivePortal(); |
234 } | 234 } |
235 | 235 |
236 } // namespace chromeos | 236 } // namespace chromeos |
OLD | NEW |