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

Unified Diff: device/bluetooth/bluetooth_adapter_unittest.cc

Issue 1232613004: The first 3 BluetoothTest.* unit tests now running on Mac as well. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@movCBCM
Patch Set: comment edit Created 5 years, 5 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
« no previous file with comments | « device/bluetooth/bluetooth_adapter_mac_unittest.mm ('k') | device/bluetooth/test/bluetooth_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_adapter_unittest.cc
diff --git a/device/bluetooth/bluetooth_adapter_unittest.cc b/device/bluetooth/bluetooth_adapter_unittest.cc
index 14d6f0fb809541503c3866db642219bbbb16bc72..2316ee5ac90b26959e4a877f7fc9c3fa0c1d3d0c 100644
--- a/device/bluetooth/bluetooth_adapter_unittest.cc
+++ b/device/bluetooth/bluetooth_adapter_unittest.cc
@@ -14,6 +14,8 @@
#if defined(OS_ANDROID)
#include "device/bluetooth/test/bluetooth_test_android.h"
+#elif defined(OS_MACOSX)
+#include "device/bluetooth/test/bluetooth_test_mac.h"
#endif
using device::BluetoothDevice;
@@ -401,7 +403,7 @@ TEST(BluetoothAdapterTest, GetMergedDiscoveryFilterAllFields) {
}
// TODO(scheib): Enable BluetoothTest fixture tests on all platforms.
-#if defined(OS_ANDROID)
+#if defined(OS_ANDROID) || defined(OS_MACOSX)
TEST_F(BluetoothTest, ConstructDefaultAdapter) {
InitWithDefaultAdapter();
if (!adapter_->IsPresent()) {
@@ -417,10 +419,10 @@ TEST_F(BluetoothTest, ConstructDefaultAdapter) {
EXPECT_FALSE(adapter_->IsDiscoverable());
EXPECT_FALSE(adapter_->IsDiscovering());
}
-#endif // defined(OS_ANDROID)
+#endif // defined(OS_ANDROID) || defined(OS_MACOSX)
// TODO(scheib): Enable BluetoothTest fixture tests on all platforms.
-#if defined(OS_ANDROID)
+#if defined(OS_ANDROID) || defined(OS_MACOSX)
TEST_F(BluetoothTest, ConstructWithoutDefaultAdapter) {
InitWithoutDefaultAdapter();
EXPECT_EQ(adapter_->GetAddress(), "");
@@ -430,20 +432,20 @@ TEST_F(BluetoothTest, ConstructWithoutDefaultAdapter) {
EXPECT_FALSE(adapter_->IsDiscoverable());
EXPECT_FALSE(adapter_->IsDiscovering());
}
-#endif // defined(OS_ANDROID)
+#endif // defined(OS_ANDROID) || defined(OS_MACOSX)
// TODO(scheib): Enable BluetoothTest fixture tests on all platforms.
-#if defined(OS_ANDROID)
+#if defined(OS_ANDROID) || defined(OS_MACOSX)
TEST_F(BluetoothTest, ConstructFakeAdapter) {
InitWithFakeAdapter();
- EXPECT_EQ(adapter_->GetAddress(), "A1:B2:C3:D4:E5:F6");
- EXPECT_EQ(adapter_->GetName(), "FakeBluetoothAdapter");
+ EXPECT_EQ(adapter_->GetAddress(), kTestAdapterAddress);
+ EXPECT_EQ(adapter_->GetName(), kTestAdapterName);
EXPECT_TRUE(adapter_->IsPresent());
EXPECT_TRUE(adapter_->IsPowered());
EXPECT_FALSE(adapter_->IsDiscoverable());
EXPECT_FALSE(adapter_->IsDiscovering());
}
-#endif // defined(OS_ANDROID)
+#endif // defined(OS_ANDROID) || defined(OS_MACOSX)
// TODO(scheib): Enable BluetoothTest fixture tests on all platforms.
#if defined(OS_ANDROID)
« no previous file with comments | « device/bluetooth/bluetooth_adapter_mac_unittest.mm ('k') | device/bluetooth/test/bluetooth_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698