summaryrefslogtreecommitdiffstats
path: root/webkit/glue/context_menu_unittest.cc
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-27 23:30:22 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-27 23:30:22 +0000
commit62cb33cae4bad68a085b50832c8a7f1e1c2e917c (patch)
tree4eddbf29c7ae1c41fd1300ae4ce95b817404bbaf /webkit/glue/context_menu_unittest.cc
parent57346c5659ada3c2a06095afac6e53bedf41ab94 (diff)
downloadchromium_src-62cb33cae4bad68a085b50832c8a7f1e1c2e917c.zip
chromium_src-62cb33cae4bad68a085b50832c8a7f1e1c2e917c.tar.gz
chromium_src-62cb33cae4bad68a085b50832c8a7f1e1c2e917c.tar.bz2
Use Webkit::WebInputEvent and remove webkit/glue/webinputevent.
This change adds a temporary dependency on src/KeyIdentifier.{h,cpp} which I am going to remove after this CL. I didn't want to grow this CL any larger. R=dglazkov Review URL: http://codereview.chromium.org/53099 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12728 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/context_menu_unittest.cc')
-rw-r--r--webkit/glue/context_menu_unittest.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/webkit/glue/context_menu_unittest.cc b/webkit/glue/context_menu_unittest.cc
index d54d1f3..b7ff8ed 100644
--- a/webkit/glue/context_menu_unittest.cc
+++ b/webkit/glue/context_menu_unittest.cc
@@ -14,6 +14,8 @@
#include "webkit/glue/webview.h"
#include "webkit/tools/test_shell/test_shell_test.h"
+using WebKit::WebInputEvent;
+using WebKit::WebMouseEvent;
// Right clicking inside on an iframe should produce a context menu
class ContextMenuCapturing : public TestShellTest {
@@ -45,21 +47,18 @@ TEST_F(ContextMenuCapturing, ContextMenuCapturing) {
// Create a right click in the center of the iframe. (I'm hoping this will
// make this a bit more robust in case of some other formatting or other bug.)
WebMouseEvent mouse_event;
- mouse_event.type = WebInputEvent::MOUSE_DOWN;
- mouse_event.modifiers = 0;
- mouse_event.button = WebMouseEvent::BUTTON_RIGHT;
+ mouse_event.type = WebInputEvent::MouseDown;
+ mouse_event.button = WebMouseEvent::ButtonRight;
mouse_event.x = 250;
mouse_event.y = 250;
- mouse_event.global_x = 250;
- mouse_event.global_y = 250;
- mouse_event.timestamp_sec = 0;
- mouse_event.layout_test_click_count = 0;
+ mouse_event.globalX = 250;
+ mouse_event.globalY = 250;
WebView* webview = test_shell_->webView();
webview->HandleInputEvent(&mouse_event);
// Now simulate the corresponding up event which should display the menu
- mouse_event.type = WebInputEvent::MOUSE_UP;
+ mouse_event.type = WebInputEvent::MouseUp;
webview->HandleInputEvent(&mouse_event);
EXPECT_EQ(1U, test_delegate->captured_context_menu_events().size());