Chromium Code Reviews| Index: ui/views/controls/textfield/textfield_unittest.cc |
| diff --git a/ui/views/controls/textfield/textfield_unittest.cc b/ui/views/controls/textfield/textfield_unittest.cc |
| index 82a712abe53994b6d757f7bd9dfd8265e9360a93..a7f2f1bebfe077fa68e83399a9e398d3c30530e2 100644 |
| --- a/ui/views/controls/textfield/textfield_unittest.cc |
| +++ b/ui/views/controls/textfield/textfield_unittest.cc |
| @@ -518,9 +518,10 @@ class TextfieldTest : public ViewsTestBase, public TextfieldController { |
| // Sends a platform-specific move (and select) to start of line. |
| void SendHomeEvent(bool shift) { |
| if (TestingNativeMac()) { |
| - // Use Cmd+Left on native Mac. An RTL-agnostic "end" doesn't have a |
| - // default key-binding on Mac. |
| - SendKeyEvent(ui::VKEY_LEFT, shift /* shift */, true /* command */); |
| + // Move to beginning of line doesn't have a default key binding on Mac. |
|
tapted
2016/06/08 04:16:45
This is now different to "SendHomeEvent". If the p
karandeepb
2016/06/08 04:56:05
How is it different to SendHomeEvent? Based on the
tapted
2016/06/08 05:59:03
It sends Up. It's sorta coincidence that that goes
karandeepb
2016/06/08 08:04:56
Added a comment to SendHomeEvent/SendEndEvent sayi
|
| + // Since textfields don't support multiple lines, use Cmd+Up instead, |
| + // which moves to the beginning of document. |
| + SendKeyEvent(ui::VKEY_UP, shift /* shift */, true /* command */); |
| return; |
| } |
| SendKeyEvent(ui::VKEY_HOME, shift /* shift */, false /* control */); |
| @@ -529,7 +530,7 @@ class TextfieldTest : public ViewsTestBase, public TextfieldController { |
| // Sends a platform-specific move (and select) to end of line. |
| void SendEndEvent(bool shift) { |
| if (TestingNativeMac()) { |
| - SendKeyEvent(ui::VKEY_RIGHT, shift, true); // Cmd+Right. |
| + SendKeyEvent(ui::VKEY_DOWN, shift, true); // Cmd+Down. |
| return; |
| } |
| SendKeyEvent(ui::VKEY_END, shift, false); |