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

Unified Diff: ash/mus/app_launch_unittest.cc

Issue 2715533005: Make mus_demo_unittests work with multiple root windows (Closed)
Patch Set: Pass the count to the callback. 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 7cf67d04777f9bd7ec45c3afa073d95f5c47f470..8a98538e90336fa50aeb52bc70dec64c7d771d24 100644
--- a/ash/mus/app_launch_unittest.cc
+++ b/ash/mus/app_launch_unittest.cc
@@ -13,8 +13,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();
}
@@ -40,12 +42,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