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

Side by Side Diff: services/ui/demo/mus_demo_unittests.cc

Issue 2420253002: Rename shell namespace to service_manager (Closed)
Patch Set: . Created 4 years, 2 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 | « services/ui/demo/mus_demo.cc ('k') | services/ui/display/platform_screen.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "services/service_manager/public/cpp/service_test.h" 9 #include "services/service_manager/public/cpp/service_test.h"
10 #include "services/ui/public/interfaces/window_server_test.mojom.h" 10 #include "services/ui/public/interfaces/window_server_test.mojom.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 namespace ui { 13 namespace ui {
14 namespace demo { 14 namespace demo {
15 15
16 namespace { 16 namespace {
17 17
18 const char kTestAppName[] = "exe:mus_demo_unittests"; 18 const char kTestAppName[] = "exe:mus_demo_unittests";
19 19
20 void RunCallback(bool* success, const base::Closure& callback, bool result) { 20 void RunCallback(bool* success, const base::Closure& callback, bool result) {
21 *success = result; 21 *success = result;
22 callback.Run(); 22 callback.Run();
23 } 23 }
24 24
25 class MusDemoTest : public shell::test::ServiceTest { 25 class MusDemoTest : public service_manager::test::ServiceTest {
26 public: 26 public:
27 MusDemoTest() : shell::test::ServiceTest(kTestAppName) {} 27 MusDemoTest() : service_manager::test::ServiceTest(kTestAppName) {}
28 ~MusDemoTest() override {} 28 ~MusDemoTest() override {}
29 29
30 void SetUp() override { 30 void SetUp() override {
31 base::CommandLine::ForCurrentProcess()->AppendSwitch("use-test-config"); 31 base::CommandLine::ForCurrentProcess()->AppendSwitch("use-test-config");
32 ServiceTest::SetUp(); 32 ServiceTest::SetUp();
33 } 33 }
34 34
35 private: 35 private:
36 DISALLOW_COPY_AND_ASSIGN(MusDemoTest); 36 DISALLOW_COPY_AND_ASSIGN(MusDemoTest);
37 }; 37 };
(...skipping 12 matching lines...) Expand all
50 // WindowTree has the correct name instead of an empty name. 50 // WindowTree has the correct name instead of an empty name.
51 test_interface->EnsureClientHasDrawnWindow( 51 test_interface->EnsureClientHasDrawnWindow(
52 "", // WindowTree name is empty. 52 "", // WindowTree name is empty.
53 base::Bind(&RunCallback, &success, run_loop.QuitClosure())); 53 base::Bind(&RunCallback, &success, run_loop.QuitClosure()));
54 run_loop.Run(); 54 run_loop.Run();
55 EXPECT_TRUE(success); 55 EXPECT_TRUE(success);
56 } 56 }
57 57
58 } // namespace demo 58 } // namespace demo
59 } // namespace ui 59 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/demo/mus_demo.cc ('k') | services/ui/display/platform_screen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698