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

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

Issue 2640503002: Disable next compatibility mode for ChromeVox on dev channel (Closed)
Patch Set: m Created 3 years, 11 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.js
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
index 8c0c9d5038661c83cafecf629a86644f5abba24d..da64659431a329a71c387d760519abdc9b841ff6 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
@@ -168,6 +168,11 @@ Background = function() {
*/
this.focusRecoveryMap_ = new WeakMap();
+ chrome.automation.getDesktop(function(desktop) {
+ /** @type {string} */
+ this.chromeChannel_ = desktop.chromeChannel;
+ }.bind(this));
+
// Record a metric with the mode we're in on startup.
var useNext = localStorage['useNext'] !== 'false';
chrome.metricsPrivate.recordValue(
@@ -213,6 +218,7 @@ Background.GESTURE_NEXT_COMMAND_MAP = {
Background.prototype = {
__proto__: ChromeVoxState.prototype,
+
/**
* Maps the last node with range in a given root.
* @type {WeakMap<AutomationNode>}
@@ -247,7 +253,8 @@ Background.prototype = {
ChromeVoxMode.CLASSIC_COMPAT;
var nextSite = this.isWhitelistedForNext_(topLevelRoot.docUrl);
- var nextCompat = this.nextCompatRegExp_.test(topLevelRoot.docUrl);
+ var nextCompat = this.nextCompatRegExp_.test(topLevelRoot.docUrl) &&
+ this.chromeChannel_ != 'dev';
var classicCompat =
this.isWhitelistedForClassicCompat_(topLevelRoot.docUrl);
if (nextCompat && useNext)
@@ -567,7 +574,7 @@ Background.prototype = {
* @private
*/
shouldEnableClassicForUrl_: function(url) {
- return this.nextCompatRegExp_.test(url) ||
+ return (this.nextCompatRegExp_.test(url) &&this.chromeChannel_ != 'dev') ||
(this.mode != ChromeVoxMode.FORCE_NEXT &&
!this.isBlacklistedForClassic_(url) &&
!this.isWhitelistedForNext_(url));

Powered by Google App Engine
This is Rietveld 408576698