| Index: mash/wm/app_launch_unittest.cc
|
| diff --git a/mash/wm/app_launch_unittest.cc b/mash/wm/app_launch_unittest.cc
|
| index 337ab6f4efd3c6274d532e61fcd73ad2421dab2a..eb9b0f3f46ebcf6e69a511dfff777ed83ab12580 100644
|
| --- a/mash/wm/app_launch_unittest.cc
|
| +++ b/mash/wm/app_launch_unittest.cc
|
| @@ -21,6 +21,21 @@ class AppLaunchTest : public shell::test::ShellTest {
|
| AppLaunchTest() : ShellTest("exe:mash_unittests") {}
|
| ~AppLaunchTest() override {}
|
|
|
| + bool LaunchApp(const std::string& app) {
|
| + connector()->Connect("mojo:desktop_wm");
|
| + connector()->Connect(app);
|
| +
|
| + mus::mojom::WindowServerTestPtr test_interface;
|
| + connector()->ConnectToInterface("mojo:mus", &test_interface);
|
| +
|
| + base::RunLoop run_loop;
|
| + bool success = false;
|
| + test_interface->EnsureClientHasDrawnWindow(
|
| + app, base::Bind(&RunCallback, &success, run_loop.QuitClosure()));
|
| + run_loop.Run();
|
| + return success;
|
| + }
|
| +
|
| private:
|
| void SetUp() override {
|
| base::CommandLine::ForCurrentProcess()->AppendSwitch("use-test-config");
|
| @@ -31,19 +46,11 @@ class AppLaunchTest : public shell::test::ShellTest {
|
| };
|
|
|
| TEST_F(AppLaunchTest, TestQuickLaunch) {
|
| - connector()->Connect("mojo:desktop_wm");
|
| - connector()->Connect("mojo:quick_launch");
|
| -
|
| - mus::mojom::WindowServerTestPtr test_interface;
|
| - connector()->ConnectToInterface("mojo:mus", &test_interface);
|
| -
|
| - base::RunLoop run_loop;
|
| - bool success = false;
|
| - test_interface->EnsureClientHasDrawnWindow(
|
| - "mojo:quick_launch",
|
| - base::Bind(&RunCallback, &success, run_loop.QuitClosure()));
|
| - run_loop.Run();
|
| - EXPECT_TRUE(success);
|
| + EXPECT_TRUE(LaunchApp("mojo:quick_launch"));
|
| +}
|
| +
|
| +TEST_F(AppLaunchTest, TestAshSysui) {
|
| + EXPECT_TRUE(LaunchApp("mojo:ash_sysui"));
|
| }
|
|
|
| } // namespace wm
|
|
|