From e83713478e414da7411b55849a3a2a2d64f04921 Mon Sep 17 00:00:00 2001 From: "scheib@chromium.org" Date: Wed, 28 Mar 2012 18:30:35 +0000 Subject: Automated tests for full screen & mouse lock M16 features Tests added to browsertest to improve coverage for fullscreen and mouse lock transitions. Several helper functions added to BrowserTest. Removes need to friend many tests and simplifies tests to increases readability. IsFullscreenForTab() removed globally leaving only IsFullscreenForTabOrPending. IsFullscreenForBrowser() added to fullscreen controller to enable testing. typedef BrowserWithTestWindowTest BrowserTest; removed due to name conflict. BUG=100678 TEST= Review URL: http://codereview.chromium.org/9702055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129448 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/ui/fullscreen_controller.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'chrome/browser/ui/fullscreen_controller.h') diff --git a/chrome/browser/ui/fullscreen_controller.h b/chrome/browser/ui/fullscreen_controller.h index e3bc446..9284c19 100644 --- a/chrome/browser/ui/fullscreen_controller.h +++ b/chrome/browser/ui/fullscreen_controller.h @@ -40,10 +40,21 @@ class FullscreenController : public base::RefCounted { virtual ~FullscreenController(); // Querying. - bool IsFullscreenForTab() const; - bool IsFullscreenForTab(const content::WebContents* tab) const; + + // Returns true if the window is currently fullscreen and was initially + // transitioned to fullscreen by a browser (vs tab) mode transition. + bool IsFullscreenForBrowser() const; + + // Returns true if fullscreen has been caused by a tab. + // The window may still be transitioning, and window_->IsFullscreen() + // may still return false. + bool IsFullscreenForTabOrPending() const; bool IsFullscreenForTabOrPending(const content::WebContents* tab) const; + // Returns true if the mouse has been locked or a lock request is pending + // user confirmation. + bool IsMouseLockedOrPending() const; + // Requests. void RequestToLockMouse(content::WebContents* tab); void ToggleFullscreenModeForTab(content::WebContents* tab, -- cgit v1.1