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

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

Issue 2121413002: Support selection and copying over non-editable content in ChromeVox Next. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test. Created 4 years, 5 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 847f58a2b3e0656ddd6153665193ac649cae7e02..d9951204d1cd3b2ee7aebac32a69dc62b51ac012 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs
@@ -967,3 +967,28 @@ TEST_F('BackgroundTest', 'ContentEditableJumpSyncsRange', function() {
.replay();
});
});
+
+TEST_F('BackgroundTest', 'Selection', function() {
+ var mockFeedback = this.createMockFeedback();
+ this.runWithLoadedTree(function(root) {/*!
+ <p>simple</p>
+ <p>doc</p>
+ */}, function(root) {
+ // Fakes a toggleSelection command.
+ root.addEventListener('textSelectionChanged', function() {
+ if (root.focusOffset == 3)
+ ChromeVoxState.instance.onGotCommand('toggleSelection');
+ }, true);
+
+ mockFeedback.call(doCmd('toggleSelection'))
+ .expectSpeech('simple', 'selected')
+ .call(doCmd('nextCharacter'))
+ .expectSpeech('i', 'selected')
+ .call(doCmd('previousCharacter'))
+ .expectSpeech('i', 'unselected')
+ .call(doCmd('nextCharacter'))
+ .call(doCmd('nextCharacter'))
+ .expectSpeech('End selection', 'sim')
+ .replay();
+ });
+});

Powered by Google App Engine
This is Rietveld 408576698