Commit f145135d authored by Anastasia Helfinstein's avatar Anastasia Helfinstein Committed by Commit Bot

[Switch Access] Make TextNavigationManager a singleton

This is the first step in incorporating Sophie and Rose's code from last
summer into the new navigation paradigm.

Bug: 982004
Change-Id: I247fa82ec58560505c64f92993108ec7b5687d74
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2076000Reviewed-by: default avatarAkihiro Ota <akihiroota@chromium.org>
Commit-Queue: Anastasia Helfinstein <anastasi@google.com>
Cr-Commit-Position: refs/heads/master@{#745600}
parent 4b6df1eb
...@@ -25,12 +25,6 @@ class MenuManager { ...@@ -25,12 +25,6 @@ class MenuManager {
*/ */
this.navigationManager_ = navigationManager; this.navigationManager_ = navigationManager;
/**
* The text navigation manager.
* @private {!TextNavigationManager}
*/
this.textNavigationManager_ = new TextNavigationManager();
/** /**
* The root node of the screen. * The root node of the screen.
* @private {!chrome.automation.AutomationNode} * @private {!chrome.automation.AutomationNode}
...@@ -503,8 +497,7 @@ class MenuManager { ...@@ -503,8 +497,7 @@ class MenuManager {
const newSelectionState = this.nodeHasSelection_(); const newSelectionState = this.nodeHasSelection_();
if (this.selectionExists_ != newSelectionState) { if (this.selectionExists_ != newSelectionState) {
this.selectionExists_ = newSelectionState; this.selectionExists_ = newSelectionState;
if (this.menuOriginNode_ && if (this.menuOriginNode_ && !TextNavigationManager.currentlySelecting()) {
!this.textNavigationManager_.currentlySelecting()) {
const currentMenuId = this.menuPanel_.currentMenuId(); const currentMenuId = this.menuPanel_.currentMenuId();
if (currentMenuId) { if (currentMenuId) {
this.openMenu_(this.menuOriginNode_, currentMenuId); this.openMenu_(this.menuOriginNode_, currentMenuId);
...@@ -535,7 +528,7 @@ class MenuManager { ...@@ -535,7 +528,7 @@ class MenuManager {
autoNode.state[StateType.FOCUSED]) { autoNode.state[StateType.FOCUSED]) {
actions.push(SAConstants.MenuAction.MOVE_CURSOR); actions.push(SAConstants.MenuAction.MOVE_CURSOR);
actions.push(SAConstants.MenuAction.SELECT_START); actions.push(SAConstants.MenuAction.SELECT_START);
if (this.textNavigationManager_.currentlySelecting()) { if (TextNavigationManager.currentlySelecting()) {
actions.push(SAConstants.MenuAction.SELECT_END); actions.push(SAConstants.MenuAction.SELECT_END);
} }
if (this.selectionExists_) { if (this.selectionExists_) {
...@@ -591,28 +584,28 @@ class MenuManager { ...@@ -591,28 +584,28 @@ class MenuManager {
} }
return; return;
case SAConstants.MenuAction.JUMP_TO_BEGINNING_OF_TEXT: case SAConstants.MenuAction.JUMP_TO_BEGINNING_OF_TEXT:
this.textNavigationManager_.jumpToBeginning(); TextNavigationManager.jumpToBeginning();
return; return;
case SAConstants.MenuAction.JUMP_TO_END_OF_TEXT: case SAConstants.MenuAction.JUMP_TO_END_OF_TEXT:
this.textNavigationManager_.jumpToEnd(); TextNavigationManager.jumpToEnd();
return; return;
case SAConstants.MenuAction.MOVE_BACKWARD_ONE_CHAR_OF_TEXT: case SAConstants.MenuAction.MOVE_BACKWARD_ONE_CHAR_OF_TEXT:
this.textNavigationManager_.moveBackwardOneChar(); TextNavigationManager.moveBackwardOneChar();
return; return;
case SAConstants.MenuAction.MOVE_BACKWARD_ONE_WORD_OF_TEXT: case SAConstants.MenuAction.MOVE_BACKWARD_ONE_WORD_OF_TEXT:
this.textNavigationManager_.moveBackwardOneWord(); TextNavigationManager.moveBackwardOneWord();
return; return;
case SAConstants.MenuAction.MOVE_DOWN_ONE_LINE_OF_TEXT: case SAConstants.MenuAction.MOVE_DOWN_ONE_LINE_OF_TEXT:
this.textNavigationManager_.moveDownOneLine(); TextNavigationManager.moveDownOneLine();
return; return;
case SAConstants.MenuAction.MOVE_FORWARD_ONE_CHAR_OF_TEXT: case SAConstants.MenuAction.MOVE_FORWARD_ONE_CHAR_OF_TEXT:
this.textNavigationManager_.moveForwardOneChar(); TextNavigationManager.moveForwardOneChar();
return; return;
case SAConstants.MenuAction.MOVE_FORWARD_ONE_WORD_OF_TEXT: case SAConstants.MenuAction.MOVE_FORWARD_ONE_WORD_OF_TEXT:
this.textNavigationManager_.moveForwardOneWord(); TextNavigationManager.moveForwardOneWord();
return; return;
case SAConstants.MenuAction.MOVE_UP_ONE_LINE_OF_TEXT: case SAConstants.MenuAction.MOVE_UP_ONE_LINE_OF_TEXT:
this.textNavigationManager_.moveUpOneLine(); TextNavigationManager.moveUpOneLine();
return; return;
case SAConstants.MenuAction.CUT: case SAConstants.MenuAction.CUT:
EventHelper.simulateKeyPress(EventHelper.KeyCode.X, {ctrl: true}); EventHelper.simulateKeyPress(EventHelper.KeyCode.X, {ctrl: true});
...@@ -624,13 +617,13 @@ class MenuManager { ...@@ -624,13 +617,13 @@ class MenuManager {
EventHelper.simulateKeyPress(EventHelper.KeyCode.V, {ctrl: true}); EventHelper.simulateKeyPress(EventHelper.KeyCode.V, {ctrl: true});
return; return;
case SAConstants.MenuAction.SELECT_START: case SAConstants.MenuAction.SELECT_START:
this.textNavigationManager_.saveSelectStart(); TextNavigationManager.saveSelectStart();
if (this.menuOriginNode_) { if (this.menuOriginNode_) {
this.openMenu_(this.menuOriginNode_, SAConstants.MenuId.MAIN); this.openMenu_(this.menuOriginNode_, SAConstants.MenuId.MAIN);
} }
return; return;
case SAConstants.MenuAction.SELECT_END: case SAConstants.MenuAction.SELECT_END:
this.textNavigationManager_.resetCurrentlySelecting(); TextNavigationManager.resetCurrentlySelecting();
if (this.menuOriginNode_) { if (this.menuOriginNode_) {
this.openMenu_(this.menuOriginNode_, SAConstants.MenuId.MAIN); this.openMenu_(this.menuOriginNode_, SAConstants.MenuId.MAIN);
} }
......
...@@ -19,6 +19,7 @@ class SwitchAccess { ...@@ -19,6 +19,7 @@ class SwitchAccess {
Commands.initialize(); Commands.initialize();
KeyboardRootNode.startWatchingVisibility(); KeyboardRootNode.startWatchingVisibility();
SwitchAccessPreferences.initialize(); SwitchAccessPreferences.initialize();
TextNavigationManager.initialize();
}); });
} }
......
...@@ -2,20 +2,18 @@ ...@@ -2,20 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Constant to indicate selection index is not set.
const NO_SELECT_INDEX = -1;
/** /**
* Class to handle navigating text. Currently, only * Class to handle navigating text. Currently, only
* navigation and selection in editable text fields is supported. * navigation and selection in editable text fields is supported.
*/ */
class TextNavigationManager { class TextNavigationManager {
/** @private */
constructor() { constructor() {
/** @private {number} */ /** @private {number} */
this.selectionStartIndex_ = NO_SELECT_INDEX; this.selectionStartIndex_ = TextNavigationManager.NO_SELECT_INDEX;
/** @private {number} */ /** @private {number} */
this.selectionEndIndex_ = NO_SELECT_INDEX; this.selectionEndIndex_ = TextNavigationManager.NO_SELECT_INDEX;
/** @private {chrome.automation.AutomationNode} */ /** @private {chrome.automation.AutomationNode} */
this.selectionStartObject_; this.selectionStartObject_;
...@@ -30,13 +28,18 @@ class TextNavigationManager { ...@@ -30,13 +28,18 @@ class TextNavigationManager {
this.selectionListener_ = this.onNavChange_.bind(this); this.selectionListener_ = this.onNavChange_.bind(this);
} }
static initialize() {
TextNavigationManager.instance = new TextNavigationManager();
}
/** /**
* Jumps to the beginning of the text field (does nothing * Jumps to the beginning of the text field (does nothing
* if already at the beginning). * if already at the beginning).
*/ */
jumpToBeginning() { static jumpToBeginning() {
if (this.currentlySelecting_) { const manager = TextNavigationManager.instance;
this.setupDynamicSelection_(false /* resetCursor */); if (manager.currentlySelecting_) {
manager.setupDynamicSelection_(false /* resetCursor */);
} }
EventHelper.simulateKeyPress(EventHelper.KeyCode.HOME, {ctrl: true}); EventHelper.simulateKeyPress(EventHelper.KeyCode.HOME, {ctrl: true});
} }
...@@ -45,9 +48,10 @@ class TextNavigationManager { ...@@ -45,9 +48,10 @@ class TextNavigationManager {
* Jumps to the end of the text field (does nothing if * Jumps to the end of the text field (does nothing if
* already at the end). * already at the end).
*/ */
jumpToEnd() { static jumpToEnd() {
if (this.currentlySelecting_) { const manager = TextNavigationManager.instance;
this.setupDynamicSelection_(false /* resetCursor */); if (manager.currentlySelecting_) {
manager.setupDynamicSelection_(false /* resetCursor */);
} }
EventHelper.simulateKeyPress(EventHelper.KeyCode.END, {ctrl: true}); EventHelper.simulateKeyPress(EventHelper.KeyCode.END, {ctrl: true});
} }
...@@ -57,9 +61,10 @@ class TextNavigationManager { ...@@ -57,9 +61,10 @@ class TextNavigationManager {
* if there are no more characters preceding the current * if there are no more characters preceding the current
* location of the caret). * location of the caret).
*/ */
moveBackwardOneChar() { static moveBackwardOneChar() {
if (this.currentlySelecting_) { const manager = TextNavigationManager.instance;
this.setupDynamicSelection_(true /* resetCursor */); if (manager.currentlySelecting_) {
manager.setupDynamicSelection_(true /* resetCursor */);
} }
EventHelper.simulateKeyPress(EventHelper.KeyCode.LEFT_ARROW); EventHelper.simulateKeyPress(EventHelper.KeyCode.LEFT_ARROW);
} }
...@@ -69,9 +74,10 @@ class TextNavigationManager { ...@@ -69,9 +74,10 @@ class TextNavigationManager {
* if there are no more characters following the current * if there are no more characters following the current
* location of the caret). * location of the caret).
*/ */
moveForwardOneChar() { static moveForwardOneChar() {
if (this.currentlySelecting_) { const manager = TextNavigationManager.instance;
this.setupDynamicSelection_(true /* resetCursor */); if (manager.currentlySelecting_) {
manager.setupDynamicSelection_(true /* resetCursor */);
} }
EventHelper.simulateKeyPress(EventHelper.KeyCode.RIGHT_ARROW); EventHelper.simulateKeyPress(EventHelper.KeyCode.RIGHT_ARROW);
} }
...@@ -82,9 +88,10 @@ class TextNavigationManager { ...@@ -82,9 +88,10 @@ class TextNavigationManager {
* text caret is in the middle of a word, moves the caret * text caret is in the middle of a word, moves the caret
* to the beginning of that word. * to the beginning of that word.
*/ */
moveBackwardOneWord() { static moveBackwardOneWord() {
if (this.currentlySelecting_) { const manager = TextNavigationManager.instance;
this.setupDynamicSelection_(false /* resetCursor */); if (manager.currentlySelecting_) {
manager.setupDynamicSelection_(false /* resetCursor */);
} }
EventHelper.simulateKeyPress(EventHelper.KeyCode.LEFT_ARROW, {ctrl: true}); EventHelper.simulateKeyPress(EventHelper.KeyCode.LEFT_ARROW, {ctrl: true});
} }
...@@ -95,9 +102,10 @@ class TextNavigationManager { ...@@ -95,9 +102,10 @@ class TextNavigationManager {
* in the middle of a word, moves the caret to the end of * in the middle of a word, moves the caret to the end of
* that word. * that word.
*/ */
moveForwardOneWord() { static moveForwardOneWord() {
if (this.currentlySelecting_) { const manager = TextNavigationManager.instance;
this.setupDynamicSelection_(false /* resetCursor */); if (manager.currentlySelecting_) {
manager.setupDynamicSelection_(false /* resetCursor */);
} }
EventHelper.simulateKeyPress(EventHelper.KeyCode.RIGHT_ARROW, {ctrl: true}); EventHelper.simulateKeyPress(EventHelper.KeyCode.RIGHT_ARROW, {ctrl: true});
} }
...@@ -107,9 +115,10 @@ class TextNavigationManager { ...@@ -107,9 +115,10 @@ class TextNavigationManager {
* if there are no lines above the current location of * if there are no lines above the current location of
* the caret). * the caret).
*/ */
moveUpOneLine() { static moveUpOneLine() {
if (this.currentlySelecting_) { const manager = TextNavigationManager.instance;
this.setupDynamicSelection_(true /* resetCursor */); if (manager.currentlySelecting_) {
manager.setupDynamicSelection_(true /* resetCursor */);
} }
EventHelper.simulateKeyPress(EventHelper.KeyCode.UP_ARROW); EventHelper.simulateKeyPress(EventHelper.KeyCode.UP_ARROW);
} }
...@@ -119,9 +128,10 @@ class TextNavigationManager { ...@@ -119,9 +128,10 @@ class TextNavigationManager {
* if there are no lines below the current location of * if there are no lines below the current location of
* the caret). * the caret).
*/ */
moveDownOneLine() { static moveDownOneLine() {
if (this.currentlySelecting_) { const manager = TextNavigationManager.instance;
this.setupDynamicSelection_(true /* resetCursor */); if (manager.currentlySelecting_) {
manager.setupDynamicSelection_(true /* resetCursor */);
} }
EventHelper.simulateKeyPress(EventHelper.KeyCode.DOWN_ARROW); EventHelper.simulateKeyPress(EventHelper.KeyCode.DOWN_ARROW);
} }
...@@ -141,8 +151,8 @@ class TextNavigationManager { ...@@ -141,8 +151,8 @@ class TextNavigationManager {
*/ */
setupDynamicSelection_(needToResetCursor) { setupDynamicSelection_(needToResetCursor) {
if (needToResetCursor) { if (needToResetCursor) {
if (this.currentlySelecting() && if (TextNavigationManager.currentlySelecting() &&
this.selectionEndIndex_ != NO_SELECT_INDEX) { this.selectionEndIndex_ != TextNavigationManager.NO_SELECT_INDEX) {
// Move the cursor to the end of the existing selection. // Move the cursor to the end of the existing selection.
chrome.automation.setDocumentSelection({ chrome.automation.setDocumentSelection({
anchorObject: this.selectionEndObject_, anchorObject: this.selectionEndObject_,
...@@ -162,8 +172,8 @@ class TextNavigationManager { ...@@ -162,8 +172,8 @@ class TextNavigationManager {
* @private * @private
*/ */
saveSelection_() { saveSelection_() {
if (this.selectionStartIndex_ == NO_SELECT_INDEX || if (this.selectionStartIndex_ == TextNavigationManager.NO_SELECT_INDEX ||
this.selectionEndIndex_ == NO_SELECT_INDEX) { this.selectionEndIndex_ == TextNavigationManager.NO_SELECT_INDEX) {
console.log( console.log(
'Selection bounds are not set properly:', this.selectionStartIndex_, 'Selection bounds are not set properly:', this.selectionStartIndex_,
this.selectionEndIndex_); this.selectionEndIndex_);
...@@ -189,7 +199,7 @@ class TextNavigationManager { ...@@ -189,7 +199,7 @@ class TextNavigationManager {
* Reset the selectionStartIndex to NO_SELECT_INDEX. * Reset the selectionStartIndex to NO_SELECT_INDEX.
*/ */
resetSelStartIndex() { resetSelStartIndex() {
this.selectionStartIndex_ = NO_SELECT_INDEX; this.selectionStartIndex_ = TextNavigationManager.NO_SELECT_INDEX;
} }
/** /**
...@@ -214,10 +224,12 @@ class TextNavigationManager { ...@@ -214,10 +224,12 @@ class TextNavigationManager {
* Returns if the selection start index is set in the current node. * Returns if the selection start index is set in the current node.
* @return {boolean} * @return {boolean}
*/ */
currentlySelecting() { static currentlySelecting() {
const manager = TextNavigationManager.instance;
return ( return (
this.selectionStartIndex_ !== NO_SELECT_INDEX && manager.selectionStartIndex_ !==
this.currentlySelecting_); TextNavigationManager.NO_SELECT_INDEX &&
manager.currentlySelecting_);
} }
/** /**
...@@ -230,14 +242,14 @@ class TextNavigationManager { ...@@ -230,14 +242,14 @@ class TextNavigationManager {
* @private * @private
*/ */
getSelectionIndexFromNode_(node, getStart) { getSelectionIndexFromNode_(node, getStart) {
let indexFromNode = NO_SELECT_INDEX; let indexFromNode = TextNavigationManager.NO_SELECT_INDEX;
if (getStart) { if (getStart) {
indexFromNode = node.textSelStart; indexFromNode = node.textSelStart;
} else { } else {
indexFromNode = node.textSelEnd; indexFromNode = node.textSelEnd;
} }
if (indexFromNode === undefined) { if (indexFromNode === undefined) {
return NO_SELECT_INDEX; return TextNavigationManager.NO_SELECT_INDEX;
} }
return indexFromNode; return indexFromNode;
} }
...@@ -246,13 +258,14 @@ class TextNavigationManager { ...@@ -246,13 +258,14 @@ class TextNavigationManager {
* Sets the selectionStart variable based on the selection of the current * Sets the selectionStart variable based on the selection of the current
* node. Also sets the currently selecting boolean to true. * node. Also sets the currently selecting boolean to true.
*/ */
saveSelectStart() { static saveSelectStart() {
const manager = TextNavigationManager.instance;
chrome.automation.getFocus((focusedNode) => { chrome.automation.getFocus((focusedNode) => {
this.selectionStartObject_ = focusedNode; manager.selectionStartObject_ = focusedNode;
this.selectionStartIndex_ = this.getSelectionIndexFromNode_( manager.selectionStartIndex_ = manager.getSelectionIndexFromNode_(
this.selectionStartObject_, manager.selectionStartObject_,
true /* We are getting the start index.*/); true /* We are getting the start index.*/);
this.currentlySelecting_ = true; manager.currentlySelecting_ = true;
}); });
} }
...@@ -264,7 +277,7 @@ class TextNavigationManager { ...@@ -264,7 +277,7 @@ class TextNavigationManager {
*/ */
onNavChange_() { onNavChange_() {
this.manageNavigationListener_(false); this.manageNavigationListener_(false);
if (this.currentlySelecting) { if (this.currentlySelecting_) {
this.saveSelectEnd(); this.saveSelectEnd();
} }
} }
...@@ -290,11 +303,12 @@ class TextNavigationManager { ...@@ -290,11 +303,12 @@ class TextNavigationManager {
* Reset the currentlySelecting variable to false, reset the selection * Reset the currentlySelecting variable to false, reset the selection
* indices, and remove the listener on navigation. * indices, and remove the listener on navigation.
*/ */
resetCurrentlySelecting() { static resetCurrentlySelecting() {
this.currentlySelecting_ = false; const manager = TextNavigationManager.instance;
this.manageNavigationListener_(false /** Removing listener */); manager.currentlySelecting_ = false;
this.selectionStartIndex_ = NO_SELECT_INDEX; manager.manageNavigationListener_(false /** Removing listener */);
this.selectionEndIndex_ = NO_SELECT_INDEX; manager.selectionStartIndex_ = TextNavigationManager.NO_SELECT_INDEX;
manager.selectionEndIndex_ = TextNavigationManager.NO_SELECT_INDEX;
} }
/** /**
...@@ -310,3 +324,6 @@ class TextNavigationManager { ...@@ -310,3 +324,6 @@ class TextNavigationManager {
}); });
} }
} }
// Constant to indicate selection index is not set.
TextNavigationManager.NO_SELECT_INDEX = -1;
...@@ -17,8 +17,8 @@ SwitchAccessTextNavigationManagerTest.prototype = { ...@@ -17,8 +17,8 @@ SwitchAccessTextNavigationManagerTest.prototype = {
/** @override */ /** @override */
setUp() { setUp() {
this.textNavigationManager = TextNavigationManager.initialize();
NavigationManager.instance.menuManager_.textNavigationManager_; this.textNavigationManager = TextNavigationManager.instance;
this.navigationManager = NavigationManager.instance; this.navigationManager = NavigationManager.instance;
} }
}; };
...@@ -242,7 +242,7 @@ TEST_F('SwitchAccessTextNavigationManagerTest', 'JumpToBeginning', function() { ...@@ -242,7 +242,7 @@ TEST_F('SwitchAccessTextNavigationManagerTest', 'JumpToBeginning', function() {
initialIndex: 6, initialIndex: 6,
targetIndex: 0, targetIndex: 0,
navigationAction: () => { navigationAction: () => {
this.textNavigationManager.jumpToBeginning(); TextNavigationManager.jumpToBeginning();
} }
}); });
}); });
...@@ -253,7 +253,7 @@ TEST_F('SwitchAccessTextNavigationManagerTest', 'JumpToEnd', function() { ...@@ -253,7 +253,7 @@ TEST_F('SwitchAccessTextNavigationManagerTest', 'JumpToEnd', function() {
initialIndex: 3, initialIndex: 3,
targetIndex: 8, targetIndex: 8,
navigationAction: () => { navigationAction: () => {
this.textNavigationManager.jumpToEnd(); TextNavigationManager.jumpToEnd();
} }
}); });
}); });
...@@ -265,7 +265,7 @@ TEST_F( ...@@ -265,7 +265,7 @@ TEST_F(
initialIndex: 7, initialIndex: 7,
targetIndex: 6, targetIndex: 6,
navigationAction: () => { navigationAction: () => {
this.textNavigationManager.moveBackwardOneChar(); TextNavigationManager.moveBackwardOneChar();
} }
}); });
}); });
...@@ -277,7 +277,7 @@ TEST_F( ...@@ -277,7 +277,7 @@ TEST_F(
initialIndex: 5, initialIndex: 5,
targetIndex: 0, targetIndex: 0,
navigationAction: () => { navigationAction: () => {
this.textNavigationManager.moveBackwardOneWord(); TextNavigationManager.moveBackwardOneWord();
} }
}); });
}); });
...@@ -289,7 +289,7 @@ TEST_F( ...@@ -289,7 +289,7 @@ TEST_F(
initialIndex: 0, initialIndex: 0,
targetIndex: 1, targetIndex: 1,
navigationAction: () => { navigationAction: () => {
this.textNavigationManager.moveForwardOneChar(); TextNavigationManager.moveForwardOneChar();
} }
}); });
}); });
...@@ -301,7 +301,7 @@ TEST_F( ...@@ -301,7 +301,7 @@ TEST_F(
initialIndex: 4, initialIndex: 4,
targetIndex: 12, targetIndex: 12,
navigationAction: () => { navigationAction: () => {
this.textNavigationManager.moveForwardOneWord(); TextNavigationManager.moveForwardOneWord();
} }
}); });
}); });
...@@ -314,7 +314,7 @@ TEST_F('SwitchAccessTextNavigationManagerTest', 'MoveUpOneLine', function() { ...@@ -314,7 +314,7 @@ TEST_F('SwitchAccessTextNavigationManagerTest', 'MoveUpOneLine', function() {
cols: 8, cols: 8,
wrap: 'hard', wrap: 'hard',
navigationAction: () => { navigationAction: () => {
this.textNavigationManager.moveUpOneLine(); TextNavigationManager.moveUpOneLine();
} }
}); });
}); });
...@@ -327,7 +327,7 @@ TEST_F('SwitchAccessTextNavigationManagerTest', 'MoveDownOneLine', function() { ...@@ -327,7 +327,7 @@ TEST_F('SwitchAccessTextNavigationManagerTest', 'MoveDownOneLine', function() {
cols: 8, cols: 8,
wrap: 'hard', wrap: 'hard',
navigationAction: () => { navigationAction: () => {
this.textNavigationManager.moveDownOneLine(); TextNavigationManager.moveDownOneLine();
} }
}); });
}); });
...@@ -394,7 +394,7 @@ TEST_F( ...@@ -394,7 +394,7 @@ TEST_F(
cols: 8, cols: 8,
wrap: 'hard', wrap: 'hard',
navigationAction: () => { navigationAction: () => {
this.textNavigationManager.moveForwardOneChar(); TextNavigationManager.moveForwardOneChar();
} }
}); });
}); });
...@@ -414,7 +414,7 @@ TEST_F( ...@@ -414,7 +414,7 @@ TEST_F(
cols: 8, cols: 8,
wrap: 'hard', wrap: 'hard',
navigationAction: () => { navigationAction: () => {
this.textNavigationManager.moveBackwardOneWord(); TextNavigationManager.moveBackwardOneWord();
}, },
backward: true backward: true
}); });
......
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