summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorweitaosu@chromium.org <weitaosu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-03 02:22:00 +0000
committerweitaosu@chromium.org <weitaosu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-03 02:22:00 +0000
commitca4afd78514e98e77b62df414339e3dd61fc4bda (patch)
tree43f97da0f3f4e9049143a24d25c0c7fbdb5e55f9 /remoting
parentb2e4c70138559bbadb9db0cb2279d7b6254dcb03 (diff)
downloadchromium_src-ca4afd78514e98e77b62df414339e3dd61fc4bda.zip
chromium_src-ca4afd78514e98e77b62df414339e3dd61fc4bda.tar.gz
chromium_src-ca4afd78514e98e77b62df414339e3dd61fc4bda.tar.bz2
Adding a disconnect step in the Me2Me browser test.
BUG=134210 Review URL: https://codereview.chromium.org/25048007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226664 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r--remoting/test/me2me_browsertest.cc2
-rw-r--r--remoting/test/remote_desktop_browsertest.cc24
-rw-r--r--remoting/test/remote_desktop_browsertest.h3
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);