Chromium Code Reviews| 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,62 @@ |
| +#!/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 |
| + |
| +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.GetMe2MeStarted() |
|
simonmorris
2012/07/30 22:44:24
Maybe "StartMe2Me", for consistency with Connect/D
yihongg1
2012/08/03 00:40:06
Done.
|
| + 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 |
| + * |