Chromium Code Reviews| 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 a053d5e302fb9ec161ced2c49258e75f38f8f991..bc0831d08680367f946337568bffcfc8b3e7af6c 100644 |
| --- a/chrome/test/remoting/remote_desktop_browsertest.cc |
| +++ b/chrome/test/remoting/remote_desktop_browsertest.cc |
| @@ -901,4 +901,35 @@ bool RemoteDesktopBrowserTest::IsEnabled( |
| "document.getElementById(\"" + element_name + "\").disabled"); |
| } |
| +bool RemoteDesktopBrowserTest::IsAppModeMatching(const std::string& mode) { |
| + return ExecuteScriptAndExtractBool( |
| + "remoting.currentMode ==\"" + mode + "\""); |
|
Jamie
2014/12/19 23:17:26
Nit: The mode should be expressed as one of the re
yihongg1
2015/01/22 21:55:25
Done.
|
| +} |
| + |
| +void RemoteDesktopBrowserTest::DisableRemoteConnection() { |
| + ConditionalTimeoutWaiter hostReadyWaiter( |
|
Jamie
2014/12/19 23:17:26
Nit: hostListReadyWaiter (you're not waiting for t
yihongg1
2015/01/22 21:55:25
Done.
|
| + base::TimeDelta::FromSeconds(5), |
| + base::TimeDelta::FromMilliseconds(500), |
| + base::Bind(&RemoteDesktopBrowserTest::IsHostListReady, this)); |
| + EXPECT_TRUE(hostReadyWaiter.Wait()); |
| + |
| + ClickOnControl("stop-daemon"); |
| + |
| + ConditionalTimeoutWaiter setupDoneWaiter( |
| + base::TimeDelta::FromSeconds(30), |
| + base::TimeDelta::FromMilliseconds(500), |
| + base::Bind(&RemoteDesktopBrowserTest::IsAppModeMatching, |
| + this, "home.host-setup.done")); |
|
Jamie
2014/12/19 23:17:26
Please use remoting.AppMode.HOST_SETUP_DONE instea
yihongg1
2015/01/22 21:55:25
Done.
|
| + EXPECT_TRUE(setupDoneWaiter.Wait()); |
| + |
| + ClickOnControl("host-config-done-dismiss"); |
| + |
| + ConditionalTimeoutWaiter homeWaiter( |
| + base::TimeDelta::FromSeconds(5), |
| + base::TimeDelta::FromMilliseconds(500), |
| + base::Bind(&RemoteDesktopBrowserTest::IsAppModeMatching, |
| + this, "home")); |
| + EXPECT_TRUE(homeWaiter.Wait()); |
| +} |
| + |
| } // namespace remoting |