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

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

Issue 2520093003: WindowManagerClient::AddAccelerator() should take an array (Closed)
Patch Set: Modify helper to return vector and leverage helper in other files.Rename/format code. 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..8963f72fd1a61e86dc7533019ef720a6f1dde039 100644
--- a/services/ui/ws/window_manager_state_unittest.cc
+++ b/services/ui/ws/window_manager_state_unittest.cc
@@ -12,6 +12,7 @@
#include "base/test/test_simple_task_runner.h"
#include "base/threading/thread_task_runner_handle.h"
#include "services/service_manager/public/interfaces/connector.mojom.h"
+#include "services/ui/common/accelerator_transport_util.h"
#include "services/ui/common/event_matcher_util.h"
#include "services/ui/ws/accelerator.h"
#include "services/ui/ws/display.h"
@@ -231,8 +232,13 @@ 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)));
+
+ std::vector<ui::mojom::AcceleratorTransportPtr> accelerators;
+ accelerators = ash::mus::AddAcceleratorHelper(
+ std::move(accelerators), accelerator_id, std::move(matcher));
+
+ ASSERT_TRUE(window_manager_state()->event_dispatcher()->AddAccelerators(
+ std::move(accelerators)));
}
TestChangeTracker* tracker = wm_client()->tracker();
tracker->changes()->clear();

Powered by Google App Engine
This is Rietveld 408576698