Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(666)

Side by Side Diff: chrome/browser/chromeos/login/update_screen_browsertest.cc

Issue 8588006: Eliminate CrosLibrary::EnsureLoaded (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/message_loop.h" 5 #include "base/message_loop.h"
6 #include "chrome/browser/chromeos/cros/mock_network_library.h" 6 #include "chrome/browser/chromeos/cros/mock_network_library.h"
7 #include "chrome/browser/chromeos/cros/mock_update_library.h" 7 #include "chrome/browser/chromeos/cros/mock_update_library.h"
8 #include "chrome/browser/chromeos/dbus/mock_dbus_thread_manager.h" 8 #include "chrome/browser/chromeos/dbus/mock_dbus_thread_manager.h"
9 #include "chrome/browser/chromeos/dbus/mock_session_manager_client.h" 9 #include "chrome/browser/chromeos/dbus/mock_session_manager_client.h"
10 #include "chrome/browser/chromeos/login/mock_screen_observer.h" 10 #include "chrome/browser/chromeos/login/mock_screen_observer.h"
(...skipping 21 matching lines...) Expand all
32 mock_network_library_(NULL) {} 32 mock_network_library_(NULL) {}
33 33
34 protected: 34 protected:
35 virtual void SetUpInProcessBrowserTestFixture() { 35 virtual void SetUpInProcessBrowserTestFixture() {
36 MockDBusThreadManager* mock_dbus_thread_manager = 36 MockDBusThreadManager* mock_dbus_thread_manager =
37 new MockDBusThreadManager; 37 new MockDBusThreadManager;
38 DBusThreadManager::InitializeForTesting(mock_dbus_thread_manager); 38 DBusThreadManager::InitializeForTesting(mock_dbus_thread_manager);
39 WizardInProcessBrowserTest::SetUpInProcessBrowserTestFixture(); 39 WizardInProcessBrowserTest::SetUpInProcessBrowserTestFixture();
40 cros_mock_->InitStatusAreaMocks(); 40 cros_mock_->InitStatusAreaMocks();
41 cros_mock_->SetStatusAreaMocksExpectations(); 41 cros_mock_->SetStatusAreaMocksExpectations();
42 ASSERT_TRUE(CrosLibrary::Get()->EnsureLoaded());
43 42
44 MockSessionManagerClient* mock_session_manager_client 43 MockSessionManagerClient* mock_session_manager_client
45 = mock_dbus_thread_manager->mock_session_manager_client(); 44 = mock_dbus_thread_manager->mock_session_manager_client();
46 EXPECT_CALL(*mock_session_manager_client, EmitLoginPromptReady()) 45 EXPECT_CALL(*mock_session_manager_client, EmitLoginPromptReady())
47 .Times(1); 46 .Times(1);
48 47
49 mock_update_library_ = new MockUpdateLibrary(); 48 mock_update_library_ = new MockUpdateLibrary();
50 cros_mock_->test_api()->SetUpdateLibrary(mock_update_library_, true); 49 cros_mock_->test_api()->SetUpdateLibrary(mock_update_library_, true);
51 50
52 // UpdateScreen::StartUpdate() will be called by the WizardController 51 // UpdateScreen::StartUpdate() will be called by the WizardController
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 EXPECT_CALL(*mock_update_library_, status()) 208 EXPECT_CALL(*mock_update_library_, status())
210 .Times(AtLeast(1)) 209 .Times(AtLeast(1))
211 .WillRepeatedly(ReturnRef(status)); 210 .WillRepeatedly(ReturnRef(status));
212 EXPECT_CALL(*mock_screen_observer_, 211 EXPECT_CALL(*mock_screen_observer_,
213 OnExit(ScreenObserver::UPDATE_ERROR_UPDATING)) 212 OnExit(ScreenObserver::UPDATE_ERROR_UPDATING))
214 .Times(1); 213 .Times(1);
215 update_screen_->UpdateStatusChanged(status); 214 update_screen_->UpdateStatusChanged(status);
216 } 215 }
217 216
218 } // namespace chromeos 217 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/update_screen.cc ('k') | chrome/browser/chromeos/login/user_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698