summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/automation/automation_messages_internal.h10
-rw-r--r--chrome/test/automation/browser_proxy.cc20
-rw-r--r--chrome/test/automation/browser_proxy.h7
-rw-r--r--chrome/test/test_browser_window.h1
4 files changed, 38 insertions, 0 deletions
diff --git a/chrome/test/automation/automation_messages_internal.h b/chrome/test/automation/automation_messages_internal.h
index 0616aea..d2f7458 100644
--- a/chrome/test/automation/automation_messages_internal.h
+++ b/chrome/test/automation/automation_messages_internal.h
@@ -1016,6 +1016,16 @@ IPC_BEGIN_MESSAGES(Automation)
IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_GetFilteredInetHitCount,
int /* hit_count */)
+ // Is the browser in fullscreen mode?
+ IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_IsFullscreen,
+ int /* browser_handle */,
+ bool /* is_fullscreen */)
+
+ // Is the fullscreen bubble visible?
+ IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_IsFullscreenBubbleVisible,
+ int /* browser_handle */,
+ bool /* is_visible */)
+
#if defined(OS_LINUX) || defined(OS_MACOSX)
// See previous definition of this message for explanation of why it is
// defined twice.
diff --git a/chrome/test/automation/browser_proxy.cc b/chrome/test/automation/browser_proxy.cc
index fcbd4af..7da15e2 100644
--- a/chrome/test/automation/browser_proxy.cc
+++ b/chrome/test/automation/browser_proxy.cc
@@ -457,3 +457,23 @@ scoped_refptr<AutocompleteEditProxy> BrowserProxy::GetAutocompleteEdit() {
result.swap(&p);
return result;
}
+
+bool BrowserProxy::IsFullscreen(bool* is_fullscreen) {
+ DCHECK(is_fullscreen);
+
+ if (!is_valid())
+ return false;
+
+ return sender_->Send(new AutomationMsg_IsFullscreen(0, handle_,
+ is_fullscreen));
+}
+
+bool BrowserProxy::IsFullscreenBubbleVisible(bool* is_visible) {
+ DCHECK(is_visible);
+
+ if (!is_valid())
+ return false;
+
+ return sender_->Send(new AutomationMsg_IsFullscreenBubbleVisible(0, handle_,
+ is_visible));
+}
diff --git a/chrome/test/automation/browser_proxy.h b/chrome/test/automation/browser_proxy.h
index f3641e3..88a1d58 100644
--- a/chrome/test/automation/browser_proxy.h
+++ b/chrome/test/automation/browser_proxy.h
@@ -204,6 +204,13 @@ class BrowserProxy : public AutomationResourceProxy {
// mahine).
bool TerminateSession();
+ // Sets |is_fullscreen| to whether the browser is currently in fullscreen
+ // mode.
+ bool IsFullscreen(bool* is_fullscreen);
+
+ // Sets |is_visible| to whether the browser's fullscreen bubble is visible.
+ bool IsFullscreenBubbleVisible(bool* is_visible);
+
protected:
virtual ~BrowserProxy() {}
private:
diff --git a/chrome/test/test_browser_window.h b/chrome/test/test_browser_window.h
index 22e36c1..e4cb589 100644
--- a/chrome/test/test_browser_window.h
+++ b/chrome/test/test_browser_window.h
@@ -39,6 +39,7 @@ class TestBrowserWindow : public BrowserWindow {
virtual bool IsMaximized() const { return false; }
virtual void SetFullscreen(bool fullscreen) {}
virtual bool IsFullscreen() const { return false; }
+ virtual bool IsFullscreenBubbleVisible() const { return false; }
virtual LocationBar* GetLocationBar() const {
return const_cast<TestLocationBar*>(&location_bar_);
}