summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-08 04:13:50 +0000
committerkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-08 04:13:50 +0000
commit18d87467f92a84c9535d78a29f3dfae154a0fb05 (patch)
treed5e0b4567a58a5177f8a9584946a2dacd12cc74d /webkit
parentbd45292e5c21fcb3fef1fd5dfb8207ae29277f8a (diff)
downloadchromium_src-18d87467f92a84c9535d78a29f3dfae154a0fb05.zip
chromium_src-18d87467f92a84c9535d78a29f3dfae154a0fb05.tar.gz
chromium_src-18d87467f92a84c9535d78a29f3dfae154a0fb05.tar.bz2
Fix our version of eventSender to handle keyLocation arg correctly.
BUG=31360 TEST=LayoutTests/fast/events/keydown-numpad-keys.html Review URL: http://codereview.chromium.org/518036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35773 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/tools/layout_tests/test_expectations.txt3
-rw-r--r--webkit/tools/test_shell/event_sending_controller.cc17
2 files changed, 17 insertions, 3 deletions
diff --git a/webkit/tools/layout_tests/test_expectations.txt b/webkit/tools/layout_tests/test_expectations.txt
index bfad54b..43d24cd 100644
--- a/webkit/tools/layout_tests/test_expectations.txt
+++ b/webkit/tools/layout_tests/test_expectations.txt
@@ -929,9 +929,6 @@ BUG31344 : LayoutTests/svg/custom/global-constructors.html = TEXT
// New in WebKit r52580.
BUG31345 WIN LINUX : LayoutTests/svg/custom/mask-on-multiple-objects.svg = IMAGE
-// New in WebKit r52608.
-BUG31360 : LayoutTests/fast/events/keydown-numpad-keys.html = TEXT
-
// Text fails very rarely, 1/200 runs or fewer.
BUG29737 LINUX DEBUG : LayoutTests/svg/W3C-SVG-1.1/filters-light-01-f.svg = TEXT PASS
BUG29737 MAC RELEASE : LayoutTests/svg/W3C-SVG-1.1/filters-light-01-f.svg = TEXT PASS
diff --git a/webkit/tools/test_shell/event_sending_controller.cc b/webkit/tools/test_shell/event_sending_controller.cc
index 77a27d8..43558dc 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