Remove chromeos==0 blacklist for test_isolation_mode.
[chromium-blink-merge.git] / device / bluetooth / test / bluetooth_test.h
blob12a58b45ff1a464a530e613b3951a0fc1a303e00
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
3 // found in the LICENSE file.
5 #ifndef DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_
6 #define DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_
8 #include "base/memory/ref_counted.h"
9 #include "device/bluetooth/bluetooth_adapter.h"
10 #include "testing/gtest/include/gtest/gtest.h"
12 namespace device {
14 class BluetoothAdapter;
16 // A test fixture for Bluetooth that abstracts platform specifics for creating
17 // and controlling fake low level objects.
19 // Subclasses on each platform implement this, and are then typedef-ed to
20 // BluetoothTest.
21 class BluetoothTestBase : public testing::Test {
22 public:
23 BluetoothTestBase();
24 ~BluetoothTestBase() override;
26 // Initializes the BluetoothAdapter |adapter_| with the system adapter.
27 virtual void InitWithDefaultAdapter(){};
29 // Initializes the BluetoothAdapter |adapter_| with the system adapter forced
30 // to be ignored as if it did not exist. This enables tests for when an
31 // adapter is not present on the system.
32 virtual void InitWithoutDefaultAdapter(){};
34 // Initializes the BluetoothAdapter |adapter_| with a fake adapter that can be
35 // controlled by this test fixture.
36 virtual void InitWithFakeAdapter(){};
38 scoped_refptr<BluetoothAdapter> adapter_;
41 } // namespace device
43 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_