| Index: remoting/webapp/browser_test/it2me_browser_test.js
|
| diff --git a/remoting/webapp/browser_test/it2me_browser_test.js b/remoting/webapp/browser_test/it2me_browser_test.js
|
| index c3be9bc726c84314e92ced599b62b69e78a128d6..4275b5112f6c6605b81482fb32a957a81a32ca79 100644
|
| --- a/remoting/webapp/browser_test/it2me_browser_test.js
|
| +++ b/remoting/webapp/browser_test/it2me_browser_test.js
|
| @@ -4,7 +4,6 @@
|
|
|
| /**
|
| * @fileoverview
|
| - * @suppress {checkTypes}
|
| * Browser test for the scenario below:
|
| * 1. Generates an access code.
|
| * 2. Launches another chromoting app instance.
|
| @@ -31,9 +30,8 @@ browserTest.ConnectIt2Me.prototype.run = function(data) {
|
| return browserTest.disconnect();
|
| }).then(function() {
|
| browserTest.pass();
|
| - /** @param {*} reason */
|
| - }, function(reason) {
|
| - browserTest.fail(reason);
|
| + }, function(/** * */reason) {
|
| + browserTest.fail(/** @type {Error} */(reason));
|
| });
|
| };
|
|
|
| @@ -71,8 +69,8 @@ browserTest.InvalidAccessCode.prototype.run = function(data) {
|
| remoting.Error.INVALID_ACCESS_CODE);
|
| }).then(function() {
|
| browserTest.pass();
|
| - }, function(reason) {
|
| - browserTest.fail(reason);
|
| + }, function(/** * */reason) {
|
| + browserTest.fail(/** @type {Error} */(reason));
|
| });
|
| };
|
|
|
| @@ -81,7 +79,12 @@ browserTest.GetAccessCode = function() {};
|
|
|
| browserTest.GetAccessCode.prototype.run = function() {
|
| browserTest.clickOnControl('get-started-it2me');
|
| - this.onUserInfoReady_().then(function() {
|
| +
|
| + // Wait for the email address of the local user to become available. The
|
| + // email address is required in an It2Me connection for domain policy
|
| + // enforcement. TODO:(kelvinp) Fix this awkward behavior in the production
|
| + // code so that this hack is no longer required.
|
| + remoting.identity.getUserInfo().then(function(info) {
|
| browserTest.clickOnControl('share-button');
|
| }).then(function(){
|
| return browserTest.onUIMode(remoting.AppMode.HOST_WAITING_FOR_CONNECTION);
|
| @@ -93,23 +96,8 @@ browserTest.GetAccessCode.prototype.run = function() {
|
| browserTest.expect(
|
| Number.isInteger(numericAccessCode) && numericAccessCode > 0,
|
| "The access code should be a positive integer.");
|
| - browserTest.pass(accessCode);
|
| - },function(reason) {
|
| - browserTest.fail(reason);
|
| - });
|
| -};
|
| -
|
| -/**
|
| - * Wait for the email address of the local user to become available. The email
|
| - * address is required in an It2Me connection for domain policy enforcement.
|
| - * TODO:(kelvinp) Fix this awkward behavior in the production code so that this
|
| - * hack is no longer required.
|
| - *
|
| - * @return {Promise}
|
| - * @private
|
| - */
|
| -browserTest.GetAccessCode.prototype.onUserInfoReady_ = function() {
|
| - return new Promise(function(resolve, reject){
|
| - remoting.identity.getUserInfo(resolve, reject);
|
| + browserTest.pass();
|
| + }, function(/** * */reason) {
|
| + browserTest.fail(/** @type {Error} */(reason));
|
| });
|
| };
|
|
|