summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_focus_uitest.cc
diff options
context:
space:
mode:
authorjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-29 23:08:30 +0000
committerjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-29 23:08:30 +0000
commit1b5a48c29bca7371ed64c616d7d35a796d6a3341 (patch)
tree5492d89e4ea0d6389a13186c90f79a4a8f712323 /chrome/browser/browser_focus_uitest.cc
parent83ffe9e621ae92d9a1bd32fd363f8dc5728010b0 (diff)
downloadchromium_src-1b5a48c29bca7371ed64c616d7d35a796d6a3341.zip
chromium_src-1b5a48c29bca7371ed64c616d7d35a796d6a3341.tar.gz
chromium_src-1b5a48c29bca7371ed64c616d7d35a796d6a3341.tar.bz2
Implement UI automation on the Mac.
Code is untested. From gChat: me: do you have a good test I can use to make sure mac impl of ui_controls for sending events works OK? Or would you prefer I send you CLs to play with and we iterate by hand? Joe: I would like the CL to play with to see if I can get it to work with the code I wrote Warning to Joe: mouse moved events currently use the Mac coordinate frame (0,0 is bottom-left not top-left). That's easy to switch; I'd like to do whatever is easiest to get WebDriver working. BUG=26102 Review URL: http://codereview.chromium.org/1701006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46005 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_focus_uitest.cc')
-rw-r--r--chrome/browser/browser_focus_uitest.cc19
1 files changed, 10 insertions, 9 deletions
diff --git a/chrome/browser/browser_focus_uitest.cc b/chrome/browser/browser_focus_uitest.cc
index b5c9df23..5d03a5f 100644
--- a/chrome/browser/browser_focus_uitest.cc
+++ b/chrome/browser/browser_focus_uitest.cc
@@ -304,7 +304,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, TabsRememberFocus) {
ASSERT_TRUE(IsViewFocused(vid));
ui_controls::SendKeyPressNotifyWhenDone(window, base::VKEY_TAB, true,
- false, false,
+ false, false, false,
new MessageLoop::QuitTask());
ui_test_utils::RunMessageLoop();
}
@@ -317,7 +317,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, TabsRememberFocus) {
ASSERT_TRUE(IsViewFocused(vid));
ui_controls::SendKeyPressNotifyWhenDone(window, base::VKEY_TAB, true,
- true, false,
+ true, false, false,
new MessageLoop::QuitTask());
ui_test_utils::RunMessageLoop();
}
@@ -472,7 +472,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, FocusTraversal) {
ASSERT_STREQ(kExpElementIDs[j], actual.c_str());
ASSERT_TRUE(ui_controls::SendKeyPress(window, base::VKEY_TAB,
- false, false, false));
+ false, false, false, false));
if (j < arraysize(kExpElementIDs) - 1) {
ui_test_utils::WaitForFocusChange(browser()->GetSelectedTabContents()->
@@ -499,7 +499,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, FocusTraversal) {
for (size_t j = 0; j < 7; ++j) {
SCOPED_TRACE(StringPrintf("inner loop: %" PRIuS, j));
ASSERT_TRUE(ui_controls::SendKeyPress(window, base::VKEY_TAB,
- false, true, false));
+ false, true, false, false));
if (j < arraysize(kExpElementIDs) - 1) {
ui_test_utils::WaitForFocusChange(browser()->GetSelectedTabContents()->
@@ -571,7 +571,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_FocusTraversalOnInterstitial) {
ASSERT_STREQ(kExpElementIDs[j], actual.c_str());
ASSERT_TRUE(ui_controls::SendKeyPress(window, base::VKEY_TAB,
- false, false, false));
+ false, false, false, false));
if (j < arraysize(kExpElementIDs) - 1) {
interstitial_page->WaitForFocusChange();
@@ -595,7 +595,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_FocusTraversalOnInterstitial) {
// Now let's press shift-tab to move the focus in reverse.
for (size_t j = 0; j < 7; ++j) {
ASSERT_TRUE(ui_controls::SendKeyPress(window, base::VKEY_TAB,
- false, true, false));
+ false, true, false, false));
if (j < arraysize(kExpElementIDs) - 1) {
interstitial_page->WaitForFocusChange();
@@ -663,7 +663,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, FindFocusTest) {
// Press Ctrl+F, which will make the Find box open and request focus.
ui_controls::SendKeyPressNotifyWhenDone(window, base::VKEY_F, true,
- false, false,
+ false, false, false,
new MessageLoop::QuitTask());
ui_test_utils::RunMessageLoop();
@@ -683,7 +683,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, FindFocusTest) {
// Now press Ctrl+F again and focus should move to the Find box.
ui_controls::SendKeyPressNotifyWhenDone(window, base::VKEY_F, true,
- false, false,
+ false, false, false,
new MessageLoop::QuitTask());
ui_test_utils::RunMessageLoop();
ASSERT_TRUE(IsViewFocused(VIEW_ID_FIND_IN_PAGE_TEXT_FIELD));
@@ -694,7 +694,8 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, FindFocusTest) {
// Now press Ctrl+F again and focus should move to the Find box.
ui_controls::SendKeyPressNotifyWhenDone(window, base::VKEY_F, true, false,
- false, new MessageLoop::QuitTask());
+ false, false,
+ new MessageLoop::QuitTask());
ui_test_utils::RunMessageLoop();
// See remark above on why we wait.