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

Side by Side Diff: chrome/browser/chromeos/settings/signed_settings_unittest.cc

Issue 10854121: Fixes for handling of MockDBusThreadManager::GetSystemBus(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix the build for sure Created 8 years, 4 months 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) 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 "chrome/browser/chromeos/settings/signed_settings.h" 5 #include "chrome/browser/chromeos/settings/signed_settings.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/chromeos/cros/cros_library.h" 10 #include "chrome/browser/chromeos/cros/cros_library.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 file_thread_(BrowserThread::FILE), 111 file_thread_(BrowserThread::FILE),
112 mock_(new MockKeyUtils), 112 mock_(new MockKeyUtils),
113 injector_(mock_) /* injector_ takes ownership of mock_ */, 113 injector_(mock_) /* injector_ takes ownership of mock_ */,
114 mock_dbus_thread_manager_(new MockDBusThreadManager) { 114 mock_dbus_thread_manager_(new MockDBusThreadManager) {
115 } 115 }
116 116
117 virtual ~SignedSettingsTest() {} 117 virtual ~SignedSettingsTest() {}
118 118
119 virtual void SetUp() { 119 virtual void SetUp() {
120 file_thread_.Start(); 120 file_thread_.Start();
121 EXPECT_CALL(*mock_dbus_thread_manager_, GetSystemBus())
122 .WillRepeatedly(Return(reinterpret_cast<dbus::Bus*>(NULL)));
121 DBusThreadManager::InitializeForTesting(mock_dbus_thread_manager_); 123 DBusThreadManager::InitializeForTesting(mock_dbus_thread_manager_);
122 } 124 }
123 125
124 virtual void TearDown() { 126 virtual void TearDown() {
125 OwnerKeyUtils::set_factory(NULL); 127 OwnerKeyUtils::set_factory(NULL);
126 DBusThreadManager::Shutdown(); 128 DBusThreadManager::Shutdown();
127 } 129 }
128 130
129 void mock_service(SignedSettings* s, MockOwnershipService* m) { 131 void mock_service(SignedSettings* s, MockOwnershipService* m) {
130 s->set_service(m); 132 s->set_service(m);
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 .Times(1); 391 .Times(1);
390 392
391 s->Execute(); 393 s->Execute();
392 message_loop_.RunAllPending(); 394 message_loop_.RunAllPending();
393 395
394 s->OnKeyOpComplete(OwnerManager::OPERATION_FAILED, std::vector<uint8>()); 396 s->OnKeyOpComplete(OwnerManager::OPERATION_FAILED, std::vector<uint8>());
395 message_loop_.RunAllPending(); 397 message_loop_.RunAllPending();
396 } 398 }
397 399
398 } // namespace chromeos 400 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/settings/signed_settings_helper_unittest.cc ('k') | chromeos/display/output_configurator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698