Better handling of some qt and gtk applications. Used Audacious for testing.
This commit is contained in:
1 parent
300f4a7504
commit
bbe931335f
15 files changed
+507
-16
No files matched your search
@@ -173,6 +173,35 @@ func TestNativeQtControlStates(t *testing.T) {
|
||||
}
|
||||
keys("Escape")
|
||||
}
|
||||
// Qt can report only SHOWING=false for a closing submenu, even though
|
||||
// its parent action regains FOCUSED state. Restore that actual parent.
|
||||
for _, closeKey := range []string{"Left", "Escape"} {
|
||||
keys("F7")
|
||||
waitEvent("Ordinary action", atspi.FocusedStateEvent, false)
|
||||
waitSpeech("Ordinary action, menu item")
|
||||
keys("Down")
|
||||
waitEvent("Nested actions", atspi.FocusedStateEvent, false)
|
||||
waitSpeech("Nested actions, menu item")
|
||||
keys("Right")
|
||||
waitEvent("Nested command", atspi.FocusedStateEvent, false)
|
||||
waitSpeech("Nested command, menu item")
|
||||
keys(closeKey)
|
||||
// The normalized event preserves its native showing-event origin.
|
||||
for {
|
||||
select {
|
||||
case event := <-observed:
|
||||
if event.Source.Name == "Nested actions" && isFocusGainEvent(event) {
|
||||
goto returned
|
||||
}
|
||||
case <-ctx.Done():
|
||||
t.Fatal("missing focus return from submenu")
|
||||
}
|
||||
}
|
||||
returned:
|
||||
waitSpeech("Nested actions, menu item")
|
||||
waitBraille("Nested actions")
|
||||
keys("Escape")
|
||||
}
|
||||
if version == "6" {
|
||||
// When the provider exports CHECKABLE, withdrawing that capability is
|
||||
// authoritative and must retire the prior evidence.
|
||||
|
||||
Reference in new issue
Block a user