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

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

Issue 136683004: Removes MessageLoop::TYPE_XXX where possible (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: resolve merge Created 6 years, 11 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
« no previous file with comments | « device/bluetooth/bluetooth_chromeos_unittest.cc ('k') | gin/modules/timer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/message_loop/message_loop.h" 5 #include "base/message_loop/message_loop.h"
6 #include "chromeos/dbus/fake_bluetooth_adapter_client.h" 6 #include "chromeos/dbus/fake_bluetooth_adapter_client.h"
7 #include "chromeos/dbus/fake_bluetooth_device_client.h" 7 #include "chromeos/dbus/fake_bluetooth_device_client.h"
8 #include "chromeos/dbus/fake_bluetooth_input_client.h" 8 #include "chromeos/dbus/fake_bluetooth_input_client.h"
9 #include "chromeos/dbus/fake_bluetooth_profile_manager_client.h" 9 #include "chromeos/dbus/fake_bluetooth_profile_manager_client.h"
10 #include "chromeos/dbus/fake_bluetooth_profile_service_provider.h" 10 #include "chromeos/dbus/fake_bluetooth_profile_service_provider.h"
(...skipping 13 matching lines...) Expand all
24 using device::BluetoothAdapter; 24 using device::BluetoothAdapter;
25 using device::BluetoothDevice; 25 using device::BluetoothDevice;
26 using device::BluetoothProfile; 26 using device::BluetoothProfile;
27 using device::BluetoothSocket; 27 using device::BluetoothSocket;
28 28
29 namespace chromeos { 29 namespace chromeos {
30 30
31 class BluetoothProfileChromeOSTest : public testing::Test { 31 class BluetoothProfileChromeOSTest : public testing::Test {
32 public: 32 public:
33 BluetoothProfileChromeOSTest() 33 BluetoothProfileChromeOSTest()
34 : message_loop_(base::MessageLoop::TYPE_IO), 34 : callback_count_(0),
35 callback_count_(0),
36 error_callback_count_(0), 35 error_callback_count_(0),
37 profile_callback_count_(0), 36 profile_callback_count_(0),
38 connection_callback_count_(0), 37 connection_callback_count_(0),
39 last_profile_(NULL), 38 last_profile_(NULL),
40 last_device_(NULL) {} 39 last_device_(NULL) {}
41 40
42 virtual void SetUp() { 41 virtual void SetUp() {
43 FakeDBusThreadManager* fake_dbus_thread_manager = new FakeDBusThreadManager; 42 FakeDBusThreadManager* fake_dbus_thread_manager = new FakeDBusThreadManager;
44 fake_bluetooth_profile_manager_client_ = 43 fake_bluetooth_profile_manager_client_ =
45 new FakeBluetoothProfileManagerClient; 44 new FakeBluetoothProfileManagerClient;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 void ConnectionCallback(const BluetoothDevice *device, 94 void ConnectionCallback(const BluetoothDevice *device,
96 scoped_refptr<BluetoothSocket> socket) { 95 scoped_refptr<BluetoothSocket> socket) {
97 ++connection_callback_count_; 96 ++connection_callback_count_;
98 last_device_ = device; 97 last_device_ = device;
99 last_socket_ = socket; 98 last_socket_ = socket;
100 99
101 message_loop_.Quit(); 100 message_loop_.Quit();
102 } 101 }
103 102
104 protected: 103 protected:
105 base::MessageLoop message_loop_; 104 base::MessageLoopForIO message_loop_;
106 105
107 FakeBluetoothProfileManagerClient* fake_bluetooth_profile_manager_client_; 106 FakeBluetoothProfileManagerClient* fake_bluetooth_profile_manager_client_;
108 scoped_refptr<BluetoothAdapter> adapter_; 107 scoped_refptr<BluetoothAdapter> adapter_;
109 108
110 unsigned int callback_count_; 109 unsigned int callback_count_;
111 unsigned int error_callback_count_; 110 unsigned int error_callback_count_;
112 unsigned int profile_callback_count_; 111 unsigned int profile_callback_count_;
113 unsigned int connection_callback_count_; 112 unsigned int connection_callback_count_;
114 BluetoothProfile* last_profile_; 113 BluetoothProfile* last_profile_;
115 const BluetoothDevice* last_device_; 114 const BluetoothDevice* last_device_;
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 // Unregister the profile, make sure it's no longer registered. 359 // Unregister the profile, make sure it's no longer registered.
361 last_profile_->Unregister(); 360 last_profile_->Unregister();
362 361
363 profile_service_provider = 362 profile_service_provider =
364 fake_bluetooth_profile_manager_client_->GetProfileServiceProvider( 363 fake_bluetooth_profile_manager_client_->GetProfileServiceProvider(
365 FakeBluetoothProfileManagerClient::kRfcommUuid); 364 FakeBluetoothProfileManagerClient::kRfcommUuid);
366 EXPECT_TRUE(profile_service_provider == NULL); 365 EXPECT_TRUE(profile_service_provider == NULL);
367 } 366 }
368 367
369 } // namespace chromeos 368 } // namespace chromeos
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_chromeos_unittest.cc ('k') | gin/modules/timer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698