| Index: remoting/webapp/browser_test/browser_test.js
|
| diff --git a/remoting/webapp/browser_test/browser_test.js b/remoting/webapp/browser_test/browser_test.js
|
| index b96409d258f08fbb5f22f9947ba65ec4ef44c9d9..3880b4bf3f98e841e0726da2417a49e85e792be7 100644
|
| --- a/remoting/webapp/browser_test/browser_test.js
|
| +++ b/remoting/webapp/browser_test/browser_test.js
|
| @@ -249,7 +249,7 @@ browserTest.enterPIN = function(pin, opt_expectError) {
|
| if (opt_expectError) {
|
| return browserTest.expectConnectionError(
|
| remoting.DesktopConnectedView.Mode.ME2ME,
|
| - remoting.Error.Tag.INVALID_ACCESS_CODE);
|
| + [remoting.Error.Tag.INVALID_ACCESS_CODE]);
|
| } else {
|
| return browserTest.expectConnected();
|
| }
|
| @@ -258,10 +258,10 @@ browserTest.enterPIN = function(pin, opt_expectError) {
|
|
|
| /**
|
| * @param {remoting.DesktopConnectedView.Mode} connectionMode
|
| - * @param {string} errorTag
|
| + * @param {Array<remoting.Error.Tag>} errorTags
|
| * @return {Promise}
|
| */
|
| -browserTest.expectConnectionError = function(connectionMode, errorTag) {
|
| +browserTest.expectConnectionError = function(connectionMode, errorTags) {
|
| var AppMode = remoting.AppMode;
|
| var Timeout = browserTest.Timeout;
|
|
|
| @@ -285,12 +285,14 @@ browserTest.expectConnectionError = function(connectionMode, errorTag) {
|
| /** @type {Element} */
|
| var errorDiv = document.getElementById('connect-error-message');
|
| var actual = errorDiv.innerText;
|
| - var expected = l10n.getTranslationOrError(errorTag);
|
| + var expected = errorTags.map(function(/** string */errorTag) {
|
| + return l10n.getTranslationOrError(errorTag);
|
| + });
|
| browserTest.clickOnControl(finishButton);
|
|
|
| - if (actual != expected) {
|
| - return Promise.reject('Unexpected failure. actual:' + actual +
|
| - ' expected:' + expected);
|
| + if (expected.indexOf(actual) === -1) {
|
| + return Promise.reject('Unexpected failure. actual: ' + actual +
|
| + ' expected: ' + expected.join(','));
|
| }
|
| });
|
|
|
|
|