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

Side by Side Diff: chromeos/dbus/dbus_client_bundle_unittest.cc

Issue 556833003: Fix minor issues about DBusThreadManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chromeos/dbus/dbus_client_bundle.h" 5 #include "chromeos/dbus/dbus_client_bundle.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 namespace chromeos { 11 namespace chromeos {
12 12
13 TEST(DBusClientBundleTest, UnstubFlagParser) { 13 TEST(DBusClientBundleTest, UnstubFlagParser) {
14 EXPECT_EQ(DBusClientBundle::NO_CLIENTS, 14 EXPECT_EQ(0, DBusClientBundle::ParseUnstubList("foo"));
15 DBusClientBundle::ParseUnstubList("foo"));
16 15
17 EXPECT_EQ(DBusClientBundle::BLUETOOTH, 16 EXPECT_EQ(DBusClientBundle::BLUETOOTH,
18 DBusClientBundle::ParseUnstubList("BLUETOOTH")); 17 DBusClientBundle::ParseUnstubList("BLUETOOTH"));
19 18
20 EXPECT_EQ(DBusClientBundle::BLUETOOTH, 19 EXPECT_EQ(DBusClientBundle::BLUETOOTH,
21 DBusClientBundle::ParseUnstubList("bluetooth")); 20 DBusClientBundle::ParseUnstubList("bluetooth"));
22 21
23 EXPECT_EQ( 22 EXPECT_EQ(
24 DBusClientBundle::CRAS | 23 DBusClientBundle::CRAS |
25 DBusClientBundle::CROS_DISKS | 24 DBusClientBundle::CROS_DISKS |
26 DBusClientBundle::DEBUG_DAEMON | 25 DBusClientBundle::DEBUG_DAEMON |
27 DBusClientBundle::SHILL, 26 DBusClientBundle::SHILL,
28 DBusClientBundle::ParseUnstubList( 27 DBusClientBundle::ParseUnstubList(
29 "Cras,Cros_Disks,debug_daemon,Shill")); 28 "Cras,Cros_Disks,debug_daemon,Shill"));
30 29
31 EXPECT_EQ( 30 EXPECT_EQ(
32 DBusClientBundle::CRAS | 31 DBusClientBundle::CRAS |
33 DBusClientBundle::CROS_DISKS | 32 DBusClientBundle::CROS_DISKS |
34 DBusClientBundle::DEBUG_DAEMON | 33 DBusClientBundle::DEBUG_DAEMON |
35 DBusClientBundle::SHILL, 34 DBusClientBundle::SHILL,
36 DBusClientBundle::ParseUnstubList( 35 DBusClientBundle::ParseUnstubList(
37 "foo,Cras,Cros_Disks,debug_daemon,Shill")); 36 "foo,Cras,Cros_Disks,debug_daemon,Shill"));
38 } 37 }
39 38
40 } // namespace chromeos 39 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698