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

Unified Diff: components/mus/ws/event_dispatcher_unittest.cc

Issue 2057793002: Reorganize event mojom files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed typos in comments. Created 4 years, 6 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 | « components/mus/ws/event_dispatcher.cc ('k') | components/mus/ws/event_matcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/event_dispatcher_unittest.cc
diff --git a/components/mus/ws/event_dispatcher_unittest.cc b/components/mus/ws/event_dispatcher_unittest.cc
index c153ab7ed88dd4c0d9b0fea482536c0ce3216a73..7bfb1690e22da7301e09dcb49a65ca39276024a9 100644
--- a/components/mus/ws/event_dispatcher_unittest.cc
+++ b/components/mus/ws/event_dispatcher_unittest.cc
@@ -354,34 +354,34 @@ TEST_F(EventDispatcherTest, AcceleratorBasic) {
uint32_t accelerator_1 = 1;
mojom::EventMatcherPtr matcher = mus::CreateKeyMatcher(
- mus::mojom::KeyboardCode::W, mus::mojom::kEventFlagControlDown);
+ ui::mojom::KeyboardCode::W, ui::mojom::kEventFlagControlDown);
EXPECT_TRUE(dispatcher.AddAccelerator(accelerator_1, std::move(matcher)));
uint32_t accelerator_2 = 2;
- matcher = mus::CreateKeyMatcher(mus::mojom::KeyboardCode::N,
- mus::mojom::kEventFlagNone);
+ matcher = mus::CreateKeyMatcher(ui::mojom::KeyboardCode::N,
+ ui::mojom::kEventFlagNone);
EXPECT_TRUE(dispatcher.AddAccelerator(accelerator_2, std::move(matcher)));
// Attempting to add a new accelerator with the same id should fail.
- matcher = mus::CreateKeyMatcher(mus::mojom::KeyboardCode::T,
- mus::mojom::kEventFlagNone);
+ matcher = mus::CreateKeyMatcher(ui::mojom::KeyboardCode::T,
+ ui::mojom::kEventFlagNone);
EXPECT_FALSE(dispatcher.AddAccelerator(accelerator_2, std::move(matcher)));
// Adding the accelerator with the same id should succeed once the existing
// accelerator is removed.
dispatcher.RemoveAccelerator(accelerator_2);
- matcher = mus::CreateKeyMatcher(mus::mojom::KeyboardCode::T,
- mus::mojom::kEventFlagNone);
+ matcher = mus::CreateKeyMatcher(ui::mojom::KeyboardCode::T,
+ ui::mojom::kEventFlagNone);
EXPECT_TRUE(dispatcher.AddAccelerator(accelerator_2, std::move(matcher)));
// Attempting to add an accelerator with the same matcher should fail.
uint32_t accelerator_3 = 3;
- matcher = mus::CreateKeyMatcher(mus::mojom::KeyboardCode::T,
- mus::mojom::kEventFlagNone);
+ matcher = mus::CreateKeyMatcher(ui::mojom::KeyboardCode::T,
+ ui::mojom::kEventFlagNone);
EXPECT_FALSE(dispatcher.AddAccelerator(accelerator_3, std::move(matcher)));
- matcher = mus::CreateKeyMatcher(mus::mojom::KeyboardCode::T,
- mus::mojom::kEventFlagControlDown);
+ matcher = mus::CreateKeyMatcher(ui::mojom::KeyboardCode::T,
+ ui::mojom::kEventFlagControlDown);
EXPECT_TRUE(dispatcher.AddAccelerator(accelerator_3, std::move(matcher)));
}
@@ -391,7 +391,7 @@ TEST_F(EventDispatcherTest, EventMatching) {
EventDispatcher* dispatcher = event_dispatcher();
mojom::EventMatcherPtr matcher = mus::CreateKeyMatcher(
- mus::mojom::KeyboardCode::W, mus::mojom::kEventFlagControlDown);
+ ui::mojom::KeyboardCode::W, ui::mojom::kEventFlagControlDown);
uint32_t accelerator_1 = 1;
dispatcher->AddAccelerator(accelerator_1, std::move(matcher));
@@ -413,8 +413,8 @@ TEST_F(EventDispatcherTest, EventMatching) {
EXPECT_EQ(0u, event_dispatcher_delegate->GetAndClearLastAccelerator());
uint32_t accelerator_2 = 2;
- matcher = mus::CreateKeyMatcher(mus::mojom::KeyboardCode::W,
- mus::mojom::kEventFlagNone);
+ matcher = mus::CreateKeyMatcher(ui::mojom::KeyboardCode::W,
+ ui::mojom::kEventFlagNone);
dispatcher->AddAccelerator(accelerator_2, std::move(matcher));
dispatcher->ProcessEvent(key);
EXPECT_EQ(accelerator_2,
@@ -432,8 +432,8 @@ TEST_F(EventDispatcherTest, PostTargetAccelerator) {
EventDispatcher* dispatcher = event_dispatcher();
mojom::EventMatcherPtr matcher = mus::CreateKeyMatcher(
- mus::mojom::KeyboardCode::W, mus::mojom::kEventFlagControlDown);
- matcher->accelerator_phase = mojom::AcceleratorPhase::POST_TARGET;
+ ui::mojom::KeyboardCode::W, ui::mojom::kEventFlagControlDown);
+ matcher->accelerator_phase = ui::mojom::AcceleratorPhase::POST_TARGET;
uint32_t accelerator_1 = 1;
dispatcher->AddAccelerator(accelerator_1, std::move(matcher));
« no previous file with comments | « components/mus/ws/event_dispatcher.cc ('k') | components/mus/ws/event_matcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698