summaryrefslogtreecommitdiffstats
path: root/webkit/tools/test_shell
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-06 20:28:32 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-06 20:28:32 +0000
commit64e12916f5f9410512a34b96cc706e6ccf63ec46 (patch)
treee81dae32238ea1557c94ce11fdd068c73f8b9280 /webkit/tools/test_shell
parente7a023be01011f2a2734e2c72d1d2c632a86e272 (diff)
downloadchromium_src-64e12916f5f9410512a34b96cc706e6ccf63ec46.zip
chromium_src-64e12916f5f9410512a34b96cc706e6ccf63ec46.tar.gz
chromium_src-64e12916f5f9410512a34b96cc706e6ccf63ec46.tar.bz2
Don't special case certain characters in event_sending_controller.cc
Remove a pending test that has been upstreamed. Review URL: http://codereview.chromium.org/17064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7604 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell')
-rw-r--r--webkit/tools/test_shell/event_sending_controller.cc81
1 files changed, 15 insertions, 66 deletions
diff --git a/webkit/tools/test_shell/event_sending_controller.cc b/webkit/tools/test_shell/event_sending_controller.cc
index a603524..9a82184 100644
--- a/webkit/tools/test_shell/event_sending_controller.cc
+++ b/webkit/tools/test_shell/event_sending_controller.cc
@@ -198,7 +198,7 @@ int EventSendingController::GetButtonNumberFromSingleArg(
// Implemented javascript methods.
//
- void EventSendingController::mouseDown(
+void EventSendingController::mouseDown(
const CppArgumentList& args, CppVariant* result) {
result->SetNull();
@@ -227,7 +227,7 @@ int EventSendingController::GetButtonNumberFromSingleArg(
webview()->HandleInputEvent(&event);
}
- void EventSendingController::mouseUp(
+void EventSendingController::mouseUp(
const CppArgumentList& args, CppVariant* result) {
result->SetNull();
@@ -274,7 +274,7 @@ int EventSendingController::GetButtonNumberFromSingleArg(
}
}
- void EventSendingController::mouseMoveTo(
+void EventSendingController::mouseMoveTo(
const CppArgumentList& args, CppVariant* result) {
result->SetNull();
@@ -304,21 +304,10 @@ int EventSendingController::GetButtonNumberFromSingleArg(
}
}
- void EventSendingController::keyDown(
+void EventSendingController::keyDown(
const CppArgumentList& args, CppVariant* result) {
result->SetNull();
- static const int kPercentVirtualKeyCode = 0x25;
- static const int kAmpersandVirtualKeyCode = 0x26;
-
- static const int kLeftParenthesesVirtualKeyCode = 0x28;
- static const int kRightParenthesesVirtualKeyCode = 0x29;
-
-#if defined(OS_WIN)
- static const int kLeftCurlyBracketVirtualKeyCode = 0x7B;
- static const int kRightCurlyBracketVirtualKeyCode = 0x7D;
-#endif
-
bool generate_char = false;
if (args.size() >= 1 && args[0].isString()) {
@@ -384,47 +373,7 @@ int EventSendingController::GetButtonNumberFromSingleArg(
if (generate_char) {
WebKeyboardEvent event_char = event_down;
- if (event_down.modifiers & WebInputEvent::SHIFT_KEY) {
- // Special case for the following characters when the shift key is
- // pressed in conjunction with these characters.
- // Windows generates a WM_KEYDOWN message with the ASCII code of
- // the character followed by a WM_CHAR for the corresponding
- // virtual key code.
- // We check for these keys to catch regressions in keyEvent handling
- // in webkit.
- switch(code) {
- case '5':
- event_char.key_code = kPercentVirtualKeyCode;
- break;
- case '7':
- event_char.key_code = kAmpersandVirtualKeyCode;
- break;
- case '9':
- event_char.key_code = kLeftParenthesesVirtualKeyCode;
- break;
- case '0':
- event_char.key_code = kRightParenthesesVirtualKeyCode;
- break;
-#if defined(OS_WIN)
- // '[{' for US
- case VK_OEM_4:
- event_char.key_code = kLeftCurlyBracketVirtualKeyCode;
- break;
- // ']}' for US
- case VK_OEM_6:
- event_char.key_code = kRightCurlyBracketVirtualKeyCode;
- break;
-#endif
- default:
- break;
- }
- }
event_char.type = WebInputEvent::CHAR;
-#if defined(OS_LINUX)
- // |key_code| may have changed, so update |text|.
- // (See deanm comment above.)
- event_char.text = event_char.key_code;
-#endif
webview()->HandleInputEvent(&event_char);
}
@@ -432,7 +381,7 @@ int EventSendingController::GetButtonNumberFromSingleArg(
}
}
- bool EventSendingController::NeedsShiftModifer(int key_code) {
+bool EventSendingController::NeedsShiftModifer(int key_code) {
// If code is an uppercase letter, assign a SHIFT key to
// event_down.modifier, this logic comes from
// WebKit/WebKitTools/DumpRenderTree/Win/EventSender.cpp
@@ -441,7 +390,7 @@ int EventSendingController::GetButtonNumberFromSingleArg(
return false;
}
- void EventSendingController::leapForward(
+void EventSendingController::leapForward(
const CppArgumentList& args, CppVariant* result) {
result->SetNull();
@@ -454,19 +403,19 @@ int EventSendingController::GetButtonNumberFromSingleArg(
// Apple's port of webkit zooms by a factor of 1.2 (see
// WebKit/WebView/WebView.mm)
- void EventSendingController::textZoomIn(
+void EventSendingController::textZoomIn(
const CppArgumentList& args, CppVariant* result) {
webview()->ZoomIn(true);
result->SetNull();
}
- void EventSendingController::textZoomOut(
+void EventSendingController::textZoomOut(
const CppArgumentList& args, CppVariant* result) {
webview()->ZoomOut(true);
result->SetNull();
}
- void EventSendingController::ReplaySavedEvents() {
+void EventSendingController::ReplaySavedEvents() {
replaying_saved_events = true;
while (!mouse_event_queue.empty()) {
WebMouseEvent event = mouse_event_queue.front();
@@ -483,14 +432,14 @@ int EventSendingController::GetButtonNumberFromSingleArg(
NOTREACHED();
}
}
-
+
replaying_saved_events = false;
}
- void EventSendingController::contextClick(
+void EventSendingController::contextClick(
const CppArgumentList& args, CppVariant* result) {
result->SetNull();
-
+
webview()->Layout();
if (GetCurrentEventTimeSec() - last_click_time_sec >= 1) {
@@ -518,17 +467,17 @@ int EventSendingController::GetButtonNumberFromSingleArg(
// Unimplemented stubs
//
- void EventSendingController::enableDOMUIEventLogging(
+void EventSendingController::enableDOMUIEventLogging(
const CppArgumentList& args, CppVariant* result) {
result->SetNull();
}
- void EventSendingController::fireKeyboardEventsToElement(
+void EventSendingController::fireKeyboardEventsToElement(
const CppArgumentList& args, CppVariant* result) {
result->SetNull();
}
- void EventSendingController::clearKillRing(
+void EventSendingController::clearKillRing(
const CppArgumentList& args, CppVariant* result) {
result->SetNull();
}