Touch up our phonetic settings.
This commit is contained in:
1 parent
08cbcc00cb
commit
ffcea2efea
34 files changed
+467
-14
No files matched your search
@@ -864,7 +864,12 @@ def inside():
|
||||
assert clipboardCell.name == "unchecked" and not clipboardCell.getState().contains(pyatspi.STATE_CHECKED)
|
||||
focus(clipboardCell); key("space")
|
||||
wait_for(lambda: clipboardCell.name == "checked", "clipboard preference did not toggle")
|
||||
for label, expected in (("Announce lists in Say All", "checked"),
|
||||
hintRow = next(row for row in range(readingTable.nRows)
|
||||
if readingTable.getAccessibleAt(row, 1).name == "Phonetic character hints")
|
||||
hintCell = readingTable.getAccessibleAt(hintRow, 0)
|
||||
assert hintCell.name == "unchecked" and not hintCell.getState().contains(pyatspi.STATE_CHECKED)
|
||||
for label, expected in (("Phonetic character hints", "checked"),
|
||||
("Announce lists in Say All", "checked"),
|
||||
("Present tooltips", "checked"),
|
||||
("Speak object under mouse", "checked")):
|
||||
row = next(row for row in range(readingTable.nRows)
|
||||
@@ -898,6 +903,7 @@ def inside():
|
||||
assert applied["Values"]["Reading"]["OnlySpeakDisplayedText"] != wasChecked, applied
|
||||
assert not applied["Values"]["Reading"]["AutomaticallyReadTitleChanges"], applied
|
||||
assert applied["Values"]["Reading"]["AutomaticallyReadClipboardChanges"], applied
|
||||
assert applied["Values"]["Reading"]["PhoneticCharacterHints"], applied
|
||||
assert applied["Values"]["Reading"]["SayAllContextList"], applied
|
||||
assert applied["Values"]["Reading"]["PresentTooltips"], applied
|
||||
assert applied["Values"]["Reading"]["EnableMouseReview"], applied
|
||||
@@ -906,6 +912,7 @@ def inside():
|
||||
assert readingTable.getAccessibleAt(0, 0).name == ("unchecked" if wasChecked else "checked")
|
||||
assert readingTable.getAccessibleAt(titleRow, 0).name == "unchecked"
|
||||
assert readingTable.getAccessibleAt(clipboardRow, 0).name == "checked"
|
||||
assert readingTable.getAccessibleAt(hintRow, 0).name == "checked"
|
||||
assert readingTable.getAccessibleAt(next(row for row in range(readingTable.nRows)
|
||||
if readingTable.getAccessibleAt(row, 1).name == "Announce lists in Say All"), 0).name == "checked"
|
||||
assert readingTable.getAccessibleAt(next(row for row in range(readingTable.nRows)
|
||||
|
||||
@@ -564,6 +564,22 @@ def run_inside(directory):
|
||||
flush_probe_events()
|
||||
assert events.read_text().count(', ' + desktop_key + ')') == before_key, \
|
||||
'desktop review key leaked: ' + desktop_key
|
||||
for reviewKey, expectedCommands in (
|
||||
('KP_Down', ('review-current-character', 'review-phonetic-character')),
|
||||
('KP_Begin', ('review-current-word', 'review-spell-word', 'review-phonetic-word')),
|
||||
('KP_Up', ('review-current-line', 'review-spell-line', 'review-phonetic-line'))):
|
||||
beforeKey = events.read_text().count(', ' + reviewKey + ')')
|
||||
beforeCommands = {command: count_records(log, '"message":"flat review command received"',
|
||||
'"command":"' + command + '"')
|
||||
for command in expectedCommands}
|
||||
subprocess.run(['xdotool', 'key', '--delay', '80'] + [reviewKey] * len(expectedCommands), check=True)
|
||||
for expectedCommand in expectedCommands:
|
||||
wait_for(lambda command=expectedCommand: count_records(log, '"message":"flat review command received"',
|
||||
'"command":"' + command + '"') == beforeCommands[command] + 1,
|
||||
'review multipress missing: ' + expectedCommand)
|
||||
flush_probe_events()
|
||||
assert events.read_text().count(', ' + reviewKey + ')') == beforeKey, 'multipress review key leaked'
|
||||
print('PASS: double character and triple word/line review commands with no application leakage')
|
||||
for desktop_key, command in [('KP_Home', 'review-window-start'), ('KP_Page_Up', 'review-window-end')]:
|
||||
before_key = events.read_text().count(', ' + desktop_key + ')')
|
||||
for modifier_first in (False, True):
|
||||
@@ -652,6 +668,7 @@ def run_inside(directory):
|
||||
expected_command = command
|
||||
if modifier_first:
|
||||
expected_command = {
|
||||
'review-current-line': 'review-spell-line',
|
||||
'review-current-word': 'review-spell-word',
|
||||
'review-current-character': 'review-phonetic-character',
|
||||
}.get(command, command)
|
||||
|
||||
Reference in new issue
Block a user