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

Unified Diff: services/ui/demo/mus_demo_unittests.cc

Issue 2622103004: Mus Demo: Demonstrate external window mode (Closed)
Patch Set: Add MusDemoExternal Created 3 years, 10 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
Index: services/ui/demo/mus_demo_unittests.cc
diff --git a/services/ui/demo/mus_demo_unittests.cc b/services/ui/demo/mus_demo_unittests.cc
index 661536718a332c3d363c774d3e1a6dfe3a990fcb..d3c2a42e95ce49aeae8c7b2db6031d873eb0d22d 100644
--- a/services/ui/demo/mus_demo_unittests.cc
+++ b/services/ui/demo/mus_demo_unittests.cc
@@ -39,7 +39,7 @@ class MusDemoTest : public service_manager::test::ServiceTest {
} // namespace
-TEST_F(MusDemoTest, CheckMusDemoDraws) {
+TEST_F(MusDemoTest, CheckMusDemoInternalDraws) {
connector()->Connect("mus_demo_internal");
::ui::mojom::WindowServerTestPtr test_interface;
@@ -56,5 +56,22 @@ TEST_F(MusDemoTest, CheckMusDemoDraws) {
EXPECT_TRUE(success);
}
+TEST_F(MusDemoTest, CheckMusDemoExternalDraws) {
+ connector()->Connect("mus_demo_external");
+
+ ::ui::mojom::WindowServerTestPtr test_interface;
+ connector()->BindInterface(ui::mojom::kServiceName, &test_interface);
+
+ base::RunLoop run_loop;
+ bool success = false;
+ // TODO(kylechar): Fix WindowServer::CreateTreeForWindowManager so that the
+ // WindowTree has the correct name instead of an empty name.
+ test_interface->EnsureClientHasDrawnWindow(
+ "", // WindowTree name is empty.
+ base::Bind(&RunCallback, &success, run_loop.QuitClosure()));
+ run_loop.Run();
+ EXPECT_TRUE(success);
+}
+
} // namespace demo
} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698