Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(858)

Unified Diff: content/public/test/browser_test_utils.cc

Issue 11235048: Test suite that monitors the disposition of JS-created windows based on what (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix OSX. Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..88e375e4dbaa86574fbe41ae6394e174ab414592 100644
--- a/content/public/test/browser_test_utils.cc
+++ b/content/public/test/browser_test_utils.cc
@@ -223,14 +223,16 @@ void CrashTab(WebContents* web_contents) {
observer.Wait();
}
-void SimulateMouseClick(WebContents* web_contents) {
+void SimulateMouseClick(WebContents* web_contents, int modifiers,
sky 2012/10/23 23:09:28 nit: wrap each param to a new line.
ericu 2012/10/23 23:15:44 Done.
+ 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);
« chrome/browser/ui/browser_browsertest.cc ('K') | « content/public/test/browser_test_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698