Commit 1c4a0ed0 authored by alog's avatar alog Committed by Commit bot

Fixing the Remote Desktop BrowserTest Failure

Merge branch 'master' of https://chromium.googlesource.com/chromium/src

Merge branch 'master' of https://chromium.googlesource.com/chromium/src

The following code change introduced an issue:
https://codereview.chromium.org/1554313002

There a couple of issues causing the problem.
1. One is the conditional waiter for HostOnline having short timeout. This is addressed by increasing the timeout.
2. Second issue is that, the following line times out and there by resulting in Chromoting waterfall failure. This is changed to ExecuteScript, since we don't need to validate the result from Refreshing the Chromoting Window.
From:
bool refresh_host_list = ExecuteScriptAndExtractBool("remoting.hostList.refreshAndDisplay()");
To:
ExecuteScript("remoting.hostList.refreshAndDisplay()");

BUG=577465

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

Cr-Commit-Position: refs/heads/master@{#370798}
parent e61922b8
......@@ -587,8 +587,10 @@ void RemoteDesktopBrowserTest::ConnectToRemoteHost(
EXPECT_FALSE(host_id.empty());
std::string element_id = "host_" + host_id;
// Wait for the hosts to be online. Try 3 times each spanning 20 seconds
// successively for 60 seconds.
ConditionalTimeoutWaiter hostOnlineWaiter(
base::TimeDelta::FromSeconds(30), base::TimeDelta::FromSeconds(5),
base::TimeDelta::FromSeconds(60), base::TimeDelta::FromSeconds(20),
base::Bind(&RemoteDesktopBrowserTest::IsHostOnline,
base::Unretained(this), host_id));
EXPECT_TRUE(hostOnlineWaiter.Wait());
......@@ -820,14 +822,10 @@ void RemoteDesktopBrowserTest::WaitForConnection() {
}
bool RemoteDesktopBrowserTest::IsHostOnline(const std::string& host_id) {
bool refresh_host_list =
ExecuteScriptAndExtractBool("remoting.hostList.refreshAndDisplay()");
if (!refresh_host_list) {
return false;
}
ExecuteScript("remoting.hostList.refreshAndDisplay()");
// Verify the host is online.
// Verify the host is online.
std::string element_id = "host_" + host_id;
std::string host_div_class = ExecuteScriptAndExtractString(
"document.getElementById('" + element_id + "').parentNode.className");
......
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