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

Unified Diff: mash/wm/app_launch_unittest.cc

Issue 1921113002: mash: Add a test for exe:chrome. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« mash/wm/BUILD.gn ('K') | « mash/wm/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..60c81aa6805cfd597a097d8cfe59a7a3773a04ff 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, TestChrome) {
+ EXPECT_TRUE(LaunchApp("exe:chrome"));
}
} // namespace wm
« mash/wm/BUILD.gn ('K') | « mash/wm/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698