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

Unified Diff: chromeos/dbus/dbus_client_bundle_unittest.cc

Issue 444263002: Added switch that let us 'un-stub' certain dbus clients. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | « chromeos/dbus/dbus_client_bundle.cc ('k') | chromeos/dbus/dbus_thread_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/dbus_client_bundle_unittest.cc
diff --git a/chromeos/dbus/dbus_client_bundle_unittest.cc b/chromeos/dbus/dbus_client_bundle_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..9482f224d00f095fa9a78a472307669c9d2c014b
--- /dev/null
+++ b/chromeos/dbus/dbus_client_bundle_unittest.cc
@@ -0,0 +1,40 @@
+// Copyright (c) 2012 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 "chromeos/dbus/dbus_client_bundle.h"
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace chromeos {
+
+TEST(DBusClientBundleTest, UnstubFlagParser) {
+ EXPECT_EQ(DBusClientBundle::NO_CLIENTS,
+ DBusClientBundle::ParseUnstubList("foo"));
+
+ EXPECT_EQ(DBusClientBundle::BLUETOOTH,
+ DBusClientBundle::ParseUnstubList("BLUETOOTH"));
+
+ EXPECT_EQ(DBusClientBundle::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 chromeos
« no previous file with comments | « chromeos/dbus/dbus_client_bundle.cc ('k') | chromeos/dbus/dbus_thread_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698