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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 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.
4
5 #include "chromeos/dbus/dbus_client_bundle.h"
6
7 #include "base/basictypes.h"
8 #include "base/compiler_specific.h"
9 #include "testing/gtest/include/gtest/gtest.h"
10
11 namespace chromeos {
12
13 TEST(DBusClientBundleTest, UnstubFlagParser) {
14 EXPECT_EQ(DBusClientBundle::ParseUnstubList("foo"),
15 DBusClientBundle::UNKNOWN);
satorux1 2014/08/13 01:09:20 per gtest.h, the expected value should come first.
zel 2014/08/13 01:36:02 Done.
16
17 EXPECT_EQ(DBusClientBundle::ParseUnstubList("BLUETOOTH"),
18 DBusClientBundle::BLUETOOTH);
19
20 EXPECT_EQ(DBusClientBundle::ParseUnstubList("bluetooth"),
21 DBusClientBundle::BLUETOOTH);
22
23 EXPECT_EQ(DBusClientBundle::ParseUnstubList(
24 "Cras,CrosDisks,debugdaemon,Shill"),
satorux1 2014/08/13 01:09:20 I'm confused. Why can "CrosDisks" be parsed, where
zel 2014/08/13 01:36:02 Yeah, this test should not pass :). Fixed.
25 DBusClientBundle::CRAS |
26 DBusClientBundle::CROS_DISKS |
27 DBusClientBundle::DEBUG_DAEMON |
28 DBusClientBundle::SHILL);
29
30 EXPECT_EQ(DBusClientBundle::ParseUnstubList(
31 "foo,Cras,CrosDisks,debugdaemon,Shill"),
32 DBusClientBundle::CRAS |
33 DBusClientBundle::CROS_DISKS |
34 DBusClientBundle::DEBUG_DAEMON |
35 DBusClientBundle::SHILL);
36 }
37
38 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698