Index: content/public/test/browser_test_utils.cc |
diff --git a/content/public/test/browser_test_utils.cc b/content/public/test/browser_test_utils.cc |
index f6b9361c2f7d1a16db976294a11f3c4799c078cd..b8c206b2f395f2f199065ba8ec6e1e4dd8fc2608 100644 |
--- a/content/public/test/browser_test_utils.cc |
+++ b/content/public/test/browser_test_utils.cc |
@@ -224,13 +224,20 @@ void CrashTab(WebContents* web_contents) { |
} |
void SimulateMouseClick(WebContents* web_contents) { |
+ SimulateModifiedMouseClick(web_contents, 0, |
+ WebKit::WebMouseEvent::ButtonLeft); |
+} |
+ |
+void SimulateModifiedMouseClick(WebContents* web_contents, int modifiers, |
+ WebKit::WebMouseEvent::Button button) { |
int x = web_contents->GetView()->GetContainerSize().width() / 2; |
int y = web_contents->GetView()->GetContainerSize().height() / 2; |
WebKit::WebMouseEvent mouse_event; |
mouse_event.type = WebKit::WebInputEvent::MouseDown; |
- mouse_event.button = WebKit::WebMouseEvent::ButtonLeft; |
+ mouse_event.button = button; |
mouse_event.x = x; |
mouse_event.y = y; |
+ mouse_event.modifiers = modifiers; |
// Mac needs globalX/globalY for events to plugins. |
gfx::Rect offset; |
web_contents->GetView()->GetContainerBounds(&offset); |