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

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

Issue 940713003: Enable PIN browser tests on the waterfall. (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 | testing/chromoting/browser_test_commands_linux.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « no previous file | testing/chromoting/browser_test_commands_linux.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698