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

Unified Diff: device/bluetooth/dbus/bluetooth_dbus_client_bundle_unittest.cc

Issue 1347193004: Refactor DBusThreadManager to split away BT clients. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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/dbus/bluetooth_dbus_client_bundle_unittest.cc
diff --git a/device/bluetooth/dbus/bluetooth_dbus_client_bundle_unittest.cc b/device/bluetooth/dbus/bluetooth_dbus_client_bundle_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..e1c338584a3154c9b0715b376fc0711086053100
--- /dev/null
+++ b/device/bluetooth/dbus/bluetooth_dbus_client_bundle_unittest.cc
@@ -0,0 +1,33 @@
+// Copyright 2014 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.
+
+#include "device/bluetooth/dbus/bluetooth_dbus_client_bundle.h"
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace bluez {
+
+TEST(DBusClientBundleTest, UnstubFlagParser) {
+ EXPECT_EQ(0, DBusClientBundle::ParseUnstubList("foo"));
+
+ EXPECT_EQ(BluetoothDBusClientBundle::BLUETOOTH,
+ DBusClientBundle::ParseUnstubList("BLUETOOTH"));
+
+ EXPECT_EQ(BluetoothDBusClientBundle::BLUETOOTH,
+ DBusClientBundle::ParseUnstubList("bluetooth"));
+
+ EXPECT_EQ(
+ DBusClientBundle::CRAS | DBusClientBundle::CROS_DISKS |
+ DBusClientBundle::DEBUG_DAEMON | DBusClientBundle::SHILL,
+ DBusClientBundle::ParseUnstubList("Cras,Cros_Disks,debug_daemon,Shill"));
+
+ EXPECT_EQ(DBusClientBundle::CRAS | DBusClientBundle::CROS_DISKS |
+ DBusClientBundle::DEBUG_DAEMON | DBusClientBundle::SHILL,
+ DBusClientBundle::ParseUnstubList(
+ "foo,Cras,Cros_Disks,debug_daemon,Shill"));
+}
+
+} // namespace bluez

Powered by Google App Engine
This is Rietveld 408576698