diff options
author | scheib@chromium.org <scheib@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-11 17:22:02 +0000 |
---|---|---|
committer | scheib@chromium.org <scheib@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-11 17:22:02 +0000 |
commit | 91ade04e1a71b8f62b43c320b35fd970bf61394d (patch) | |
tree | c509db094c06799a4afbedb90c8275a135b84487 /chrome/test/pyautolib/pyauto.py | |
parent | f08b1a22c7f4e7383d7ffdd9db99776234e38fe7 (diff) | |
download | chromium_src-91ade04e1a71b8f62b43c320b35fd970bf61394d.zip chromium_src-91ade04e1a71b8f62b43c320b35fd970bf61394d.tar.gz chromium_src-91ade04e1a71b8f62b43c320b35fd970bf61394d.tar.bz2 |
Expose Mouse Lock and Fullscreen automation hooks to pyauto.
BUG=122479
Review URL: https://chromiumcodereview.appspot.com/10022010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131787 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/pyautolib/pyauto.py')
-rwxr-xr-x | chrome/test/pyautolib/pyauto.py | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/chrome/test/pyautolib/pyauto.py b/chrome/test/pyautolib/pyauto.py index ff75232..54b05ff 100755 --- a/chrome/test/pyautolib/pyauto.py +++ b/chrome/test/pyautolib/pyauto.py @@ -3648,6 +3648,65 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase): } return self._GetResultFromJSONRequest(cmd_dict, windex=windex) + def IsFullscreenForBrowser(self, windex=0): + """Returns true if the window is currently fullscreen and was initially + transitioned to fullscreen by a browser (vs tab) mode transition.""" + return self._GetResultFromJSONRequest( + { 'command': 'IsFullscreenForBrowser' }, + windex=windex).get('result') + + def IsFullscreenForTab(self, windex=0): + """Returns true if fullscreen has been caused by a tab.""" + return self._GetResultFromJSONRequest( + { 'command': 'IsFullscreenForTab' }, + windex=windex).get('result') + + def IsMouseLocked(self, windex=0): + """Returns true if the mouse is currently locked.""" + return self._GetResultFromJSONRequest( + { 'command': 'IsMouseLocked' }, + windex=windex).get('result') + + def IsMouseLockPermissionRequested(self, windex=0): + """Returns true if the user is currently prompted to give permision for + mouse lock.""" + return self._GetResultFromJSONRequest( + { 'command': 'IsMouseLockPermissionRequested' }, + windex=windex).get('result') + + def IsFullscreenPermissionRequested(self, windex=0): + """Returns true if the user is currently prompted to give permision for + fullscreen.""" + return self._GetResultFromJSONRequest( + { 'command': 'IsFullscreenPermissionRequested' }, + windex=windex).get('result') + + def IsFullscreenBubbleDisplayed(self, windex=0): + """Returns true if the fullscreen and mouse lock bubble is currently + displayed.""" + return self._GetResultFromJSONRequest( + { 'command': 'IsFullscreenBubbleDisplayed' }, + windex=windex).get('result') + + def IsFullscreenBubbleDisplayingButtons(self, windex=0): + """Returns true if the fullscreen and mouse lock bubble is currently + displayed and presenting buttons.""" + return self._GetResultFromJSONRequest( + { 'command': 'IsFullscreenBubbleDisplayingButtons' }, + windex=windex).get('result') + + def AcceptCurrentFullscreenOrMouseLockRequest(self, windex=0): + """Activate the accept button on the fullscreen and mouse lock bubble.""" + return self._GetResultFromJSONRequest( + { 'command': 'AcceptCurrentFullscreenOrMouseLockRequest' }, + windex=windex) + + def DenyCurrentFullscreenOrMouseLockRequest(self, windex=0): + """Activate the deny button on the fullscreen and mouse lock bubble.""" + return self._GetResultFromJSONRequest( + { 'command': 'DenyCurrentFullscreenOrMouseLockRequest' }, + windex=windex) + def KillRendererProcess(self, pid): """Kills the given renderer process. |