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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:executable
+ *
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 """Chromoting me2me connect/disconnect related test cases."""
7
8 import chromoting_base
9
10
11 class Me2MeConnect(chromoting_base.ChromotingBase):
12 """Drives me2me connect test cases."""
13
14 def setUp(self):
15 """Set up for me2me connect test."""
16 chromoting_base.ChromotingBase.setUp(self)
17
18 self.InstallHostDaemon()
19 webapp = self.InstallExtension(self.GetWebappPath())
20 self.host.LaunchApp(webapp)
21 self.host.Authenticate()
22 self.host.StartMe2Me()
23 self.host.EnableConnectionsInstalled()
24 self.client.LaunchApp(webapp)
25
26 def tearDown(self):
27 """Mainly uninstalls the host daemon."""
28 self.host.DisableConnections()
29 self.UninstallHostDaemon()
30
31 chromoting_base.ChromotingBase.tearDown(self)
32
33 def testMe2MeConnectDisconnectReconnectDisconnect(self):
34 """Connects, disconnects, reconnects and disconnects"""
35 self.client.ConnectMe2Me('111111', 'IN_SESSION',
36 self.client_tab_index)
37 self.client.DisconnectMe2Me(False, self.client_tab_index)
38 self.client.ReconnectMe2Me('111111', self.client_tab_index)
39 self.client.DisconnectMe2Me(True, self.client_tab_index)
40
41 def testMe2MeConnectWithWrongPin(self):
42 """Connects and disconnects."""
43 self.client.ConnectMe2Me('222222', 'CLIENT_CONNECT_FAILED_ME2ME',
44 self.client_tab_index)
45 self.client.ReconnectMe2Me('111111', self.client_tab_index)
46 self.client.DisconnectMe2Me(True, self.client_tab_index)
47
48 def testMe2MeChangePin(self):
49 """Changes pin, connects with new pin and then disconnects."""
50 self.host.ChangePin('222222')
51 self.client.ConnectMe2Me('222222', 'IN_SESSION',
52 self.client_tab_index)
53 self.client.DisconnectMe2Me(True, self.client_tab_index)
54
55 def testMe2MeChangeName(self):
56 """Changes host name, connects and then disconnects."""
57 self.client.ChangeName("Changed")
58 self.client.ConnectMe2Me('111111', 'IN_SESSION',
59 self.client_tab_index)
60 self.client.DisconnectMe2Me(True, self.client_tab_index)
61
62
63 if __name__ == '__main__':
64 chromoting_base.Main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698