| 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;
|
|
|