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

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

Issue 1295213003: Make cvox2 output feedback more robust when focusing a text field. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@plundblad_fix
Patch Set: Created 5 years, 4 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 7e7f4806bff9443e9fbe559fbf7a0186b70274d4..a25c02fcf72490e8c24cdcdff6944f0b2e5a269d 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs
@@ -23,6 +23,7 @@ BackgroundTest.prototype = {
setUp: function() {
this.mockTts = new MockTts();
cvox.ChromeVox.tts = this.mockTts;
+ global.backgroundObj.forceChromeVoxNextActive();
Peter Lundblad 2015/08/20 08:30:06 ChromeVoxE2ETest.runWithTab already adds chromevox
David Tseng 2015/08/20 17:52:47 That logic depends on a load complete event to be
},
/**
@@ -242,3 +243,30 @@ TEST_F('BackgroundTest', 'AriaLabel', function() {
rootNode.focus();
}.bind(this));
});
+
+TEST_F('BackgroundTest', 'FocusInputElement', function() {
+ this.runWithLoadedTree(
+ function() {/*!
+ <input id="name" value="Lancelot">
+ <input id="quest" value="Grail">
+ <input id="color" value="Blue">
+ */},
+ function(rootNode) {
+ cvox.ChromeVox.tts.expectSpeech('Grail');
+ cvox.ChromeVox.tts.expectSpeech('Edit text');
+
+ cvox.ChromeVox.tts.expectSpeech('Blue');
+ cvox.ChromeVox.tts.expectSpeech('Edit text');
+
+ var quest = rootNode.find({ attributes: { value: 'Grail' } });
+ quest.focus();
+
+ window.setTimeout(this.newCallback(function() {
+ var color = rootNode.find({ attributes: { value: 'Blue' } });
+ color.focus();
+
+ cvox.ChromeVox.tts.finishExpectations(this.newCallback());
+ }), 100);
David Tseng 2015/08/19 17:19:25 Can you do this without a timeout (e.g. by adding
Peter Lundblad 2015/08/20 08:30:06 I bet this will flake on some memmory bot. We shou
David Tseng 2015/08/20 17:52:47 See my suggestion above (about focus event handler
+
+ }.bind(this));
Peter Lundblad 2015/08/20 08:30:06 Superflous bind.
+});

Powered by Google App Engine
This is Rietveld 408576698