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

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

Issue 2350543002: chromeos; Remove unused switch --dbus-unstub-clients / --dbus-real-clients (Closed)
Patch Set: rebase again Created 4 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
« no previous file with comments | « chromeos/dbus/cros_disks_client.h ('k') | chromeos/dbus/dbus_client_implementation_type.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #include "chromeos/dbus/dbus_client_types.h"
6 #include "testing/gtest/include/gtest/gtest.h"
7
8 namespace chromeos {
9 namespace {
10
11 // Makes mask operations more readable.
12 DBusClientTypeMask AsClientTypeMask(DBusClientType type) {
13 return static_cast<DBusClientTypeMask>(type);
14 }
15
16 } // namespace
17
18 TEST(DBusClientBundleTest, RealClientsFlagParser) {
19 EXPECT_EQ(AsClientTypeMask(DBusClientType::NONE),
20 ParseDBusRealClientsList("foo"));
21
22 EXPECT_EQ(AsClientTypeMask(DBusClientType::BLUETOOTH),
23 ParseDBusRealClientsList("BLUETOOTH"));
24
25 EXPECT_EQ(AsClientTypeMask(DBusClientType::BLUETOOTH),
26 ParseDBusRealClientsList("bluetooth"));
27
28 EXPECT_EQ(AsClientTypeMask(DBusClientType::CRAS) |
29 AsClientTypeMask(DBusClientType::CROS_DISKS) |
30 AsClientTypeMask(DBusClientType::DEBUG_DAEMON) |
31 AsClientTypeMask(DBusClientType::SHILL),
32 ParseDBusRealClientsList("Cras,Cros_Disks,debug_daemon,Shill"));
33
34 EXPECT_EQ(AsClientTypeMask(DBusClientType::CRAS) |
35 AsClientTypeMask(DBusClientType::CROS_DISKS) |
36 AsClientTypeMask(DBusClientType::DEBUG_DAEMON) |
37 AsClientTypeMask(DBusClientType::SHILL),
38 ParseDBusRealClientsList("foo,Cras,Cros_Disks,debug_daemon,Shill"));
39 }
40
41 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/cros_disks_client.h ('k') | chromeos/dbus/dbus_client_implementation_type.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698