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

Unified Diff: remoting/webapp/browser_test/it2me_browser_test.js

Issue 968463003: Make Chromoting browser tests pass again (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | remoting/webapp/crd/js/identity.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
});
};
« no previous file with comments | « no previous file | remoting/webapp/crd/js/identity.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698