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

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

Issue 1318683002: Make cvox2 feedback more robust when focusing a text field. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mock_feedback
Patch Set: EditableTextBase expects start < end Created 5 years, 3 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/background_test.extjs
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs
index 2932d2a8f73f60881a18b09f6dc733097f7ebadf..82810f95a0d6354b845c04ee2469497e09c6c62e 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs
@@ -20,6 +20,11 @@ function BackgroundTest() {
BackgroundTest.prototype = {
__proto__: ChromeVoxNextE2ETest.prototype,
+ /** @override */
+ setUp: function() {
+ global.backgroundObj.forceChromeVoxNextActive();
+ },
+
/**
* @return {!MockFeedback}
*/
@@ -339,3 +344,27 @@ TEST_F('BackgroundTest', 'BrailleRouting', function() {
mockFeedback.replay();
});
});
+
+TEST_F('BackgroundTest', 'FocusInputElement', function() {
+ var mockFeedback = this.createMockFeedback();
+ this.runWithLoadedTree(
+ function() {/*!
+ <input id="name" value="Lancelot">
+ <input id="quest" value="Grail">
+ <input id="color" value="Blue">
+ */},
+ function(rootNode) {
+ var name = rootNode.find({ attributes: { value: 'Lancelot' } });
+ var quest = rootNode.find({ attributes: { value: 'Grail' } });
+ var color = rootNode.find({ attributes: { value: 'Blue' } });
+
+ mockFeedback.call(quest.focus.bind(quest))
+ .expectSpeech('Grail', 'Edit text')
+ .call(color.focus.bind(color))
+ .expectSpeech('Blue', 'Edit text')
+ .call(name.focus.bind(name))
+ .expectNextSpeechUtteranceIsNot('Blue')
+ .expectSpeech('Lancelot', 'Edit text');
+ mockFeedback.replay();
+ }.bind(this));
+});

Powered by Google App Engine
This is Rietveld 408576698