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

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

Issue 1876243002: Exhaustive selection test. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors_test.extjs
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors_test.extjs b/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors_test.extjs
index db1e3106833bcf20e9f7e1b407fb8bbaeff30b07..3048084660bfd4ee290b8be9a215e4731f472c33 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors_test.extjs
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors_test.extjs
@@ -375,3 +375,44 @@ TEST_F('CursorsTest', 'MultiLineOffsetSelection', function() {
assertEquals(6, secondLineCursor.selectionIndex_);
});
});
+
+TEST_F('CursorsTest', 'ExhaustSelection', function() {
+ this.runWithLoadedTree(function() {/*!
+ <p style="max-width: 100px">
+ A new version of the ChromeVox screen
+ reader on Chrome OS, currently known as “ChromeVox Next,” is
+ available for beta testing.
+ </p>
+ */},
+ function(root) {
+ var node = root.firstChild.firstChild;
+ var range = new cursors.Range(
+ new cursors.Cursor(node, 0),
+ new cursors.Cursor(node, node.name.length));
+ var length = range.end.selectionIndex_;
+ var rev = function(start, end) {
+ if (start == end && end == (length - 1))
+ return;
+
+ if (start == length - 1) {
+ start = 0;
+ end++;
+ }else {
+ start++;
+ }
+
+ this.listenOnce(root, 'textSelectionChanged', function() {
+ console.log('Received selection: '+root.anchorOffset + ' ' + root.focusOffset);
+ rev(start, end);
+ }, true);
+
+ range.start.index_ = start;
+ range.end.index_ = end;
+
+ console.log('Waiting for textSelectionChanged on: ' + start + ' ' + end);
+ range.select();
+ }.bind(this);
+
+ rev(-1, 0);
+ });
+});
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698