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: chromeos/network/cros_network_functions_unittest.cc

Issue 12279012: Change the modem reset command on cellular activation completion. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
« no previous file with comments | « chromeos/network/cros_network_functions.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chromeos/dbus/mock_dbus_thread_manager.h" 8 #include "chromeos/dbus/mock_dbus_thread_manager.h"
9 #include "chromeos/dbus/mock_gsm_sms_client.h" 9 #include "chromeos/dbus/mock_gsm_sms_client.h"
10 #include "chromeos/dbus/mock_shill_device_client.h" 10 #include "chromeos/dbus/mock_shill_device_client.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 TEST_F(CrosNetworkFunctionsTest, CrosActivateCellularModem) { 178 TEST_F(CrosNetworkFunctionsTest, CrosActivateCellularModem) {
179 const std::string service_path = "/"; 179 const std::string service_path = "/";
180 const std::string carrier = "carrier"; 180 const std::string carrier = "carrier";
181 EXPECT_CALL(*mock_service_client_, 181 EXPECT_CALL(*mock_service_client_,
182 CallActivateCellularModemAndBlock(dbus::ObjectPath(service_path), 182 CallActivateCellularModemAndBlock(dbus::ObjectPath(service_path),
183 carrier)) 183 carrier))
184 .WillOnce(Return(true)); 184 .WillOnce(Return(true));
185 EXPECT_TRUE(CrosActivateCellularModem(service_path, carrier)); 185 EXPECT_TRUE(CrosActivateCellularModem(service_path, carrier));
186 } 186 }
187 187
188 TEST_F(CrosNetworkFunctionsTest, CrosCompleteCellularActivation) {
189 const std::string service_path = "/";
190 EXPECT_CALL(*mock_service_client_,
191 CompleteCellularActivation(dbus::ObjectPath(service_path), _, _))
192 .Times(1);
193
194 CrosCompleteCellularActivation(service_path);
195 }
196
188 TEST_F(CrosNetworkFunctionsTest, CrosSetNetworkServiceProperty) { 197 TEST_F(CrosNetworkFunctionsTest, CrosSetNetworkServiceProperty) {
189 const std::string service_path = "/"; 198 const std::string service_path = "/";
190 const std::string property = "property"; 199 const std::string property = "property";
191 const std::string key1 = "key1"; 200 const std::string key1 = "key1";
192 const std::string string1 = "string1"; 201 const std::string string1 = "string1";
193 const std::string key2 = "key2"; 202 const std::string key2 = "key2";
194 const std::string string2 = "string2"; 203 const std::string string2 = "string2";
195 base::DictionaryValue value; 204 base::DictionaryValue value;
196 value.SetString(key1, string1); 205 value.SetString(key1, string1);
197 value.SetString(key2, string2); 206 value.SetString(key2, string2);
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 const std::string string2 = "string2"; 878 const std::string string2 = "string2";
870 base::DictionaryValue value; 879 base::DictionaryValue value;
871 value.SetString(key1, string1); 880 value.SetString(key1, string1);
872 value.SetString(key2, string2); 881 value.SetString(key2, string2);
873 EXPECT_CALL(*mock_manager_client_, ConfigureService(IsEqualTo(&value), _, _)) 882 EXPECT_CALL(*mock_manager_client_, ConfigureService(IsEqualTo(&value), _, _))
874 .Times(1); 883 .Times(1);
875 CrosConfigureService(value); 884 CrosConfigureService(value);
876 } 885 }
877 886
878 } // namespace chromeos 887 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/cros_network_functions.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698