| Index: webkit/tools/test_shell/event_sending_controller.cc
|
| diff --git a/webkit/tools/test_shell/event_sending_controller.cc b/webkit/tools/test_shell/event_sending_controller.cc
|
| index 77a27d87c34aeb8536780e218cfecc413d87544a..43558dcdc9e50ae451b1f8f9547e54a3a516c62c 100644
|
| --- a/webkit/tools/test_shell/event_sending_controller.cc
|
| +++ b/webkit/tools/test_shell/event_sending_controller.cc
|
| @@ -219,6 +219,15 @@ bool GetEditCommand(const WebKeyboardEvent& event, std::string* name) {
|
| #endif
|
| }
|
|
|
| +// Key event location code introduced in DOM Level 3.
|
| +// See also: http://www.w3.org/TR/DOM-Level-3-Events/#events-keyboardevents
|
| +enum KeyLocationCode {
|
| + DOM_KEY_LOCATION_STANDARD = 0x00,
|
| + DOM_KEY_LOCATION_LEFT = 0x01,
|
| + DOM_KEY_LOCATION_RIGHT = 0x02,
|
| + DOM_KEY_LOCATION_NUMPAD = 0x03
|
| +};
|
| +
|
| } // anonymous namespace
|
|
|
| EventSendingController::EventSendingController(TestShell* shell)
|
| @@ -579,6 +588,14 @@ void EventSendingController::keyDown(
|
| if (needs_shift_key_modifier)
|
| event_down.modifiers |= WebInputEvent::ShiftKey;
|
|
|
| + // See if KeyLocation argument is given.
|
| + if (args.size() >= 3 && args[2].isNumber()) {
|
| + int location = args[2].ToInt32();
|
| + if (location == DOM_KEY_LOCATION_NUMPAD) {
|
| + event_down.modifiers |= WebInputEvent::IsKeyPad;
|
| + }
|
| + }
|
| +
|
| event_char = event_up = event_down;
|
| event_up.type = WebInputEvent::KeyUp;
|
| // EventSendingController.m forces a layout here, with at least one
|
|
|