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

Unified Diff: chrome/test/base/ui_test_utils.cc

Issue 10703141: End-to-end browser tests for speech recognition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved test to /chrome/test Created 8 years, 5 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
« no previous file with comments | « chrome/test/base/ui_test_utils.h ('k') | chrome/test/data/speech/basic_recognition.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/ui_test_utils.cc
diff --git a/chrome/test/base/ui_test_utils.cc b/chrome/test/base/ui_test_utils.cc
index 031ea05f0e2b70cb7029183db94d376eb4402b1f..863c81b7b690c828f2420f1d1138d5e96f9d68e3 100644
--- a/chrome/test/base/ui_test_utils.cc
+++ b/chrome/test/base/ui_test_utils.cc
@@ -636,9 +636,9 @@ void CloseAllInfoBars(TabContents* tab) {
infobar_helper->RemoveInfoBar(infobar_helper->GetInfoBarDelegateAt(0));
}
-void SimulateMouseClick(content::WebContents* tab) {
- int x = tab->GetView()->GetContainerSize().width() / 2;
- int y = tab->GetView()->GetContainerSize().height() / 2;
+void SimulateMouseClick(content::WebContents* tab, const gfx::Point& point) {
+ const int x = point.x();
+ const int y = point.y();
WebKit::WebMouseEvent mouse_event;
mouse_event.type = WebKit::WebInputEvent::MouseDown;
mouse_event.button = WebKit::WebMouseEvent::ButtonLeft;
@@ -655,6 +655,12 @@ void SimulateMouseClick(content::WebContents* tab) {
tab->GetRenderViewHost()->ForwardMouseEvent(mouse_event);
}
+void SimulateMouseClick(content::WebContents* tab) {
+ int x = tab->GetView()->GetContainerSize().width() / 2;
+ int y = tab->GetView()->GetContainerSize().height() / 2;
+ SimulateMouseClick(tab, gfx::Point(x, y));
+}
+
void SimulateMouseEvent(content::WebContents* tab,
WebKit::WebInputEvent::Type type,
const gfx::Point& point) {
« no previous file with comments | « chrome/test/base/ui_test_utils.h ('k') | chrome/test/data/speech/basic_recognition.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698