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

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

Issue 2693923004: Mus Demo: Extract code specific to internal mode into a separate class (Closed)
Patch Set: Created 3 years, 10 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 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/constants.mojom.h" 10 #include "services/ui/public/interfaces/constants.mojom.h"
(...skipping 21 matching lines...) Expand all
32 base::CommandLine::ForCurrentProcess()->AppendSwitch("use-test-config"); 32 base::CommandLine::ForCurrentProcess()->AppendSwitch("use-test-config");
33 ServiceTest::SetUp(); 33 ServiceTest::SetUp();
34 } 34 }
35 35
36 private: 36 private:
37 DISALLOW_COPY_AND_ASSIGN(MusDemoTest); 37 DISALLOW_COPY_AND_ASSIGN(MusDemoTest);
38 }; 38 };
39 39
40 } // namespace 40 } // namespace
41 41
42 TEST_F(MusDemoTest, CheckMusDemoDraws) { 42 TEST_F(MusDemoTest, CheckMusDemoDraws) {
fwang 2017/02/14 17:26:05 Probably we want to rename the test CheckMusDemoIn
kylechar 2017/02/14 18:40:11 If internal vs external is decided at compile time
fwang 2017/02/15 13:49:26 Acknowledged.
43 connector()->Connect("mus_demo"); 43 connector()->Connect("mus_demo_internal");
44 44
45 ::ui::mojom::WindowServerTestPtr test_interface; 45 ::ui::mojom::WindowServerTestPtr test_interface;
46 connector()->BindInterface(ui::mojom::kServiceName, &test_interface); 46 connector()->BindInterface(ui::mojom::kServiceName, &test_interface);
47 47
48 base::RunLoop run_loop; 48 base::RunLoop run_loop;
49 bool success = false; 49 bool success = false;
50 // TODO(kylechar): Fix WindowServer::CreateTreeForWindowManager so that the 50 // TODO(kylechar): Fix WindowServer::CreateTreeForWindowManager so that the
51 // WindowTree has the correct name instead of an empty name. 51 // WindowTree has the correct name instead of an empty name.
52 test_interface->EnsureClientHasDrawnWindow( 52 test_interface->EnsureClientHasDrawnWindow(
53 "", // WindowTree name is empty. 53 "", // WindowTree name is empty.
54 base::Bind(&RunCallback, &success, run_loop.QuitClosure())); 54 base::Bind(&RunCallback, &success, run_loop.QuitClosure()));
55 run_loop.Run(); 55 run_loop.Run();
56 EXPECT_TRUE(success); 56 EXPECT_TRUE(success);
57 } 57 }
58 58
59 } // namespace demo 59 } // namespace demo
60 } // namespace ui 60 } // namespace ui
OLDNEW
« services/ui/demo/mus_demo_internal.cc ('K') | « services/ui/demo/mus_demo_internal.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698