OLD | NEW |
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 "ash/public/interfaces/constants.mojom.h" | 5 #include "ash/public/interfaces/constants.mojom.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
9 #include "mash/quick_launch/public/interfaces/constants.mojom.h" | 9 #include "mash/quick_launch/public/interfaces/constants.mojom.h" |
10 #include "services/service_manager/public/cpp/service_test.h" | 10 #include "services/service_manager/public/cpp/service_test.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 private: | 27 private: |
28 void SetUp() override { | 28 void SetUp() override { |
29 base::CommandLine::ForCurrentProcess()->AppendSwitch("use-test-config"); | 29 base::CommandLine::ForCurrentProcess()->AppendSwitch("use-test-config"); |
30 ServiceTest::SetUp(); | 30 ServiceTest::SetUp(); |
31 } | 31 } |
32 | 32 |
33 DISALLOW_COPY_AND_ASSIGN(AppLaunchTest); | 33 DISALLOW_COPY_AND_ASSIGN(AppLaunchTest); |
34 }; | 34 }; |
35 | 35 |
36 TEST_F(AppLaunchTest, TestQuickLaunch) { | 36 TEST_F(AppLaunchTest, TestQuickLaunch) { |
37 connector()->Connect(mojom::kServiceName); | 37 connector()->StartService(mojom::kServiceName); |
38 connector()->Connect(mash::quick_launch::mojom::kServiceName); | 38 connector()->StartService(mash::quick_launch::mojom::kServiceName); |
39 | 39 |
40 ui::mojom::WindowServerTestPtr test_interface; | 40 ui::mojom::WindowServerTestPtr test_interface; |
41 connector()->BindInterface(ui::mojom::kServiceName, &test_interface); | 41 connector()->BindInterface(ui::mojom::kServiceName, &test_interface); |
42 | 42 |
43 base::RunLoop run_loop; | 43 base::RunLoop run_loop; |
44 bool success = false; | 44 bool success = false; |
45 test_interface->EnsureClientHasDrawnWindow( | 45 test_interface->EnsureClientHasDrawnWindow( |
46 mash::quick_launch::mojom::kServiceName, | 46 mash::quick_launch::mojom::kServiceName, |
47 base::Bind(&RunCallback, &success, run_loop.QuitClosure())); | 47 base::Bind(&RunCallback, &success, run_loop.QuitClosure())); |
48 run_loop.Run(); | 48 run_loop.Run(); |
49 EXPECT_TRUE(success); | 49 EXPECT_TRUE(success); |
50 } | 50 } |
51 | 51 |
52 } // namespace mus | 52 } // namespace mus |
53 } // namespace ash | 53 } // namespace ash |
OLD | NEW |