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

Side by Side Diff: chrome/browser/resources/chromeos/switch_access/switch_access.js

Issue 2793073002: Added unit tests for auto_scan_manager. Created switch access test target. (Closed)
Patch Set: Responded to comments Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * Class to manage SwitchAccess and interact with other controllers. 6 * Class to manage SwitchAccess and interact with other controllers.
7 * 7 *
8 * @constructor 8 * @constructor
9 * @implements {SwitchAccessInterface} 9 * @implements {SwitchAccessInterface}
10 */ 10 */
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 chrome.tabs.create(optionsPage); 128 chrome.tabs.create(optionsPage);
129 }, 129 },
130 130
131 /** 131 /**
132 * Perform actions as the result of actions by the user. Currently, restarts 132 * Perform actions as the result of actions by the user. Currently, restarts
133 * auto-scan if it is enabled. 133 * auto-scan if it is enabled.
134 * 134 *
135 * @override 135 * @override
136 */ 136 */
137 performedUserAction: function() { 137 performedUserAction: function() {
138 if (this.autoScanManager_.isRunning()) 138 this.autoScanManager_.restartIfRunning();
139 this.autoScanManager_.restart();
140 }, 139 },
141 140
142 /** 141 /**
143 * Handle a change in user preferences. 142 * Handle a change in user preferences.
144 * 143 *
145 * @param {!Event} event 144 * @param {!Event} event
146 * @private 145 * @private
147 */ 146 */
148 handlePrefsUpdate_: function(event) { 147 handlePrefsUpdate_: function(event) {
149 let updatedPrefs = event.detail; 148 let updatedPrefs = event.detail;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 */ 235 */
237 debugMoveToParent: function() { 236 debugMoveToParent: function() {
238 let parent = this.treeWalker_.debugMoveToParent(this.node_); 237 let parent = this.treeWalker_.debugMoveToParent(this.node_);
239 if (parent) { 238 if (parent) {
240 this.node_ = parent; 239 this.node_ = parent;
241 this.printNode_(this.node_); 240 this.printNode_(this.node_);
242 chrome.accessibilityPrivate.setFocusRing([this.node_.location]); 241 chrome.accessibilityPrivate.setFocusRing([this.node_.location]);
243 } 242 }
244 } 243 }
245 }; 244 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698