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

Unified Diff: remoting/client/normalizing_input_filter_cros_unittest.cc

Issue 1908683002: Replace OS_LEFT/RIGHT with META_LEFT/RIGHT (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « remoting/client/normalizing_input_filter_cros.cc ('k') | remoting/client/normalizing_input_filter_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/normalizing_input_filter_cros_unittest.cc
diff --git a/remoting/client/normalizing_input_filter_cros_unittest.cc b/remoting/client/normalizing_input_filter_cros_unittest.cc
index fc839a455879b6b64e0b80c780deff312e980d3e..2a1543f13614ca1d8c6f7a7b9e3bd9e649e4d06a 100644
--- a/remoting/client/normalizing_input_filter_cros_unittest.cc
+++ b/remoting/client/normalizing_input_filter_cros_unittest.cc
@@ -67,19 +67,19 @@ TEST(NormalizingInputFilterCrosTest, PressReleaseOsKey) {
InSequence s;
EXPECT_CALL(stub, InjectKeyEvent(EqualsKeyEventWithNumLock(
- ui::DomCode::OS_LEFT, true)));
+ ui::DomCode::META_LEFT, true)));
EXPECT_CALL(stub, InjectKeyEvent(EqualsKeyEventWithNumLock(
- ui::DomCode::OS_LEFT, false)));
+ ui::DomCode::META_LEFT, false)));
EXPECT_CALL(stub, InjectKeyEvent(EqualsKeyEventWithNumLock(
- ui::DomCode::OS_RIGHT, true)));
+ ui::DomCode::META_RIGHT, true)));
EXPECT_CALL(stub, InjectKeyEvent(EqualsKeyEventWithNumLock(
- ui::DomCode::OS_RIGHT, false)));
+ ui::DomCode::META_RIGHT, false)));
}
// Inject press & release events for left & right OSKeys.
- PressAndReleaseKey(processor.get(), ui::DomCode::OS_LEFT);
- PressAndReleaseKey(processor.get(), ui::DomCode::OS_RIGHT);
+ PressAndReleaseKey(processor.get(), ui::DomCode::META_LEFT);
+ PressAndReleaseKey(processor.get(), ui::DomCode::META_RIGHT);
}
// Test OSKey key repeat switches it to "modifying" mode.
@@ -92,18 +92,18 @@ TEST(NormalizingInputFilterCrosTest, OSKeyRepeats) {
InSequence s;
EXPECT_CALL(stub, InjectKeyEvent(EqualsKeyEventWithNumLock(
- ui::DomCode::OS_LEFT, true)));
+ ui::DomCode::META_LEFT, true)));
EXPECT_CALL(stub, InjectKeyEvent(EqualsKeyEventWithNumLock(
- ui::DomCode::OS_LEFT, true)));
+ ui::DomCode::META_LEFT, true)));
EXPECT_CALL(stub,InjectKeyEvent(EqualsKeyEventWithNumLock(
- ui::DomCode::OS_LEFT, true)));
+ ui::DomCode::META_LEFT, true)));
}
// Inject a press and repeats for the left OSKey, but don't release it, and
// verify that the repeats result in press events.
- processor->InjectKeyEvent(MakeKeyEvent(ui::DomCode::OS_LEFT, true));
- processor->InjectKeyEvent(MakeKeyEvent(ui::DomCode::OS_LEFT, true));
- processor->InjectKeyEvent(MakeKeyEvent(ui::DomCode::OS_LEFT, true));
+ processor->InjectKeyEvent(MakeKeyEvent(ui::DomCode::META_LEFT, true));
+ processor->InjectKeyEvent(MakeKeyEvent(ui::DomCode::META_LEFT, true));
+ processor->InjectKeyEvent(MakeKeyEvent(ui::DomCode::META_LEFT, true));
}
// Test OSKey press followed by function key press and release results in
@@ -123,9 +123,9 @@ TEST(NormalizingInputFilterCrosTest, FunctionKey) {
}
// Hold the left OSKey while pressing & releasing the function key.
- processor->InjectKeyEvent(MakeKeyEvent(ui::DomCode::OS_LEFT, true));
+ processor->InjectKeyEvent(MakeKeyEvent(ui::DomCode::META_LEFT, true));
PressAndReleaseKey(processor.get(), ui::DomCode::F1);
- processor->InjectKeyEvent(MakeKeyEvent(ui::DomCode::OS_LEFT, false));
+ processor->InjectKeyEvent(MakeKeyEvent(ui::DomCode::META_LEFT, false));
}
// Test OSKey press followed by extended key press and release results in
@@ -145,9 +145,9 @@ TEST(NormalizingInputFilterCrosTest, ExtendedKey) {
}
// Hold the left OSKey while pressing & releasing the function key.
- processor->InjectKeyEvent(MakeKeyEvent(ui::DomCode::OS_LEFT, true));
+ processor->InjectKeyEvent(MakeKeyEvent(ui::DomCode::META_LEFT, true));
PressAndReleaseKey(processor.get(), ui::DomCode::INSERT);
- processor->InjectKeyEvent(MakeKeyEvent(ui::DomCode::OS_LEFT, false));
+ processor->InjectKeyEvent(MakeKeyEvent(ui::DomCode::META_LEFT, false));
}
// Test OSKey press followed by non-function, non-extended key press and release
@@ -162,19 +162,19 @@ TEST(NormalizingInputFilterCrosTest, OtherKey) {
InSequence s;
EXPECT_CALL(stub,InjectKeyEvent(EqualsKeyEventWithNumLock(
- ui::DomCode::OS_LEFT, true)));
+ ui::DomCode::META_LEFT, true)));
EXPECT_CALL(stub,InjectKeyEvent(EqualsKeyEventWithNumLock(
ui::DomCode::TAB, true)));
EXPECT_CALL(stub, InjectKeyEvent(EqualsKeyEventWithNumLock(
ui::DomCode::TAB, false)));
EXPECT_CALL(stub, InjectKeyEvent(EqualsKeyEventWithNumLock(
- ui::DomCode::OS_LEFT, false)));
+ ui::DomCode::META_LEFT, false)));
}
// Hold the left OSKey while pressing & releasing the function key.
- processor->InjectKeyEvent(MakeKeyEvent(ui::DomCode::OS_LEFT, true));
+ processor->InjectKeyEvent(MakeKeyEvent(ui::DomCode::META_LEFT, true));
PressAndReleaseKey(processor.get(), ui::DomCode::TAB);
- processor->InjectKeyEvent(MakeKeyEvent(ui::DomCode::OS_LEFT, false));
+ processor->InjectKeyEvent(MakeKeyEvent(ui::DomCode::META_LEFT, false));
}
// Test OSKey press followed by extended key press, then normal key press
@@ -192,20 +192,20 @@ TEST(NormalizingInputFilterCrosTest, ExtendedThenOtherKey) {
EXPECT_CALL(stub, InjectKeyEvent(EqualsKeyEventWithNumLock(
ui::DomCode::INSERT, false)));
EXPECT_CALL(stub, InjectKeyEvent(EqualsKeyEventWithNumLock(
- ui::DomCode::OS_LEFT, true)));
+ ui::DomCode::META_LEFT, true)));
EXPECT_CALL(stub, InjectKeyEvent(EqualsKeyEventWithNumLock(
ui::DomCode::TAB, true)));
EXPECT_CALL(stub, InjectKeyEvent(EqualsKeyEventWithNumLock(
ui::DomCode::TAB, false)));
EXPECT_CALL(stub, InjectKeyEvent(EqualsKeyEventWithNumLock(
- ui::DomCode::OS_LEFT, false)));
+ ui::DomCode::META_LEFT, false)));
}
// Hold the left OSKey while pressing & releasing the function key.
- processor->InjectKeyEvent(MakeKeyEvent(ui::DomCode::OS_LEFT, true));
+ processor->InjectKeyEvent(MakeKeyEvent(ui::DomCode::META_LEFT, true));
PressAndReleaseKey(processor.get(), ui::DomCode::INSERT);
PressAndReleaseKey(processor.get(), ui::DomCode::TAB);
- processor->InjectKeyEvent(MakeKeyEvent(ui::DomCode::OS_LEFT, false));
+ processor->InjectKeyEvent(MakeKeyEvent(ui::DomCode::META_LEFT, false));
}
// Test OSKey press followed by mouse event puts the OSKey into modifying mode.
@@ -218,16 +218,16 @@ TEST(NormalizingInputFilterCrosTest, MouseEvent) {
InSequence s;
EXPECT_CALL(stub,InjectKeyEvent(EqualsKeyEventWithNumLock(
- ui::DomCode::OS_LEFT, true)));
+ ui::DomCode::META_LEFT, true)));
EXPECT_CALL(stub, InjectMouseEvent(EqualsMouseMoveEvent(0, 0)));
EXPECT_CALL(stub, InjectKeyEvent(EqualsKeyEventWithNumLock(
- ui::DomCode::OS_LEFT, false)));
+ ui::DomCode::META_LEFT, false)));
}
// Hold the left OSKey while pressing & releasing the function key.
- processor->InjectKeyEvent(MakeKeyEvent(ui::DomCode::OS_LEFT, true));
+ processor->InjectKeyEvent(MakeKeyEvent(ui::DomCode::META_LEFT, true));
processor->InjectMouseEvent(MakeMouseMoveEvent(0, 0));
- processor->InjectKeyEvent(MakeKeyEvent(ui::DomCode::OS_LEFT, false));
+ processor->InjectKeyEvent(MakeKeyEvent(ui::DomCode::META_LEFT, false));
}
// Test left alt + right click is remapped to left alt + left click.
« no previous file with comments | « remoting/client/normalizing_input_filter_cros.cc ('k') | remoting/client/normalizing_input_filter_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698