Index: chrome/test/functional/fullscreen_mouselock.py |
diff --git a/chrome/test/functional/fullscreen_mouselock.py b/chrome/test/functional/fullscreen_mouselock.py |
index beb6a4933dce9337ce62197959338429593f85dd..08ad9da0dbdd9681162296b3183bd7c14c8ea4e4 100755 |
--- a/chrome/test/functional/fullscreen_mouselock.py |
+++ b/chrome/test/functional/fullscreen_mouselock.py |
@@ -143,6 +143,14 @@ class FullscreenMouselockTest(pyauto.PyUITest): |
self.assertTrue(self.WaitUntil(lambda: not self.IsFullscreenForTab())) |
self.assertTrue(self.WaitUntil(lambda: not self.IsMouseLocked())) |
+ def _InitiateTabFullscreen(self): |
+ """Helper function that initiates tab fullscreen.""" |
+ self.NavigateToURL(self.GetHttpURLForDataPath( |
+ 'fullscreen_mouselock', 'fullscreen_mouselock.html')) |
+ # Initiate tab fullscreen. |
+ self._driver.find_element_by_id('enterFullscreen').click() |
+ self.assertTrue(self.WaitUntil(lambda: self.IsFullscreenForTab())) |
+ |
def _AcceptFullscreenOrMouseLockRequest(self): |
"""Helper function to accept fullscreen or mouse lock request.""" |
self.AcceptCurrentFullscreenOrMouseLockRequest() |
@@ -375,6 +383,27 @@ class FullscreenMouselockTest(pyauto.PyUITest): |
lambda: not self.IsFullscreenBubbleDisplayingButtons()), |
msg='Mouse lock bubble did not clear when tab lost focus.') |
+ def testTabFSExitUponNavigation(self): |
scheib
2012/06/14 22:51:12
Perhaps clarify that this navigation is "navigatin
dyu1
2012/06/15 01:42:24
Done.
|
+ """Verify tab fullscreen exit when navigating to a new page.""" |
+ self.NavigateToURL(self.GetHttpURLForDataPath('google', 'google.html')) |
+ self._InitiateTabFullscreen() |
+ self._driver.find_element_by_id('goBack').click() |
+ self.assertTrue( |
+ self.WaitUntil(not self.IsFullscreenForTab), |
+ msg='Tab fullscreen did not exist when navigating to a new page.') |
scheib
2012/06/14 22:51:12
s/exist/exit/ -- in more than one place.
dyu1
2012/06/15 01:42:24
Done.
|
+ |
+ def testTabFSDontExitForAnchorLinks(self): |
scheib
2012/06/14 22:51:12
s/Dont/DoesNot/
dyu1
2012/06/15 01:42:24
Done.
|
+ """Verify tab fullscreen does not exist for anchor links. |
+ |
+ Tab fullscreen should not exist when following a link to the same page such |
+ as example.html#anchor. |
+ """ |
+ self._InitiateTabFullscreen() |
+ self._driver.find_element_by_id('anchor').click() |
+ self.assertTrue( |
+ self.WaitUntil(self.IsFullscreenForTab), |
+ msg='Tab fullscreen should not exit when clicking on an anchor link.') |
+ |
def ExitTabFSToBrowserFS(self): |
"""Verify exiting tab fullscreen leaves browser in browser fullscreen. |