diff options
| author | Ćukasz 'sil2100' Zemczak <lukasz.zemczak@canonical.com> | 2012-10-30 15:54:17 +0000 |
|---|---|---|
| committer | Tarmac <> | 2012-10-30 15:54:17 +0000 |
| commit | aedb6eefbc541352a6dda3e5cbc1cf36580269c8 (patch) | |
| tree | f78bcdb104b20ac2c06a6145e03269f3bd92a49c /tests | |
| parent | e5922c022765e1e596e3c9de4e53c993bea6d4d5 (diff) | |
| parent | e6f262957870741d0b4e24b2710ba5866e619046 (diff) | |
A workaround fix for Alt+TAB picking up wrong window when used on a application group. The check for Quirk::ACTIVE is not valid right now due to the fact we're making the switcher window active prior to display (this is done this way to fix some other bugs). So a workaround is to save the last active window prior to this action and use this during the checks. It fixes a very annoying bug.. Fixes: https://bugs.launchpad.net/bugs/1071298. Approved by Andrea Azzarone, Thomi Richards.
(bzr r2870)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/autopilot/unity/tests/test_switcher.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/autopilot/unity/tests/test_switcher.py b/tests/autopilot/unity/tests/test_switcher.py index 345b6ef5c..7a94b7511 100644 --- a/tests/autopilot/unity/tests/test_switcher.py +++ b/tests/autopilot/unity/tests/test_switcher.py @@ -246,6 +246,31 @@ class SwitcherWindowsManagementTests(SwitcherTestCase): self.assertProperty(calc_win, is_focused=True) self.assertVisibleWindowStack([calc_win, char_win1]) + def test_switcher_rises_next_window_of_same_application(self): + """Tests if alt+tab invoked normally switches to the next application + window of the same type. + + """ + char_win1, char_win2 = self.start_applications("Character Map", "Character Map") + self.assertVisibleWindowStack([char_win2, char_win1]) + + self.keybinding("switcher/reveal_normal") + self.assertProperty(char_win1, is_focused=True) + + def test_switcher_rises_other_application(self): + """Tests if alt+tab invoked normally switches correctly to the other + application window when the last focused application had 2 windows + + """ + char_win1, char_win2, calc_win = self.start_applications("Character Map", "Character Map", "Calculator") + self.assertVisibleWindowStack([calc_win, char_win2, char_win1]) + + self.keybinding("switcher/reveal_normal") + self.assertProperty(char_win2, is_focused=True) + + self.keybinding("switcher/reveal_normal") + self.assertProperty(calc_win, is_focused=True) + class SwitcherDetailsTests(SwitcherTestCase): """Test the details mode for the switcher.""" |
