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

Side by Side Diff: chromeos/dbus/shill_profile_client_unittest.cc

Issue 2666093002: Remove base::FundamentalValue (Closed)
Patch Set: Rebase Created 3 years, 9 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
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/run_loop.h" 6 #include "base/run_loop.h"
7 #include "base/test/mock_callback.h" 7 #include "base/test/mock_callback.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chromeos/dbus/shill_client_unittest_base.h" 9 #include "chromeos/dbus/shill_client_unittest_base.h"
10 #include "chromeos/dbus/shill_profile_client.h" 10 #include "chromeos/dbus/shill_profile_client.h"
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 base::RunLoop().RunUntilIdle(); 159 base::RunLoop().RunUntilIdle();
160 } 160 }
161 161
162 TEST_F(ShillProfileClientTest, DeleteEntry) { 162 TEST_F(ShillProfileClientTest, DeleteEntry) {
163 // Create response. 163 // Create response.
164 std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); 164 std::unique_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
165 165
166 // Create the expected value. 166 // Create the expected value.
167 base::DictionaryValue value; 167 base::DictionaryValue value;
168 value.SetWithoutPathExpansion(shill::kOfflineModeProperty, 168 value.SetWithoutPathExpansion(shill::kOfflineModeProperty,
169 new base::FundamentalValue(true)); 169 new base::Value(true));
170 // Set expectations. 170 // Set expectations.
171 PrepareForMethodCall(shill::kDeleteEntryFunction, 171 PrepareForMethodCall(shill::kDeleteEntryFunction,
172 base::Bind(&ExpectStringArgument, kExampleEntryPath), 172 base::Bind(&ExpectStringArgument, kExampleEntryPath),
173 response.get()); 173 response.get());
174 // Call method. 174 // Call method.
175 base::MockCallback<base::Closure> mock_closure; 175 base::MockCallback<base::Closure> mock_closure;
176 base::MockCallback<ShillProfileClient::ErrorCallback> mock_error_callback; 176 base::MockCallback<ShillProfileClient::ErrorCallback> mock_error_callback;
177 client_->DeleteEntry(dbus::ObjectPath(kDefaultProfilePath), kExampleEntryPath, 177 client_->DeleteEntry(dbus::ObjectPath(kDefaultProfilePath), kExampleEntryPath,
178 mock_closure.Get(), mock_error_callback.Get()); 178 mock_closure.Get(), mock_error_callback.Get());
179 EXPECT_CALL(mock_closure, Run()).Times(1); 179 EXPECT_CALL(mock_closure, Run()).Times(1);
180 EXPECT_CALL(mock_error_callback, Run(_, _)).Times(0); 180 EXPECT_CALL(mock_error_callback, Run(_, _)).Times(0);
181 181
182 // Run the message loop. 182 // Run the message loop.
183 base::RunLoop().RunUntilIdle(); 183 base::RunLoop().RunUntilIdle();
184 } 184 }
185 185
186 } // namespace chromeos 186 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/shill_manager_client_unittest.cc ('k') | chromeos/dbus/shill_service_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698