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

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

Issue 2338063002: chromeos: Refactor D-Bus client type enum and stub vs. fake naming (Closed)
Patch Set: review comments 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/dbus_thread_manager.cc ('k') | chromeos/dbus/power_manager_client.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 2016 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_thread_manager.h"
6
7 #include "chromeos/dbus/dbus_client_types.h"
8 #include "testing/gtest/include/gtest/gtest.h"
9
10 namespace chromeos {
11
12 // Tests that clients can be created.
13 TEST(DBusThreadManagerTest, Initialize) {
14 DBusThreadManager::Initialize();
15 EXPECT_TRUE(DBusThreadManager::IsInitialized());
16
17 DBusThreadManager* manager = DBusThreadManager::Get();
18 ASSERT_TRUE(manager);
19
20 // In tests, clients are fake.
21 EXPECT_TRUE(manager->IsUsingFake(DBusClientType::CRAS));
22 EXPECT_TRUE(manager->IsUsingFake(DBusClientType::CROS_DISKS));
23
24 // Clients were created.
25 EXPECT_TRUE(manager->GetCrasAudioClient());
26 EXPECT_TRUE(manager->GetCrosDisksClient());
27
28 DBusThreadManager::Shutdown();
29 EXPECT_FALSE(DBusThreadManager::IsInitialized());
30 }
31
32 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/dbus_thread_manager.cc ('k') | chromeos/dbus/power_manager_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698