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

Side by Side Diff: chrome/browser/chromeos/cros/cros_network_functions_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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "chrome/browser/chromeos/cros/cros_network_functions.h" 8 #include "chrome/browser/chromeos/cros/cros_network_functions.h"
9 #include "chrome/browser/chromeos/cros/sms_watcher.h" 9 #include "chrome/browser/chromeos/cros/sms_watcher.h"
10 #include "chromeos/dbus/mock_cashew_client.h" 10 #include "chromeos/dbus/mock_cashew_client.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 } // namespace 148 } // namespace
149 149
150 // Test for cros_network_functions.cc without Libcros. 150 // Test for cros_network_functions.cc without Libcros.
151 class CrosNetworkFunctionsTest : public testing::Test { 151 class CrosNetworkFunctionsTest : public testing::Test {
152 public: 152 public:
153 CrosNetworkFunctionsTest() : mock_profile_client_(NULL), 153 CrosNetworkFunctionsTest() : mock_profile_client_(NULL),
154 dictionary_value_result_(NULL) {} 154 dictionary_value_result_(NULL) {}
155 155
156 virtual void SetUp() { 156 virtual void SetUp() {
157 MockDBusThreadManager* mock_dbus_thread_manager = new MockDBusThreadManager; 157 MockDBusThreadManager* mock_dbus_thread_manager = new MockDBusThreadManager;
158 EXPECT_CALL(*mock_dbus_thread_manager, GetSystemBus())
159 .WillRepeatedly(Return(reinterpret_cast<dbus::Bus*>(NULL)));
158 DBusThreadManager::InitializeForTesting(mock_dbus_thread_manager); 160 DBusThreadManager::InitializeForTesting(mock_dbus_thread_manager);
159 mock_cashew_client_ = mock_dbus_thread_manager->mock_cashew_client(); 161 mock_cashew_client_ = mock_dbus_thread_manager->mock_cashew_client();
160 mock_device_client_ = 162 mock_device_client_ =
161 mock_dbus_thread_manager->mock_flimflam_device_client(); 163 mock_dbus_thread_manager->mock_flimflam_device_client();
162 mock_ipconfig_client_ = 164 mock_ipconfig_client_ =
163 mock_dbus_thread_manager->mock_flimflam_ipconfig_client(); 165 mock_dbus_thread_manager->mock_flimflam_ipconfig_client();
164 mock_manager_client_ = 166 mock_manager_client_ =
165 mock_dbus_thread_manager->mock_flimflam_manager_client(); 167 mock_dbus_thread_manager->mock_flimflam_manager_client();
166 mock_network_client_ = 168 mock_network_client_ =
167 mock_dbus_thread_manager->mock_flimflam_network_client(); 169 mock_dbus_thread_manager->mock_flimflam_network_client();
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
1056 const std::string string2 = "string2"; 1058 const std::string string2 = "string2";
1057 base::DictionaryValue value; 1059 base::DictionaryValue value;
1058 value.SetString(key1, string1); 1060 value.SetString(key1, string1);
1059 value.SetString(key2, string2); 1061 value.SetString(key2, string2);
1060 EXPECT_CALL(*mock_manager_client_, ConfigureService(IsEqualTo(&value), _)) 1062 EXPECT_CALL(*mock_manager_client_, ConfigureService(IsEqualTo(&value), _))
1061 .Times(1); 1063 .Times(1);
1062 CrosConfigureService(value); 1064 CrosConfigureService(value);
1063 } 1065 }
1064 1066
1065 } // namespace chromeos 1067 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/bluetooth/bluetooth_device.cc ('k') | chrome/browser/chromeos/dbus/cros_dbus_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698