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

Unified Diff: chrome/browser/resources/chromeos/chromevox/testing/test_msgs.js

Issue 1362223003: Improve braille related message descriptions and clean up message handling in Chromevox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@inputtypeexception
Patch Set: Move another braille message to Msgs.Untranslated Created 5 years, 3 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/testing/test_msgs.js
diff --git a/chrome/browser/resources/chromeos/chromevox/testing/test_msgs.js b/chrome/browser/resources/chromeos/chromevox/testing/test_msgs.js
index d76c16dc1c49deff24b2765082ca7f4f4203ed32..e4dd01d5c3688a421f2c76d7304dc452a9006a69 100644
--- a/chrome/browser/resources/chromeos/chromevox/testing/test_msgs.js
+++ b/chrome/browser/resources/chromeos/chromevox/testing/test_msgs.js
@@ -7,39 +7,42 @@
* @fileoverview Testing stub for messages.
*/
-goog.provide('cvox.TestMsgs');
+goog.provide('TestMsgs');
-goog.require('cvox.Msgs');
+goog.require('Msgs');
goog.require('cvox.TestMessages');
-
/**
* @constructor
- * @extends {cvox.Msgs}
*/
-cvox.TestMsgs = function() {
- cvox.Msgs.call(this);
-};
-goog.inherits(cvox.TestMsgs, cvox.Msgs);
+TestMsgs = function() {};
+/**
+ * @type {Object<string>}
+ */
+TestMsgs.Untranslated = Msgs.Untranslated;
/**
- * @override
+ * @return {string} The locale.
*/
-cvox.TestMsgs.prototype.getLocale = function() {
+TestMsgs.getLocale = function() {
return 'testing';
};
-
/**
- * @override
+ * @param {string} messageId
+ * @param {Array<string>=} opt_subs
+ * @return {string}
*/
-cvox.TestMsgs.prototype.getMsg = function(messageId, opt_subs) {
+TestMsgs.getMsg = function(messageId, opt_subs) {
if (!messageId) {
throw Error('Message id required');
}
- var message = cvox.TestMessages[('chromevox_' + messageId).toUpperCase()];
- if (message == undefined) {
+ var message = TestMsgs.Untranslated[messageId.toUpperCase()];
+ if (message !== undefined)
+ return message;
+ message = cvox.TestMessages[('chromevox_' + messageId).toUpperCase()];
+ if (message === undefined) {
throw Error('missing-msg: ' + messageId);
}
@@ -52,3 +55,9 @@ cvox.TestMsgs.prototype.getMsg = function(messageId, opt_subs) {
}
return messageString;
};
+
+/**
+ * @param {number} num
+ * @return {string}
+ */
+TestMsgs.getNumber = Msgs.getNumber;

Powered by Google App Engine
This is Rietveld 408576698