1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "base/memory/ref_counted.h"
6 #include "base/test/test_simple_task_runner.h"
7 #include "device/bluetooth/bluetooth_adapter.h"
8 #include "device/bluetooth/bluetooth_adapter_mac.h"
9 #include "testing/gtest/include/gtest/gtest.h"
13 class BluetoothAdapterMacTest : public testing::Test {
15 BluetoothAdapterMacTest()
16 : ui_task_runner_(new base::TestSimpleTaskRunner()),
17 adapter_(new BluetoothAdapterMac()),
18 adapter_mac_(static_cast<BluetoothAdapterMac*>(adapter_.get())) {
19 adapter_mac_->InitForTest(ui_task_runner_);
23 scoped_refptr<base::TestSimpleTaskRunner> ui_task_runner_;
24 scoped_refptr<BluetoothAdapter> adapter_;
25 BluetoothAdapterMac* adapter_mac_;
28 TEST_F(BluetoothAdapterMacTest, Poll) {
29 EXPECT_FALSE(ui_task_runner_->GetPendingTasks().empty());