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

Unified Diff: services/ui/ws/window_manager_state_unittest.cc

Issue 2520093003: WindowManagerClient::AddAccelerator() should take an array (Closed)
Patch Set: Create anonymous namespace helper for AcceleratorTransport mojom struct. Cleanup/format codes. Created 4 years, 1 month 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/ws/window_manager_state_unittest.cc
diff --git a/services/ui/ws/window_manager_state_unittest.cc b/services/ui/ws/window_manager_state_unittest.cc
index eebde144c1668701661138decdd8f9f35f86c091..d520fe53c310aad87564597ad8a09a259e833569 100644
--- a/services/ui/ws/window_manager_state_unittest.cc
+++ b/services/ui/ws/window_manager_state_unittest.cc
@@ -231,8 +231,16 @@ TEST_F(WindowManagerStateTest, PreTargetConsumed) {
{
mojom::EventMatcherPtr matcher = ui::CreateKeyMatcher(
ui::mojom::KeyboardCode::W, ui::mojom::kEventFlagControlDown);
- ASSERT_TRUE(window_manager_state()->event_dispatcher()->AddAccelerator(
- accelerator_id, std::move(matcher)));
+
+ ui::mojom::AcceleratorTransportPtr accelerator_transport(
+ ui::mojom::AcceleratorTransport::New());
+ accelerator_transport->id = accelerator_id;
+ accelerator_transport->event_matcher = std::move(matcher);
+
+ std::vector<ui::mojom::AcceleratorTransportPtr> multi_accelerators;
+ multi_accelerators.push_back(std::move(accelerator_transport));
+ ASSERT_TRUE(window_manager_state()->event_dispatcher()->AddAccelerators(
+ std::move(multi_accelerators)));
}
TestChangeTracker* tracker = wm_client()->tracker();
tracker->changes()->clear();

Powered by Google App Engine
This is Rietveld 408576698