diff options
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/test/me2me_browsertest.cc | 2 | ||||
-rw-r--r-- | remoting/test/remote_desktop_browsertest.cc | 24 | ||||
-rw-r--r-- | remoting/test/remote_desktop_browsertest.h | 3 |
3 files changed, 28 insertions, 1 deletions
diff --git a/remoting/test/me2me_browsertest.cc b/remoting/test/me2me_browsertest.cc index 0b68d67..a8eacf3 100644 --- a/remoting/test/me2me_browsertest.cc +++ b/remoting/test/me2me_browsertest.cc @@ -34,6 +34,8 @@ IN_PROC_BROWSER_TEST_F(Me2MeBrowserTest, TestMouseInput(); + DisconnectMe2Me(); + Cleanup(); } diff --git a/remoting/test/remote_desktop_browsertest.cc b/remoting/test/remote_desktop_browsertest.cc index 3c2b7b7..b00dc4b 100644 --- a/remoting/test/remote_desktop_browsertest.cc +++ b/remoting/test/remote_desktop_browsertest.cc @@ -270,6 +270,29 @@ void RemoteDesktopBrowserTest::StartMe2Me() { "remoting.hostList.localHost_.status == 'ONLINE'")); } +void RemoteDesktopBrowserTest::DisconnectMe2Me() { + // The chromoting extension should be installed. + ASSERT_FALSE(ChromotingID().empty()); + + // The active tab should have the chromoting app loaded. + ASSERT_EQ(Chromoting_Main_URL(), GetCurrentURL()); + ASSERT_TRUE(RemoteDesktopBrowserTest::IsSessionConnected()); + + ClickOnControl("toolbar-stub"); + + EXPECT_TRUE(HtmlElementVisible("session-toolbar")); + + ClickOnControl("toolbar-disconnect"); + + EXPECT_TRUE(HtmlElementVisible("client-dialog")); + EXPECT_TRUE(HtmlElementVisible("client-reconnect-button")); + EXPECT_TRUE(HtmlElementVisible("client-finished-me2me-button")); + + ClickOnControl("client-finished-me2me-button"); + + EXPECT_FALSE(HtmlElementVisible("client-dialog")); +} + void RemoteDesktopBrowserTest::SimulateKeyPressWithCode( ui::KeyboardCode keyCode, const char* code) { @@ -516,7 +539,6 @@ void RemoteDesktopBrowserTest::NavigateToURLAndWaitForPageLoad( } void RemoteDesktopBrowserTest::ClickOnControl(const std::string& name) { - ASSERT_TRUE(HtmlElementExists(name)); ASSERT_TRUE(HtmlElementVisible(name)); ExecuteScript("document.getElementById(\"" + name + "\").click();"); diff --git a/remoting/test/remote_desktop_browsertest.h b/remoting/test/remote_desktop_browsertest.h index 6de0a5e..7936d91 100644 --- a/remoting/test/remote_desktop_browsertest.h +++ b/remoting/test/remote_desktop_browsertest.h @@ -79,6 +79,9 @@ class RemoteDesktopBrowserTest : public ExtensionBrowserTest { // Click on "Get Started" in the Me2Me section and show the host list. void StartMe2Me(); + // Disconnect the active Me2Me session. + void DisconnectMe2Me(); + // Simulate a key event. void SimulateKeyPressWithCode(ui::KeyboardCode keyCode, const char* code); |