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