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

Side by Side Diff: device/bluetooth/bluez/bluetooth_adapter_profile_bluez_unittest.cc

Issue 2840593002: Remove usage of ScopedTaskScheduler. (Closed)
Patch Set: rebase Created 3 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 "device/bluetooth/bluez/bluetooth_adapter_profile_bluez.h" 5 #include "device/bluetooth/bluez/bluetooth_adapter_profile_bluez.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
11 #include "base/test/scoped_task_scheduler.h" 11 #include "base/test/scoped_task_environment.h"
12 #include "device/bluetooth/bluetooth_adapter.h" 12 #include "device/bluetooth/bluetooth_adapter.h"
13 #include "device/bluetooth/bluetooth_adapter_factory.h" 13 #include "device/bluetooth/bluetooth_adapter_factory.h"
14 #include "device/bluetooth/bluetooth_uuid.h" 14 #include "device/bluetooth/bluetooth_uuid.h"
15 #include "device/bluetooth/bluez/bluetooth_adapter_bluez.h" 15 #include "device/bluetooth/bluez/bluetooth_adapter_bluez.h"
16 #include "device/bluetooth/dbus/bluetooth_profile_service_provider.h" 16 #include "device/bluetooth/dbus/bluetooth_profile_service_provider.h"
17 #include "device/bluetooth/dbus/bluez_dbus_manager.h" 17 #include "device/bluetooth/dbus/bluez_dbus_manager.h"
18 #include "device/bluetooth/dbus/fake_bluetooth_adapter_client.h" 18 #include "device/bluetooth/dbus/fake_bluetooth_adapter_client.h"
19 #include "device/bluetooth/dbus/fake_bluetooth_agent_manager_client.h" 19 #include "device/bluetooth/dbus/fake_bluetooth_agent_manager_client.h"
20 #include "device/bluetooth/dbus/fake_bluetooth_device_client.h" 20 #include "device/bluetooth/dbus/fake_bluetooth_device_client.h"
21 #include "device/bluetooth/dbus/fake_bluetooth_profile_manager_client.h" 21 #include "device/bluetooth/dbus/fake_bluetooth_profile_manager_client.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 void DBusErrorCallback(const std::string& error_name, 143 void DBusErrorCallback(const std::string& error_name,
144 const std::string& error_message) { 144 const std::string& error_message) {
145 ++error_callback_count_; 145 ++error_callback_count_;
146 } 146 }
147 147
148 void BasicErrorCallback(const std::string& error_message) { 148 void BasicErrorCallback(const std::string& error_message) {
149 ++error_callback_count_; 149 ++error_callback_count_;
150 } 150 }
151 151
152 protected: 152 protected:
153 base::test::ScopedTaskScheduler scoped_task_scheduler_; 153 base::test::ScopedTaskEnvironment scoped_task_environment_;
154 154
155 scoped_refptr<BluetoothAdapter> adapter_; 155 scoped_refptr<BluetoothAdapter> adapter_;
156 156
157 unsigned int success_callback_count_; 157 unsigned int success_callback_count_;
158 unsigned int error_callback_count_; 158 unsigned int error_callback_count_;
159 159
160 FakeDelegate fake_delegate_paired_; 160 FakeDelegate fake_delegate_paired_;
161 FakeDelegate fake_delegate_autopair_; 161 FakeDelegate fake_delegate_autopair_;
162 FakeDelegate fake_delegate_listen_; 162 FakeDelegate fake_delegate_listen_;
163 163
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 base::Unretained(this))); 381 base::Unretained(this)));
382 382
383 base::RunLoop().RunUntilIdle(); 383 base::RunLoop().RunUntilIdle();
384 384
385 EXPECT_FALSE(profile_user_ptr_); 385 EXPECT_FALSE(profile_user_ptr_);
386 EXPECT_EQ(0U, success_callback_count_); 386 EXPECT_EQ(0U, success_callback_count_);
387 EXPECT_EQ(2U, error_callback_count_); 387 EXPECT_EQ(2U, error_callback_count_);
388 } 388 }
389 389
390 } // namespace bluez 390 } // namespace bluez
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698