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

Unified Diff: device/bluetooth/test/bluetooth_test_win.h

Issue 1632123003: Add cross platform Bluetooth testing fixture for Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: device/bluetooth/test/bluetooth_test_win.h
diff --git a/device/bluetooth/test/bluetooth_test_win.h b/device/bluetooth/test/bluetooth_test_win.h
new file mode 100644
index 0000000000000000000000000000000000000000..9f9114292f8559980c74e04ae2b41054187d7c54
--- /dev/null
+++ b/device/bluetooth/test/bluetooth_test_win.h
@@ -0,0 +1,47 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_WIN_H_
+#define DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_WIN_H_
+
+#include "device/bluetooth/test/bluetooth_test.h"
+
+#include "base/memory/ref_counted.h"
+#include "base/test/test_pending_task.h"
+#include "base/test/test_simple_task_runner.h"
+
+namespace device {
+class BluetoothAdapterWin;
+
+// Windows implementation of BluetoothTestBase.
+class BluetoothTestWin : public BluetoothTestBase {
+ public:
+ BluetoothTestWin();
+ ~BluetoothTestWin() override;
+
+ // Test overrides
+ void SetUp() override;
scheib 2016/01/26 20:13:47 Please remove these, they are empty.
gogerald1 2016/01/26 20:25:10 Done.
scheib 2016/01/26 20:25:33 Both empty methods please.
+ void TearDown() override;
+
+ // BluetoothTestBase overrides
+ bool PlatformSupportsLowEnergy() override;
+ void InitWithDefaultAdapter() override;
+ void InitWithoutDefaultAdapter() override;
+ void InitWithFakeAdapter() override;
+ bool DenyPermission() override;
+
+ private:
+ scoped_refptr<base::TestSimpleTaskRunner> ui_task_runner_;
+ scoped_refptr<base::TestSimpleTaskRunner> bluetooth_task_runner_;
+ BluetoothAdapterWin* adapter_win_;
+
+ void AdapterInitCallback();
+};
+
+// Defines common test fixture name. Use TEST_F(BluetoothTest, YourTestName).
+typedef BluetoothTestWin BluetoothTest;
+
+} // namespace device
+
+#endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_WIN_H_

Powered by Google App Engine
This is Rietveld 408576698