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

Unified Diff: chrome/test/remoting/remote_desktop_browsertest.cc

Issue 802523004: Add a test case to test disabling remote connection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Jamie's comments Created 5 years, 11 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 | « chrome/test/remoting/remote_desktop_browsertest.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/remoting/remote_desktop_browsertest.cc
diff --git a/chrome/test/remoting/remote_desktop_browsertest.cc b/chrome/test/remoting/remote_desktop_browsertest.cc
index 0addada9488db5e46ddbd589a852c54dc4f1aed3..1c3c8593f02f0d85b004d7708858ac153a1dce7e 100644
--- a/chrome/test/remoting/remote_desktop_browsertest.cc
+++ b/chrome/test/remoting/remote_desktop_browsertest.cc
@@ -896,4 +896,35 @@ bool RemoteDesktopBrowserTest::IsEnabled(
"document.getElementById(\"" + element_name + "\").disabled");
}
+bool RemoteDesktopBrowserTest::IsAppModeEqualTo(const std::string& mode) {
+ return ExecuteScriptAndExtractBool(
+ "remoting.currentMode == " + mode);
+}
+
+void RemoteDesktopBrowserTest::DisableRemoteConnection() {
+ ConditionalTimeoutWaiter hostReadyWaiter(
+ base::TimeDelta::FromSeconds(5),
+ base::TimeDelta::FromMilliseconds(500),
+ base::Bind(&RemoteDesktopBrowserTest::IsLocalHostReady, this));
+ EXPECT_TRUE(hostReadyWaiter.Wait());
+
+ ClickOnControl("stop-daemon");
+
+ ConditionalTimeoutWaiter setupDoneWaiter(
+ base::TimeDelta::FromSeconds(30),
+ base::TimeDelta::FromMilliseconds(500),
+ base::Bind(&RemoteDesktopBrowserTest::IsAppModeEqualTo,
+ this, "remoting.AppMode.HOST_SETUP_DONE"));
+ EXPECT_TRUE(setupDoneWaiter.Wait());
+
+ ClickOnControl("host-config-done-dismiss");
+
+ ConditionalTimeoutWaiter homeWaiter(
+ base::TimeDelta::FromSeconds(5),
+ base::TimeDelta::FromMilliseconds(500),
+ base::Bind(&RemoteDesktopBrowserTest::IsAppModeEqualTo,
+ this, "remoting.AppMode.HOME"));
+ EXPECT_TRUE(homeWaiter.Wait());
+}
+
} // namespace remoting
« no previous file with comments | « chrome/test/remoting/remote_desktop_browsertest.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698