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

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

Issue 2840593002: Remove usage of ScopedTaskScheduler. (Closed)
Patch Set: revert_client_cert_resolver_and_auto_connect_handler 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 void DBusErrorCallback(const std::string& error_name, 141 void DBusErrorCallback(const std::string& error_name,
142 const std::string& error_message) { 142 const std::string& error_message) {
143 ++error_callback_count_; 143 ++error_callback_count_;
144 } 144 }
145 145
146 void BasicErrorCallback(const std::string& error_message) { 146 void BasicErrorCallback(const std::string& error_message) {
147 ++error_callback_count_; 147 ++error_callback_count_;
148 } 148 }
149 149
150 protected: 150 protected:
151 base::test::ScopedTaskScheduler scoped_task_scheduler_; 151 base::test::ScopedTaskEnvironment scoped_task_environment_;
152 152
153 scoped_refptr<BluetoothAdapter> adapter_; 153 scoped_refptr<BluetoothAdapter> adapter_;
154 154
155 unsigned int success_callback_count_; 155 unsigned int success_callback_count_;
156 unsigned int error_callback_count_; 156 unsigned int error_callback_count_;
157 157
158 FakeDelegate fake_delegate_paired_; 158 FakeDelegate fake_delegate_paired_;
159 FakeDelegate fake_delegate_autopair_; 159 FakeDelegate fake_delegate_autopair_;
160 FakeDelegate fake_delegate_listen_; 160 FakeDelegate fake_delegate_listen_;
161 161
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 base::Unretained(this))); 379 base::Unretained(this)));
380 380
381 base::RunLoop().RunUntilIdle(); 381 base::RunLoop().RunUntilIdle();
382 382
383 EXPECT_FALSE(profile_user_ptr_); 383 EXPECT_FALSE(profile_user_ptr_);
384 EXPECT_EQ(0U, success_callback_count_); 384 EXPECT_EQ(0U, success_callback_count_);
385 EXPECT_EQ(2U, error_callback_count_); 385 EXPECT_EQ(2U, error_callback_count_);
386 } 386 }
387 387
388 } // namespace bluez 388 } // namespace bluez
OLDNEW
« no previous file with comments | « content/browser/renderer_host/text_input_client_mac_unittest.mm ('k') | media/base/demuxer_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698