| 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 | 181 |
| 182 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { | 182 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { |
| 183 LoginManagerTest::SetUpInProcessBrowserTestFixture(); | 183 LoginManagerTest::SetUpInProcessBrowserTestFixture(); |
| 184 | 184 |
| 185 network_portal_detector_ = new NetworkPortalDetectorTestImpl(); | 185 network_portal_detector_ = new NetworkPortalDetectorTestImpl(); |
| 186 NetworkPortalDetector::InitializeForTesting(network_portal_detector_); | 186 NetworkPortalDetector::InitializeForTesting(network_portal_detector_); |
| 187 NetworkPortalDetector::CaptivePortalState portal_state; | 187 NetworkPortalDetector::CaptivePortalState portal_state; |
| 188 portal_state.status = NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_PORTAL; | 188 portal_state.status = NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_PORTAL; |
| 189 portal_state.response_code = 200; | 189 portal_state.response_code = 200; |
| 190 network_portal_detector_->SetDefaultNetworkPathForTesting( | 190 network_portal_detector_->SetDefaultNetworkPathForTesting( |
| 191 FakeShillManagerClient::kFakeEthernetNetworkPath); | 191 FakeShillManagerClient::kFakeEthernetNetworkPath, |
| 192 FakeShillManagerClient::kFakeEthernetNetworkPath /* guid */); |
| 192 network_portal_detector_->SetDetectionResultsForTesting( | 193 network_portal_detector_->SetDetectionResultsForTesting( |
| 193 FakeShillManagerClient::kFakeEthernetNetworkPath, portal_state); | 194 FakeShillManagerClient::kFakeEthernetNetworkPath, portal_state); |
| 194 } | 195 } |
| 195 | 196 |
| 196 protected: | 197 protected: |
| 197 NetworkPortalDetectorTestImpl* network_portal_detector() { | 198 NetworkPortalDetectorTestImpl* network_portal_detector() { |
| 198 return network_portal_detector_; | 199 return network_portal_detector_; |
| 199 } | 200 } |
| 200 | 201 |
| 201 PortalDetectorStrategy::StrategyId strategy_id() { | 202 PortalDetectorStrategy::StrategyId strategy_id() { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 226 | 227 |
| 227 ASSERT_EQ(PortalDetectorStrategy::STRATEGY_ID_LOGIN_SCREEN, strategy_id()); | 228 ASSERT_EQ(PortalDetectorStrategy::STRATEGY_ID_LOGIN_SCREEN, strategy_id()); |
| 228 network_portal_detector()->NotifyObserversForTesting(); | 229 network_portal_detector()->NotifyObserversForTesting(); |
| 229 OobeScreenWaiter(OobeDisplay::SCREEN_ERROR_MESSAGE).Wait(); | 230 OobeScreenWaiter(OobeDisplay::SCREEN_ERROR_MESSAGE).Wait(); |
| 230 ASSERT_EQ(PortalDetectorStrategy::STRATEGY_ID_ERROR_SCREEN, strategy_id()); | 231 ASSERT_EQ(PortalDetectorStrategy::STRATEGY_ID_ERROR_SCREEN, strategy_id()); |
| 231 | 232 |
| 232 actor->ShowCaptivePortal(); | 233 actor->ShowCaptivePortal(); |
| 233 } | 234 } |
| 234 | 235 |
| 235 } // namespace chromeos | 236 } // namespace chromeos |
| OLD | NEW |