diff options
Diffstat (limited to 'chrome/test/automation')
-rw-r--r-- | chrome/test/automation/automation_proxy.cc | 4 | ||||
-rw-r--r-- | chrome/test/automation/automation_proxy.h | 4 | ||||
-rw-r--r-- | chrome/test/automation/browser_proxy.cc | 15 | ||||
-rw-r--r-- | chrome/test/automation/browser_proxy.h | 4 |
4 files changed, 23 insertions, 4 deletions
diff --git a/chrome/test/automation/automation_proxy.cc b/chrome/test/automation/automation_proxy.cc index dc00fbe..5c12a70 100644 --- a/chrome/test/automation/automation_proxy.cc +++ b/chrome/test/automation/automation_proxy.cc @@ -416,9 +416,9 @@ bool AutomationProxy::GetBrowserLocale(string16* locale) { return !locale->empty(); } -scoped_refptr<BrowserProxy> AutomationProxy::FindNormalBrowserWindow() { +scoped_refptr<BrowserProxy> AutomationProxy::FindTabbedBrowserWindow() { int handle = 0; - if (!Send(new AutomationMsg_FindNormalBrowserWindow(&handle))) + if (!Send(new AutomationMsg_FindTabbedBrowserWindow(&handle))) return NULL; return ProxyObjectFromHandle<BrowserProxy>(handle); diff --git a/chrome/test/automation/automation_proxy.h b/chrome/test/automation/automation_proxy.h index e273e4b..0390f03 100644 --- a/chrome/test/automation/automation_proxy.h +++ b/chrome/test/automation/automation_proxy.h @@ -154,10 +154,10 @@ class AutomationProxy : public IPC::Channel::Listener, scoped_refptr<BrowserProxy> GetBrowserWindow(int window_index); // Finds the first browser window that is not incognito mode and of type - // TYPE_NORMAL, and returns its corresponding BrowserProxy, transferring + // TYPE_TABBED, and returns its corresponding BrowserProxy, transferring // ownership of the pointer to the caller. // On failure, returns NULL. - scoped_refptr<BrowserProxy> FindNormalBrowserWindow(); + scoped_refptr<BrowserProxy> FindTabbedBrowserWindow(); // Returns the BrowserProxy for the browser window which was last active, // transferring ownership of the pointer to the caller. diff --git a/chrome/test/automation/browser_proxy.cc b/chrome/test/automation/browser_proxy.cc index 1db1dd2..9030f32 100644 --- a/chrome/test/automation/browser_proxy.cc +++ b/chrome/test/automation/browser_proxy.cc @@ -167,6 +167,21 @@ bool BrowserProxy::GetType(Browser::Type* type) const { return true; } +bool BrowserProxy::IsApplication(bool* is_application) { + DCHECK(is_application); + + if (!is_valid()) + return false; + + bool success = false; + if (!sender_->Send(new AutomationMsg_IsBrowserInApplicationMode( + handle_, is_application, &success))) { + return false; + } + + return success; +} + bool BrowserProxy::ApplyAccelerator(int id) { return RunCommandAsync(id); } diff --git a/chrome/test/automation/browser_proxy.h b/chrome/test/automation/browser_proxy.h index 9e82fa4..ab198bc 100644 --- a/chrome/test/automation/browser_proxy.h +++ b/chrome/test/automation/browser_proxy.h @@ -64,6 +64,10 @@ class BrowserProxy : public AutomationResourceProxy { // successful. bool GetType(Browser::Type* type) const WARN_UNUSED_RESULT; + // Sets |is_application| to whether the browser is currently in application + // mode. + bool IsApplication(bool* is_application) WARN_UNUSED_RESULT; + // Returns the TabProxy for the tab at the given index, transferring // ownership of the pointer to the caller. On failure, returns NULL. // |