Changed how speech interruptions are handled hopefully improved things being interrupted when they shouldn't be.

This commit is contained in:
Storm Dragon
2026-05-19 15:26:44 -04:00
parent a84aec94a9
commit 009938c495
9 changed files with 130 additions and 25 deletions
+5 -5
View File
@@ -182,7 +182,7 @@ class WebPresentationModeSpeechRegressionTests(unittest.TestCase):
):
web_script.Script.togglePresentationMode(testScript, None, "document")
testScript.presentMessage.assert_called_once_with(messages.MODE_BROWSE, interrupt=False)
testScript.presentMessage.assert_called_once_with(messages.MODE_BROWSE)
soundManager.playBrowseModeSound.assert_called_once_with()
self.assertFalse(testScript._inFocusMode)
self.assertFalse(testScript._focusModeIsSticky)
@@ -200,7 +200,7 @@ class WebPresentationModeSpeechRegressionTests(unittest.TestCase):
):
web_script.Script.togglePresentationMode(testScript, None, "document")
testScript.presentMessage.assert_called_once_with(messages.MODE_FOCUS, interrupt=False)
testScript.presentMessage.assert_called_once_with(messages.MODE_FOCUS)
soundManager.playFocusModeSound.assert_called_once_with()
self.assertTrue(testScript._inFocusMode)
self.assertFalse(testScript._focusModeIsSticky)
@@ -311,7 +311,7 @@ class WebDescriptionChangeRegressionTests(unittest.TestCase):
result = web_script.Script.onDescriptionChanged(testScript, event)
self.assertTrue(result)
testScript.presentMessage.assert_called_once_with("Helpful tooltip", interrupt=False)
testScript.presentMessage.assert_called_once_with("Helpful tooltip")
if __name__ == "__main__":
@@ -378,7 +378,7 @@ class WebSelectionRegressionTests(unittest.TestCase):
testScript.utilities.setCaretContext.assert_called_once_with(section, 1, document)
setLocusOfFocus.assert_called_once_with(event, section, False, True)
testScript.speakContents.assert_called_once_with([[section, 0, 1, "D"]])
testScript.speakMessage.assert_called_once_with(messages.TEXT_SELECTED, interrupt=False)
testScript.speakMessage.assert_called_once_with(messages.TEXT_SELECTED)
self.assertEqual(
testScript.pointOfReference["syntheticWebSelection"]["string"],
"D",
@@ -414,7 +414,7 @@ class WebSelectionRegressionTests(unittest.TestCase):
testScript.utilities.setCaretContext.assert_called_once_with(link, 0, document)
setLocusOfFocus.assert_called_once_with(event, link, False, True)
testScript.speakContents.assert_called_once_with([[link, 0, 1, "S"]])
testScript.speakMessage.assert_called_once_with(messages.TEXT_SELECTED, interrupt=False)
testScript.speakMessage.assert_called_once_with(messages.TEXT_SELECTED)
self.assertEqual(
testScript.pointOfReference["syntheticWebSelection"]["string"],
"S",