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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
| 8 #include "mash/quick_launch/public/interfaces/constants.mojom.h" |
8 #include "services/service_manager/public/cpp/service_test.h" | 9 #include "services/service_manager/public/cpp/service_test.h" |
9 #include "services/ui/public/interfaces/constants.mojom.h" | 10 #include "services/ui/public/interfaces/constants.mojom.h" |
10 #include "services/ui/public/interfaces/window_server_test.mojom.h" | 11 #include "services/ui/public/interfaces/window_server_test.mojom.h" |
11 | 12 |
12 namespace ash { | 13 namespace ash { |
13 namespace mus { | 14 namespace mus { |
14 | 15 |
15 void RunCallback(bool* success, const base::Closure& callback, bool result) { | 16 void RunCallback(bool* success, const base::Closure& callback, bool result) { |
16 *success = result; | 17 *success = result; |
17 callback.Run(); | 18 callback.Run(); |
(...skipping 17 matching lines...) Expand all Loading... |
35 // (ash::MaterialDesignController::IsShelfMaterial()). See | 36 // (ash::MaterialDesignController::IsShelfMaterial()). See |
36 // crbug.com/660194 and crbug.com/642879. | 37 // crbug.com/660194 and crbug.com/642879. |
37 // TODO(rockot): Reenable this test. | 38 // TODO(rockot): Reenable this test. |
38 #if defined(USE_OZONE) | 39 #if defined(USE_OZONE) |
39 #define MAYBE_TestQuickLaunch TestQuickLaunch | 40 #define MAYBE_TestQuickLaunch TestQuickLaunch |
40 #else | 41 #else |
41 #define MAYBE_TestQuickLaunch DISABLED_TestQuickLaunch | 42 #define MAYBE_TestQuickLaunch DISABLED_TestQuickLaunch |
42 #endif // defined(USE_OZONE) | 43 #endif // defined(USE_OZONE) |
43 TEST_F(AppLaunchTest, MAYBE_TestQuickLaunch) { | 44 TEST_F(AppLaunchTest, MAYBE_TestQuickLaunch) { |
44 connector()->Connect("ash"); | 45 connector()->Connect("ash"); |
45 connector()->Connect("quick_launch"); | 46 connector()->Connect(mash::quick_launch::mojom::kServiceName); |
46 | 47 |
47 ui::mojom::WindowServerTestPtr test_interface; | 48 ui::mojom::WindowServerTestPtr test_interface; |
48 connector()->ConnectToInterface(ui::mojom::kServiceName, &test_interface); | 49 connector()->ConnectToInterface(ui::mojom::kServiceName, &test_interface); |
49 | 50 |
50 base::RunLoop run_loop; | 51 base::RunLoop run_loop; |
51 bool success = false; | 52 bool success = false; |
52 test_interface->EnsureClientHasDrawnWindow( | 53 test_interface->EnsureClientHasDrawnWindow( |
53 "quick_launch", | 54 mash::quick_launch::mojom::kServiceName, |
54 base::Bind(&RunCallback, &success, run_loop.QuitClosure())); | 55 base::Bind(&RunCallback, &success, run_loop.QuitClosure())); |
55 run_loop.Run(); | 56 run_loop.Run(); |
56 EXPECT_TRUE(success); | 57 EXPECT_TRUE(success); |
57 } | 58 } |
58 | 59 |
59 } // namespace mus | 60 } // namespace mus |
60 } // namespace ash | 61 } // namespace ash |
OLD | NEW |