Commit 08c24f84 authored by David Tseng's avatar David Tseng Committed by Commit Bot

Correct Cursor.deepEquivalent

This getter returns an instance of Cursor, but it should return an instance of
either Cursor or WrappingCursor.

R=akihiroota@chromium.org

of a page that has a text field at the end.

Bug: none
Change-Id: Id52523c4b391d175303130c3f5494a1bf63c2f13
AX-Relnotes: ChromeVox will now wrap correctly when moving forward from the end
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2450209Reviewed-by: default avatarAkihiro Ota <akihiroota@chromium.org>
Commit-Queue: David Tseng <dtseng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#813915}
parent feafb439
......@@ -3105,3 +3105,18 @@ TEST_F('ChromeVoxBackgroundTest', 'VolumeChanges', function() {
.replay();
});
});
TEST_F('ChromeVoxBackgroundTest', 'WrapTextFieldAtEndOfDoc', function() {
const mockFeedback = this.createMockFeedback();
const site = `<p>start</p><div role="textbox" contenteditable></div>`;
this.runWithLoadedTree(site, function() {
mockFeedback.call(doCmd('nextObject'))
.expectSpeech('Edit text')
.call(doCmd('nextObject'))
.expectEarcon(Earcon.WRAP)
.expectSpeech('Web Content')
.call(doCmd('nextObject'))
.expectSpeech('start')
.replay();
});
});
......@@ -564,7 +564,7 @@ cursors.Cursor = class {
newIndex = cursors.NODE_INDEX;
}
return new cursors.Cursor(newNode, newIndex);
return new this.constructor(newNode, newIndex);
}
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment