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(); |
+ }); |
+}); |