Roll src/third_party/WebKit 75a2fa9:2546356 (svn 202272:202273)
[chromium-blink-merge.git] / chromeos / dbus / dbus_client_bundle_unittest.cc
blobe7f63bd82946429a4c46d23ff291ab1713028536
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(0, DBusClientBundle::ParseUnstubList("foo"));
16 EXPECT_EQ(DBusClientBundle::BLUETOOTH,
17 DBusClientBundle::ParseUnstubList("BLUETOOTH"));
19 EXPECT_EQ(DBusClientBundle::BLUETOOTH,
20 DBusClientBundle::ParseUnstubList("bluetooth"));
22 EXPECT_EQ(
23 DBusClientBundle::CRAS |
24 DBusClientBundle::CROS_DISKS |
25 DBusClientBundle::DEBUG_DAEMON |
26 DBusClientBundle::SHILL,
27 DBusClientBundle::ParseUnstubList(
28 "Cras,Cros_Disks,debug_daemon,Shill"));
30 EXPECT_EQ(
31 DBusClientBundle::CRAS |
32 DBusClientBundle::CROS_DISKS |
33 DBusClientBundle::DEBUG_DAEMON |
34 DBusClientBundle::SHILL,
35 DBusClientBundle::ParseUnstubList(
36 "foo,Cras,Cros_Disks,debug_daemon,Shill"));
39 } // namespace chromeos