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

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

Issue 397793002: Eliminate CreateBooleanValue from test files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix bad merge Created 6 years, 5 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/values.h" 6 #include "base/values.h"
7 #include "chromeos/dbus/shill_client_unittest_base.h" 7 #include "chromeos/dbus/shill_client_unittest_base.h"
8 #include "chromeos/dbus/shill_profile_client.h" 8 #include "chromeos/dbus/shill_profile_client.h"
9 #include "dbus/message.h" 9 #include "dbus/message.h"
10 #include "dbus/object_path.h" 10 #include "dbus/object_path.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 message_loop_.RunUntilIdle(); 160 message_loop_.RunUntilIdle();
161 } 161 }
162 162
163 TEST_F(ShillProfileClientTest, DeleteEntry) { 163 TEST_F(ShillProfileClientTest, DeleteEntry) {
164 // Create response. 164 // Create response.
165 scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); 165 scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
166 166
167 // Create the expected value. 167 // Create the expected value.
168 base::DictionaryValue value; 168 base::DictionaryValue value;
169 value.SetWithoutPathExpansion(shill::kOfflineModeProperty, 169 value.SetWithoutPathExpansion(shill::kOfflineModeProperty,
170 base::Value::CreateBooleanValue(true)); 170 new base::FundamentalValue(true));
171 // Set expectations. 171 // Set expectations.
172 PrepareForMethodCall(shill::kDeleteEntryFunction, 172 PrepareForMethodCall(shill::kDeleteEntryFunction,
173 base::Bind(&ExpectStringArgument, kExampleEntryPath), 173 base::Bind(&ExpectStringArgument, kExampleEntryPath),
174 response.get()); 174 response.get());
175 // Call method. 175 // Call method.
176 MockClosure mock_closure; 176 MockClosure mock_closure;
177 MockErrorCallback mock_error_callback; 177 MockErrorCallback mock_error_callback;
178 client_->DeleteEntry(dbus::ObjectPath(kDefaultProfilePath), 178 client_->DeleteEntry(dbus::ObjectPath(kDefaultProfilePath),
179 kExampleEntryPath, 179 kExampleEntryPath,
180 mock_closure.GetCallback(), 180 mock_closure.GetCallback(),
181 mock_error_callback.GetCallback()); 181 mock_error_callback.GetCallback());
182 EXPECT_CALL(mock_closure, Run()).Times(1); 182 EXPECT_CALL(mock_closure, Run()).Times(1);
183 EXPECT_CALL(mock_error_callback, Run(_, _)).Times(0); 183 EXPECT_CALL(mock_error_callback, Run(_, _)).Times(0);
184 184
185 // Run the message loop. 185 // Run the message loop.
186 message_loop_.RunUntilIdle(); 186 message_loop_.RunUntilIdle();
187 } 187 }
188 188
189 } // namespace chromeos 189 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698