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

Side by Side Diff: device/bluetooth/bluetooth_adapter_profile_chromeos_unittest.cc

Issue 1124883004: Submission for C++ Readability (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/message_loop/message_loop.h" 6 #include "base/message_loop/message_loop.h"
7 #include "chromeos/dbus/bluetooth_profile_service_provider.h" 7 #include "chromeos/dbus/bluetooth_profile_service_provider.h"
8 #include "chromeos/dbus/dbus_thread_manager.h" 8 #include "chromeos/dbus/dbus_thread_manager.h"
9 #include "chromeos/dbus/fake_bluetooth_adapter_client.h" 9 #include "chromeos/dbus/fake_bluetooth_adapter_client.h"
10 #include "chromeos/dbus/fake_bluetooth_agent_manager_client.h" 10 #include "chromeos/dbus/fake_bluetooth_agent_manager_client.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 184
185 profile_->RemoveDelegate(fake_delegate_autopair_.device_path_, 185 profile_->RemoveDelegate(fake_delegate_autopair_.device_path_,
186 base::Bind(&base::DoNothing)); 186 base::Bind(&base::DoNothing));
187 187
188 EXPECT_EQ(1U, profile_->DelegateCount()); 188 EXPECT_EQ(1U, profile_->DelegateCount());
189 189
190 profile_->RemoveDelegate(fake_delegate_paired_.device_path_, 190 profile_->RemoveDelegate(fake_delegate_paired_.device_path_,
191 base::Bind(&base::DoNothing)); 191 base::Bind(&base::DoNothing));
192 192
193 EXPECT_EQ(0U, profile_->DelegateCount()); 193 EXPECT_EQ(0U, profile_->DelegateCount());
194 }; 194 };
omoikane 2015/05/22 23:55:27 This trailing semicolon is redundant and should be
195 195
196 TEST_F(BluetoothAdapterProfileChromeOSTest, BlackHole) { 196 TEST_F(BluetoothAdapterProfileChromeOSTest, BlackHole) {
197 BluetoothUUID uuid(FakeBluetoothProfileManagerClient::kRfcommUuid); 197 BluetoothUUID uuid(FakeBluetoothProfileManagerClient::kRfcommUuid);
198 BluetoothProfileManagerClient::Options options; 198 BluetoothProfileManagerClient::Options options;
199 199
200 options.require_authentication.reset(new bool(false)); 200 options.require_authentication.reset(new bool(false));
201 201
202 BluetoothAdapterProfileChromeOS::Register( 202 BluetoothAdapterProfileChromeOS::Register(
203 uuid, options, 203 uuid, options,
204 base::Bind(&BluetoothAdapterProfileChromeOSTest::ProfileSuccessCallback, 204 base::Bind(&BluetoothAdapterProfileChromeOSTest::ProfileSuccessCallback,
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 base::Unretained(this))); 374 base::Unretained(this)));
375 375
376 message_loop_.RunUntilIdle(); 376 message_loop_.RunUntilIdle();
377 377
378 EXPECT_FALSE(profile_user_ptr_); 378 EXPECT_FALSE(profile_user_ptr_);
379 EXPECT_EQ(0U, success_callback_count_); 379 EXPECT_EQ(0U, success_callback_count_);
380 EXPECT_EQ(2U, error_callback_count_); 380 EXPECT_EQ(2U, error_callback_count_);
381 }; 381 };
382 382
383 } // namespace chromeos 383 } // namespace chromeos
384
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698