Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / chromeos / dbus / dbus_client_bundle_unittest.cc
blob4c05dfdd23eb3449895240ca577f126e71676dde
1 // Copyright 2014 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 #include "chromeos/dbus/dbus_client_bundle.h"
7 #include "base/basictypes.h"
8 #include "base/compiler_specific.h"
9 #include "testing/gtest/include/gtest/gtest.h"
11 namespace chromeos {
13 TEST(DBusClientBundleTest, UnstubFlagParser) {
14 EXPECT_EQ(DBusClientBundle::NO_CLIENTS,
15 DBusClientBundle::ParseUnstubList("foo"));
17 EXPECT_EQ(DBusClientBundle::BLUETOOTH,
18 DBusClientBundle::ParseUnstubList("BLUETOOTH"));
20 EXPECT_EQ(DBusClientBundle::BLUETOOTH,
21 DBusClientBundle::ParseUnstubList("bluetooth"));
23 EXPECT_EQ(
24 DBusClientBundle::CRAS |
25 DBusClientBundle::CROS_DISKS |
26 DBusClientBundle::DEBUG_DAEMON |
27 DBusClientBundle::SHILL,
28 DBusClientBundle::ParseUnstubList(
29 "Cras,Cros_Disks,debug_daemon,Shill"));
31 EXPECT_EQ(
32 DBusClientBundle::CRAS |
33 DBusClientBundle::CROS_DISKS |
34 DBusClientBundle::DEBUG_DAEMON |
35 DBusClientBundle::SHILL,
36 DBusClientBundle::ParseUnstubList(
37 "foo,Cras,Cros_Disks,debug_daemon,Shill"));
40 } // namespace chromeos