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

Unified Diff: ash/mus/app_launch_unittest.cc

Issue 2715533005: Make mus_demo_unittests work with multiple root windows (Closed)
Patch Set: Add a unit test for multiple windows. 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
« no previous file with comments | « no previous file | services/ui/demo/mus_demo_unittests.cc » ('j') | services/ui/ws/window_server_test_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/app_launch_unittest.cc
diff --git a/ash/mus/app_launch_unittest.cc b/ash/mus/app_launch_unittest.cc
index 1ee880a4cd046ed73ef02a8e5978b7f25d95f3aa..149fadf7f2aafac74064f165150643aa6ee344cc 100644
--- a/ash/mus/app_launch_unittest.cc
+++ b/ash/mus/app_launch_unittest.cc
@@ -14,8 +14,10 @@
namespace ash {
namespace mus {
-void RunCallback(bool* success, const base::Closure& callback, bool result) {
- *success = result;
+void RunCallback(uint64_t* root_window_count,
+ const base::Closure& callback,
+ uint64_t result) {
+ *root_window_count = result;
callback.Run();
}
@@ -41,12 +43,12 @@ TEST_F(AppLaunchTest, TestQuickLaunch) {
connector()->BindInterface(ui::mojom::kServiceName, &test_interface);
base::RunLoop run_loop;
- bool success = false;
- test_interface->EnsureClientHasDrawnWindow(
+ uint64_t root_window_count = 0;
+ test_interface->EnsureClientHasDrawnRootWindows(
mash::quick_launch::mojom::kServiceName,
- base::Bind(&RunCallback, &success, run_loop.QuitClosure()));
+ base::Bind(&RunCallback, &root_window_count, run_loop.QuitClosure()));
run_loop.Run();
- EXPECT_TRUE(success);
+ EXPECT_EQ(1u, root_window_count);
}
} // namespace mus
« no previous file with comments | « no previous file | services/ui/demo/mus_demo_unittests.cc » ('j') | services/ui/ws/window_server_test_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698