| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
| 7 #include "chrome/browser/chromeos/cros/mock_network_library.h" | 7 #include "chrome/browser/chromeos/cros/mock_network_library.h" |
| 8 #include "chrome/browser/chromeos/login/screens/mock_error_screen.h" | 8 #include "chrome/browser/chromeos/login/screens/mock_error_screen.h" |
| 9 #include "chrome/browser/chromeos/login/screens/mock_screen_observer.h" | 9 #include "chrome/browser/chromeos/login/screens/mock_screen_observer.h" |
| 10 #include "chrome/browser/chromeos/login/screens/update_screen.h" | 10 #include "chrome/browser/chromeos/login/screens/update_screen.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 new MockDBusThreadManagerWithoutGMock; | 48 new MockDBusThreadManagerWithoutGMock; |
| 49 DBusThreadManager::InitializeForTesting(mock_dbus_thread_manager); | 49 DBusThreadManager::InitializeForTesting(mock_dbus_thread_manager); |
| 50 WizardInProcessBrowserTest::SetUpInProcessBrowserTestFixture(); | 50 WizardInProcessBrowserTest::SetUpInProcessBrowserTestFixture(); |
| 51 cros_mock_->InitStatusAreaMocks(); | 51 cros_mock_->InitStatusAreaMocks(); |
| 52 cros_mock_->SetStatusAreaMocksExpectations(); | 52 cros_mock_->SetStatusAreaMocksExpectations(); |
| 53 | 53 |
| 54 fake_update_engine_client_ | 54 fake_update_engine_client_ |
| 55 = mock_dbus_thread_manager->fake_update_engine_client(); | 55 = mock_dbus_thread_manager->fake_update_engine_client(); |
| 56 | 56 |
| 57 mock_network_library_ = cros_mock_->mock_network_library(); | 57 mock_network_library_ = cros_mock_->mock_network_library(); |
| 58 EXPECT_CALL(*mock_network_library_, SetDefaultCheckPortalList()) | |
| 59 .Times(1); | |
| 60 EXPECT_CALL(*mock_network_library_, LoadOncNetworks(_, _)) | 58 EXPECT_CALL(*mock_network_library_, LoadOncNetworks(_, _)) |
| 61 .Times(AnyNumber()); | 59 .Times(AnyNumber()); |
| 62 | 60 |
| 63 // Setup network portal detector to return online state for both | 61 // Setup network portal detector to return online state for both |
| 64 // ethernet and wifi networks. Ethernet is an active network by | 62 // ethernet and wifi networks. Ethernet is an active network by |
| 65 // default. | 63 // default. |
| 66 network_portal_detector_stub_ = | 64 network_portal_detector_stub_ = |
| 67 static_cast<NetworkPortalDetectorStub*>( | 65 static_cast<NetworkPortalDetectorStub*>( |
| 68 NetworkPortalDetector::GetInstance()); | 66 NetworkPortalDetector::GetInstance()); |
| 69 NetworkPortalDetector::CaptivePortalState online_state; | 67 NetworkPortalDetector::CaptivePortalState online_state; |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 EXPECT_CALL(*mock_error_screen_actor_, | 349 EXPECT_CALL(*mock_error_screen_actor_, |
| 352 SetErrorState(ErrorScreen::ERROR_STATE_OFFLINE, std::string())) | 350 SetErrorState(ErrorScreen::ERROR_STATE_OFFLINE, std::string())) |
| 353 .Times(1); | 351 .Times(1); |
| 354 EXPECT_CALL(*mock_screen_observer_, ShowErrorScreen()) | 352 EXPECT_CALL(*mock_screen_observer_, ShowErrorScreen()) |
| 355 .Times(1); | 353 .Times(1); |
| 356 base::MessageLoop::current()->RunUntilIdle(); | 354 base::MessageLoop::current()->RunUntilIdle(); |
| 357 NotifyPortalDetectionCompleted(); | 355 NotifyPortalDetectionCompleted(); |
| 358 } | 356 } |
| 359 | 357 |
| 360 } // namespace chromeos | 358 } // namespace chromeos |
| OLD | NEW |