OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 import logging | 6 import logging |
7 import os | 7 import os |
8 import re | 8 import re |
9 import shutil | 9 import shutil |
10 import time | 10 import time |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 tab2 = 'f1-4' | 473 tab2 = 'f1-4' |
474 self.NavigateToURL(url1) | 474 self.NavigateToURL(url1) |
475 self.RunCommand(pyauto.IDC_NEW_TAB) # Open new tab. | 475 self.RunCommand(pyauto.IDC_NEW_TAB) # Open new tab. |
476 self.NavigateToURL(url2, 0, 1) | 476 self.NavigateToURL(url2, 0, 1) |
477 self._driver.switch_to_window(tab2) | 477 self._driver.switch_to_window(tab2) |
478 self._EnableMouseLockMode() # Lock mouse in tab 2. | 478 self._EnableMouseLockMode() # Lock mouse in tab 2. |
479 raw_input('Manually move the mouse cursor on the page in tab 2. Shift+Tab \ | 479 raw_input('Manually move the mouse cursor on the page in tab 2. Shift+Tab \ |
480 into tab 1, click on lockMouse1() button, and move the mouse \ | 480 into tab 1, click on lockMouse1() button, and move the mouse \ |
481 cursor on the page in tab 1. Verify mouse movement is smooth.') | 481 cursor on the page in tab 1. Verify mouse movement is smooth.') |
482 | 482 |
| 483 def MouseEventsIndependentOfExitBubble(self): |
| 484 """Verify mouse events are independent of the exit FS exit bubble for ML. |
| 485 |
| 486 Mouse movement events should work immediately when mouse lock is activated. |
| 487 The events should not be blocked waiting for the exit instruction bubble to |
| 488 clear. |
| 489 """ |
| 490 self.NavigateToURL(self.GetHttpURLForDataPath( |
| 491 'fullscreen_mouselock', 'fullscreen_mouselock.html')) |
| 492 # Should not be in fullscreen mode during initial launch. |
| 493 self.assertFalse(self.IsFullscreenForBrowser()) |
| 494 self.assertFalse(self.IsFullscreenForTab()) |
| 495 # Go into fullscreen mode. |
| 496 self._driver.find_element_by_id('enterFullscreen').click() |
| 497 self.assertTrue(self.WaitUntil(self.IsFullscreenForTab)) |
| 498 self._EnableMouseLockMode() |
| 499 raw_input( |
| 500 '1. Move the mouse, see movement data being received by the page.\ |
| 501 2. Press ESC key.\ |
| 502 3. Lock the mouse without going fullscreen. Click lockMouse1() button.\ |
| 503 Verify: The mouse movement events should work immediately.') |
483 | 504 |
484 if __name__ == '__main__': | 505 if __name__ == '__main__': |
485 pyauto_functional.Main() | 506 pyauto_functional.Main() |
OLD | NEW |