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

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

Issue 1178313004: [remoting-test] Fix It2Me browser test failures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 | no next file » | 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 67169883e023f8ca6bd04c424c8c954c4a94fce8..d29bb05aa1e32ed9313340d1452beaeb2b84bf36 100644
--- a/remoting/webapp/browser_test/browser_test.js
+++ b/remoting/webapp/browser_test/browser_test.js
@@ -273,16 +273,19 @@ browserTest.expectConnectionError = function(connectionMode, errorTags) {
var AppMode = remoting.AppMode;
var Timeout = browserTest.Timeout;
+ // Timeout if the session is not failed within 30 seconds.
+ var SESSION_CONNECTION_TIMEOUT = 30000;
+
var finishButton = 'client-finished-me2me-button';
+ var failureMode = AppMode.CLIENT_CONNECT_FAILED_ME2ME;
if (connectionMode == remoting.DesktopRemoting.Mode.IT2ME) {
finishButton = 'client-finished-it2me-button';
+ failureMode = AppMode.CLIENT_CONNECT_FAILED_IT2ME;
}
var onConnected = browserTest.onUIMode(AppMode.IN_SESSION, Timeout.NONE);
- var onFailure = Promise.race([
- browserTest.onUIMode(AppMode.CLIENT_CONNECT_FAILED_ME2ME),
- browserTest.onUIMode(AppMode.CLIENT_CONNECT_FAILED_IT2ME)]);
+ var onFailure = browserTest.onUIMode(failureMode, SESSION_CONNECTION_TIMEOUT);
Jamie 2015/06/18 01:05:30 You've also made the test stricter, which is a goo
onConnected = onConnected.then(function() {
return Promise.reject(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698