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/login/screens/mock_error_screen.h" | 7 #include "chrome/browser/chromeos/login/screens/mock_error_screen.h" |
8 #include "chrome/browser/chromeos/login/screens/mock_screen_observer.h" | 8 #include "chrome/browser/chromeos/login/screens/mock_screen_observer.h" |
9 #include "chrome/browser/chromeos/login/screens/update_screen.h" | 9 #include "chrome/browser/chromeos/login/screens/update_screen.h" |
10 #include "chrome/browser/chromeos/login/wizard_controller.h" | 10 #include "chrome/browser/chromeos/login/wizard_controller.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 protected: | 43 protected: |
44 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { | 44 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { |
45 FakeDBusThreadManager* fake_dbus_thread_manager = | 45 FakeDBusThreadManager* fake_dbus_thread_manager = |
46 new FakeDBusThreadManager; | 46 new FakeDBusThreadManager; |
47 fake_dbus_thread_manager->SetFakeClients(); | 47 fake_dbus_thread_manager->SetFakeClients(); |
48 fake_update_engine_client_ = new FakeUpdateEngineClient; | 48 fake_update_engine_client_ = new FakeUpdateEngineClient; |
49 fake_dbus_thread_manager->SetUpdateEngineClient( | 49 fake_dbus_thread_manager->SetUpdateEngineClient( |
50 scoped_ptr<UpdateEngineClient>(fake_update_engine_client_)); | 50 scoped_ptr<UpdateEngineClient>(fake_update_engine_client_)); |
51 | 51 |
52 DBusThreadManager::InitializeForTesting(fake_dbus_thread_manager); | 52 DBusThreadManager::SetInstanceForTesting(fake_dbus_thread_manager); |
53 WizardInProcessBrowserTest::SetUpInProcessBrowserTestFixture(); | 53 WizardInProcessBrowserTest::SetUpInProcessBrowserTestFixture(); |
54 | 54 |
55 // Setup network portal detector to return online state for both | 55 // Setup network portal detector to return online state for both |
56 // ethernet and wifi networks. Ethernet is an active network by | 56 // ethernet and wifi networks. Ethernet is an active network by |
57 // default. | 57 // default. |
58 network_portal_detector_ = new NetworkPortalDetectorTestImpl(); | 58 network_portal_detector_ = new NetworkPortalDetectorTestImpl(); |
59 NetworkPortalDetector::InitializeForTesting(network_portal_detector_); | 59 NetworkPortalDetector::InitializeForTesting(network_portal_detector_); |
60 NetworkPortalDetector::CaptivePortalState online_state; | 60 NetworkPortalDetector::CaptivePortalState online_state; |
61 online_state.status = NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_ONLINE; | 61 online_state.status = NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_ONLINE; |
62 online_state.response_code = 204; | 62 online_state.response_code = 204; |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 chromeos::UpdateEngineClient::UPDATE_RESULT_FAILED); | 384 chromeos::UpdateEngineClient::UPDATE_RESULT_FAILED); |
385 EXPECT_CALL(*mock_screen_observer_, | 385 EXPECT_CALL(*mock_screen_observer_, |
386 OnExit(ScreenObserver::UPDATE_ERROR_CHECKING_FOR_UPDATE)) | 386 OnExit(ScreenObserver::UPDATE_ERROR_CHECKING_FOR_UPDATE)) |
387 .Times(1); | 387 .Times(1); |
388 | 388 |
389 update_screen_->OnConnectToNetworkRequested(kStubEthernetServicePath); | 389 update_screen_->OnConnectToNetworkRequested(kStubEthernetServicePath); |
390 base::MessageLoop::current()->RunUntilIdle(); | 390 base::MessageLoop::current()->RunUntilIdle(); |
391 } | 391 } |
392 | 392 |
393 } // namespace chromeos | 393 } // namespace chromeos |
OLD | NEW |