Chromium Code Reviews| 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 f41591fd452113f768028de2611ea2c9ab1c5c19..ed416881d381286c33a11e9e788386291e00452b 100644 |
| --- a/remoting/webapp/browser_test/browser_test.js |
| +++ b/remoting/webapp/browser_test/browser_test.js |
| @@ -190,9 +190,13 @@ browserTest.onUIMode = function(expectedMode, opt_timeout) { |
| */ |
| browserTest.connectMe2Me = function() { |
| var AppMode = remoting.AppMode; |
| - browserTest.clickOnControl('this-host-connect'); |
| - return browserTest.onUIMode(AppMode.CLIENT_HOST_NEEDS_UPGRADE).then( |
| - function() { |
| + // The 1 second is necessary because the click handler of 'this-host-connect' |
| + // is hooked asynchronously. |
|
Jamie
2015/02/23 20:56:26
It's not entirely clear what this means. I suggest
|
| + return base.Promise.sleep(1000).then(function() { |
| + browserTest.clickOnControl('this-host-connect'); |
| + }).then(function(){ |
| + return browserTest.onUIMode(AppMode.CLIENT_HOST_NEEDS_UPGRADE); |
| + }).then(function() { |
| // On fulfilled. |
| browserTest.clickOnControl('host-needs-update-connect-button'); |
| }, function() { |
| @@ -313,7 +317,7 @@ browserTest.expectConnected = function() { |
| * @param {base.EventSource} eventSource |
| * @param {string} event |
| * @param {number} timeoutMs |
| - * @param {?string} opt_expectedData |
| + * @param {*=} opt_expectedData |
| * @return {Promise} |
| */ |
| browserTest.expectEvent = function(eventSource, event, timeoutMs, |
| @@ -383,7 +387,7 @@ browserTest.setupPIN = function(newPin) { |
| }; |
| /** |
| - * @return {Promise} |
| + * @return {Promise<boolean>} |
| */ |
| browserTest.isLocalHostStarted = function() { |
| return new Promise(function(resolve) { |