Commit 22f26db7 authored by kelvinp's avatar kelvinp Committed by Commit bot

Enable PIN browser tests on the waterfall.

This CL enables PIN browser tests on the waterfall.
It introduce in a timeout in ConnectMe2Me to account for the asynchronous
click handler hooking of the 'this-host-connect' button.

BUG=399839
TEST=Test Passed on Chromoting waterfall.

See https://chromium-swarm.appspot.com/user/tasks?sort=created_ts&state=all&limit=10&task_name=chromoting_integration_tests.

Review URL: https://codereview.chromium.org/940713003

Cr-Commit-Position: refs/heads/master@{#317663}
parent 9f7bd97f
...@@ -190,9 +190,13 @@ browserTest.onUIMode = function(expectedMode, opt_timeout) { ...@@ -190,9 +190,13 @@ browserTest.onUIMode = function(expectedMode, opt_timeout) {
*/ */
browserTest.connectMe2Me = function() { browserTest.connectMe2Me = function() {
var AppMode = remoting.AppMode; var AppMode = remoting.AppMode;
// The one second timeout is necessary because the click handler of
// 'this-host-connect' is registered asynchronously.
return base.Promise.sleep(1000).then(function() {
browserTest.clickOnControl('this-host-connect'); browserTest.clickOnControl('this-host-connect');
return browserTest.onUIMode(AppMode.CLIENT_HOST_NEEDS_UPGRADE).then( }).then(function(){
function() { return browserTest.onUIMode(AppMode.CLIENT_HOST_NEEDS_UPGRADE);
}).then(function() {
// On fulfilled. // On fulfilled.
browserTest.clickOnControl('host-needs-update-connect-button'); browserTest.clickOnControl('host-needs-update-connect-button');
}, function() { }, function() {
...@@ -259,15 +263,15 @@ browserTest.expectConnectionError = function(connectionMode, errorTag) { ...@@ -259,15 +263,15 @@ browserTest.expectConnectionError = function(connectionMode, errorTag) {
var Timeout = browserTest.Timeout; var Timeout = browserTest.Timeout;
var finishButton = 'client-finished-me2me-button'; var finishButton = 'client-finished-me2me-button';
var failureMode = AppMode.CLIENT_CONNECT_FAILED_ME2ME;
if (connectionMode == remoting.DesktopConnectedView.Mode.IT2ME) { if (connectionMode == remoting.DesktopConnectedView.Mode.IT2ME) {
failureMode = AppMode.CLIENT_CONNECT_FAILED_IT2ME;
finishButton = 'client-finished-it2me-button'; finishButton = 'client-finished-it2me-button';
} }
var onConnected = browserTest.onUIMode(AppMode.IN_SESSION, Timeout.NONE); var onConnected = browserTest.onUIMode(AppMode.IN_SESSION, Timeout.NONE);
var onFailure = browserTest.onUIMode(failureMode); var onFailure = Promise.race([
browserTest.onUIMode(AppMode.CLIENT_CONNECT_FAILED_ME2ME),
browserTest.onUIMode(AppMode.CLIENT_CONNECT_FAILED_IT2ME)]);
onConnected = onConnected.then(function() { onConnected = onConnected.then(function() {
return Promise.reject( return Promise.reject(
...@@ -313,7 +317,7 @@ browserTest.expectConnected = function() { ...@@ -313,7 +317,7 @@ browserTest.expectConnected = function() {
* @param {base.EventSource} eventSource * @param {base.EventSource} eventSource
* @param {string} event * @param {string} event
* @param {number} timeoutMs * @param {number} timeoutMs
* @param {?string} opt_expectedData * @param {*=} opt_expectedData
* @return {Promise} * @return {Promise}
*/ */
browserTest.expectEvent = function(eventSource, event, timeoutMs, browserTest.expectEvent = function(eventSource, event, timeoutMs,
...@@ -383,7 +387,7 @@ browserTest.setupPIN = function(newPin) { ...@@ -383,7 +387,7 @@ browserTest.setupPIN = function(newPin) {
}; };
/** /**
* @return {Promise} * @return {Promise<boolean>}
*/ */
browserTest.isLocalHostStarted = function() { browserTest.isLocalHostStarted = function() {
return new Promise(function(resolve) { return new Promise(function(resolve) {
......
...@@ -9,3 +9,6 @@ ...@@ -9,3 +9,6 @@
/usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=Me2MeBrowserTest.MANUAL_Me2Me_v2_Alive_OnLostFocus --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp.v2 --extension-name=Chromoting --accounts-file=../../remoting/tools/internal/test_accounts.json --account-type=gmail --me2me-pin=123456 --override-user-data-dir=/tmp/chromoting_test_profile /usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=Me2MeBrowserTest.MANUAL_Me2Me_v2_Alive_OnLostFocus --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp.v2 --extension-name=Chromoting --accounts-file=../../remoting/tools/internal/test_accounts.json --account-type=gmail --me2me-pin=123456 --override-user-data-dir=/tmp/chromoting_test_profile
/usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=It2MeBrowserTest.MANUAL_Connect --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp --extension-name=Chromoting --accounts-file=../../remoting/tools/internal/test_accounts.json --account-type=gmail --override-user-data-dir=/tmp/chromoting_test_profile /usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=It2MeBrowserTest.MANUAL_Connect --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp --extension-name=Chromoting --accounts-file=../../remoting/tools/internal/test_accounts.json --account-type=gmail --override-user-data-dir=/tmp/chromoting_test_profile
/usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=It2MeBrowserTest.MANUAL_InvalidAccessCode --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp --extension-name=Chromoting --accounts-file=../../remoting/tools/internal/test_accounts.json --account-type=gmail --override-user-data-dir=/tmp/chromoting_test_profile /usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=It2MeBrowserTest.MANUAL_InvalidAccessCode --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp --extension-name=Chromoting --accounts-file=../../remoting/tools/internal/test_accounts.json --account-type=gmail --override-user-data-dir=/tmp/chromoting_test_profile
/usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=RemoteDesktopBrowserTest.MANUAL_Cancel_PIN --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp.v2 --extension-name=Chromoting --accounts-file=../../remoting/tools/internal/test_accounts.json --account-type=gmail --me2me-pin=123456 --override-user-data-dir=/tmp/chromoting_test_profile
/usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=RemoteDesktopBrowserTest.MANUAL_Update_PIN --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp.v2 --extension-name=Chromoting --accounts-file=../../remoting/tools/internal/test_accounts.json --account-type=gmail --me2me-pin=123456 --override-user-data-dir=/tmp/chromoting_test_profile
/usr/bin/python ../xvfb.py #PROD_DIR# #PROD_DIR#/browser_tests --gtest_filter=RemoteDesktopBrowserTest.MANUAL_Invalid_PIN --run-manual --ui-test-action-timeout=100000 --webapp-unpacked=#PROD_DIR#/remoting/remoting.webapp.v2 --extension-name=Chromoting --accounts-file=../../remoting/tools/internal/test_accounts.json --account-type=gmail --me2me-pin=123457 --override-user-data-dir=/tmp/chromoting_test_profile
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment