Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(344)

Unified Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/live_regions_test.extjs

Issue 1716663002: Add a treeChange type to Automation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl set_commit Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/live_regions_test.extjs
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/live_regions_test.extjs b/chrome/browser/resources/chromeos/chromevox/cvox2/background/live_regions_test.extjs
index d20fb45dc3d5903474985fd51ee63f99690194a6..d4f6a51b8c625abe18a82a875bebd7334ffeacd0 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/live_regions_test.extjs
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/live_regions_test.extjs
@@ -221,3 +221,32 @@ TEST_F('LiveRegionsTest', 'LiveRegionCategoryFlush', function() {
mockFeedback.replay();
});
});
+
+TEST_F('LiveRegionsTest', 'SilentOnNodeChange', function() {
+ var mockFeedback = this.createMockFeedback();
+ this.runWithLoadedTree(function() {/*!
+ <p>start</p>
+ <button>first</button>
+ <div role="button" id="live" aria-live="polite">
+ hello!
+ </div>
+ <script>
+ var live = document.getElementById('live');
+ var pressed = true;
+ setInterval(function() {
+ live.setAttribute('aria-pressed', pressed);
+ pressed = !pressed;
+ }, 50);
+ </script>
+ */},
+ function(root) {
+ var focusAfterNodeChange = window.setTimeout.bind(window, function() {
+ root.firstChild.nextSibling.focus();
+ }, 1000);
+ mockFeedback.call(focusAfterNodeChange)
+ .expectSpeech('hello!')
+ .expectNextSpeechUtteranceIsNot('hello!')
+ .expectNextSpeechUtteranceIsNot('hello!') ;
+ mockFeedback.replay();
+ });
+});

Powered by Google App Engine
This is Rietveld 408576698