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

Unified Diff: chrome/test/functional/chromoting/me2me_connect.py

Issue 10821015: Initial checkin of the me2me pyauto automation: (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 4 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
Index: chrome/test/functional/chromoting/me2me_connect.py
===================================================================
--- chrome/test/functional/chromoting/me2me_connect.py (revision 0)
+++ chrome/test/functional/chromoting/me2me_connect.py (revision 0)
@@ -0,0 +1,70 @@
+#!/usr/bin/env python
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import os
+
+# Add chrome/test/functional to sys.path for importing pyauto_functional
+os.sys.path.insert(
+ 0,
+ os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+
+import pyauto_functional # Must come before chromoting and pyauto.
+import chromoting
+import pyauto
+
+import chromoting_base
+
+
+class Me2MeConnect(chromoting_base.ChromotingBase):
+ """Chromoting me2me connect/disconnect related test cases."""
+
+ def setUp(self):
+ """Set up for me2me connect test."""
+ super(Me2MeConnect, self).setUp()
+
+ self.InstallHostDaemon()
+ self._app = self.InstallExtension(self.GetWebappPath())
+ self.host.LaunchApp(self._app)
+ self.host.Authenticate()
+ self.host.StartMe2Me()
+ self.host.EnableConnectionsInstalled()
+ self.client.LaunchApp(self._app)
+
+ def tearDown(self):
+ """Mainly uninstalls the host daemon."""
+ self.host.DisableConnections()
+ self.UninstallHostDaemon()
+
+ def testMe2MeConnectDisconnectReconnectDisconnect(self):
+ """Connects, disconnects, reconnects and disconnects"""
+ self.client.ConnectMe2Me("111111", "IN_SESSION",
+ self.client_tab_index)
+ self.client.DisconnectMe2Me(False, self.client_tab_index)
+ self.client.ReconnectMe2Me("111111", self.client_tab_index)
+ self.client.DisconnectMe2Me(True, self.client_tab_index)
+
+ def testMe2MeConnectWithWrongPin(self):
+ """Connects and disconnects."""
+ self.client.ConnectMe2Me("222222", "CLIENT_CONNECT_FAILED_ME2ME",
+ self.client_tab_index)
+ self.client.ReconnectMe2Me("111111", self.client_tab_index)
+ self.client.DisconnectMe2Me(True, self.client_tab_index)
+
+ def testMe2MeChangePin(self):
+ """Changes pin, connects with new pin and then disconnects."""
+ self.host.ChangePin("222222")
+ self.client.ConnectMe2Me("222222", "IN_SESSION",
+ self.client_tab_index)
+ self.client.DisconnectMe2Me(True, self.client_tab_index)
+
+ def testMe2MeChangeName(self):
+ """Changes host name, connects and then disconnects."""
+ self.client.ChangeName("Changed")
+ self.client.ConnectMe2Me("111111", "IN_SESSION",
+ self.client_tab_index)
+ self.client.DisconnectMe2Me(True, self.client_tab_index)
+
+if __name__ == '__main__':
+ pyauto_functional.Main()
Property changes on: chrome/test/functional/chromoting/me2me_connect.py
___________________________________________________________________
Added: svn:executable
+ *

Powered by Google App Engine
This is Rietveld 408576698