summaryrefslogtreecommitdiffstats
path: root/chrome/test/automation
diff options
context:
space:
mode:
authortommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-10 15:20:27 +0000
committertommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-10 15:20:27 +0000
commitb9d227497415e92048d88f676b395fc81d175598 (patch)
treee68597fada024167bbe52822c64d54c45b2dfa7f /chrome/test/automation
parent3f1e7569c74e1d87c0038d4e3ddf4ee85511b9ff (diff)
downloadchromium_src-b9d227497415e92048d88f676b395fc81d175598.zip
chromium_src-b9d227497415e92048d88f676b395fc81d175598.tar.gz
chromium_src-b9d227497415e92048d88f676b395fc81d175598.tar.bz2
Reapplying tab support (change 9388). I synced and re-applied my change and found the automation tests not hanging.
I also took a look at the logs from the hanging buildbots and the reverted change didn't touch on any of the code that appeared to be hanging. I also put breakpoints on the modified functions while running ui_tests.exe and nothing hit, so it looks like a fluke. I did get a hang though when running an old build of ui_tests.exe with a new version of chrome.dll. Is there any chance that there could have been a stale version on the build bots? Review URL: http://codereview.chromium.org/20214 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9478 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/automation')
-rw-r--r--chrome/test/automation/automation_messages_internal.h20
-rw-r--r--chrome/test/automation/tab_proxy.cc8
-rw-r--r--chrome/test/automation/tab_proxy.h3
3 files changed, 31 insertions, 0 deletions
diff --git a/chrome/test/automation/automation_messages_internal.h b/chrome/test/automation/automation_messages_internal.h
index 09c8390..9b31477 100644
--- a/chrome/test/automation/automation_messages_internal.h
+++ b/chrome/test/automation/automation_messages_internal.h
@@ -553,6 +553,26 @@ IPC_BEGIN_MESSAGES(Automation)
IPC_MESSAGE_ROUTED2(AutomationMsg_ProcessUnhandledAccelerator, int, MSG)
#endif // defined(OS_WIN)
+ // Sent by the external tab to the host to notify that the user has tabbed
+ // out of the tab.
+ // Request:
+ // - bool: |reverse| set to true when shift-tabbing out of the tab, false
+ // otherwise.
+ // Response:
+ // None expected
+ IPC_MESSAGE_ROUTED1(AutomationMsg_TabbedOut, bool)
+
+ // Sent by the external tab host to ask focus to be set to either the first
+ // or last element on the page.
+ // Request:
+ // - int: handle of the tab
+ // - bool: |reverse|
+ // true: Focus will be set to the last focusable element
+ // false: Focus will be set to the first focusable element
+ // Response:
+ // None expected
+ IPC_MESSAGE_ROUTED2(AutomationMsg_SetInitialFocus, int, bool)
+
// This message is an outgoing message from Chrome to an external host.
// It is a request to open a url
// Request:
diff --git a/chrome/test/automation/tab_proxy.cc b/chrome/test/automation/tab_proxy.cc
index 61b50cf..e0e6102 100644
--- a/chrome/test/automation/tab_proxy.cc
+++ b/chrome/test/automation/tab_proxy.cc
@@ -641,6 +641,14 @@ bool TabProxy::ProcessUnhandledAccelerator(const MSG& msg) {
// This message expects no response
}
+bool TabProxy::SetInitialFocus(bool reverse) {
+ if (!is_valid())
+ return false;
+ return sender_->Send(
+ new AutomationMsg_SetInitialFocus(0, handle_, reverse));
+ // This message expects no response
+}
+
bool TabProxy::WaitForTabToBeRestored(uint32 timeout_ms) {
if (!is_valid())
return false;
diff --git a/chrome/test/automation/tab_proxy.h b/chrome/test/automation/tab_proxy.h
index 932f5c7..f9a8339 100644
--- a/chrome/test/automation/tab_proxy.h
+++ b/chrome/test/automation/tab_proxy.h
@@ -219,6 +219,9 @@ class TabProxy : public AutomationResourceProxy {
// to handle the keys
bool ProcessUnhandledAccelerator(const MSG& msg);
+ // Ask the tab to set focus to either the first or last element on the page.
+ bool SetInitialFocus(bool reverse);
+
// Waits for the tab to finish being restored. Returns true on success.
// timeout_ms gives the max amount of time to wait for restore to complete.
bool WaitForTabToBeRestored(uint32 timeout_ms);