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