Move notification sending out of AutocompleteController
[chromium-blink-merge.git] / device / bluetooth / bluetooth_adapter_mac_unittest.mm
blob6ef4c9b3b7e0c0878e12cfd210f2cdb7665e4f67
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"
11 namespace device {
13 class BluetoothAdapterMacTest : public testing::Test {
14  public:
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_);
20   }
22  protected:
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());
32 }  // namespace device