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

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 import sys
10
11
12 class Me2MeConnect(chromoting_base.ChromotingBase):
13 """Drives me2me connect test cases."""
14
15 def setUp(self):
16 """Set up for me2me connect test."""
17 chromoting_base.ChromotingBase.setUp(self)
18
19 self.InstallHostDaemon()
20 webapp = self.InstallExtension(self.GetWebappPath())
21 self.host.LaunchApp(webapp)
22 self.host.Authenticate()
23 self.host.StartMe2Me()
24 self.host.EnableConnectionsInstalled()
25 self.client.LaunchApp(webapp)
26
27 def tearDown(self):
28 """Mainly uninstalls the host daemon."""
29 self.host.DisableConnections()
30 self.UninstallHostDaemon()
Nirnimesh 2012/08/08 19:46:10 Call parent's tearDown
yihongg 2012/08/10 20:42:52 Done.
31
32 def testMe2MeConnectDisconnectReconnectDisconnect(self):
33 """Connects, disconnects, reconnects and disconnects"""
34 self.client.ConnectMe2Me('111111', 'IN_SESSION',
35 self.client_tab_index)
36 self.client.DisconnectMe2Me(False, self.client_tab_index)
37 self.client.ReconnectMe2Me('111111', self.client_tab_index)
38 self.client.DisconnectMe2Me(True, self.client_tab_index)
39
40 def testMe2MeConnectWithWrongPin(self):
41 """Connects and disconnects."""
42 self.client.ConnectMe2Me('222222', 'CLIENT_CONNECT_FAILED_ME2ME',
43 self.client_tab_index)
44 self.client.ReconnectMe2Me('111111', self.client_tab_index)
45 self.client.DisconnectMe2Me(True, self.client_tab_index)
46
47 def testMe2MeChangePin(self):
48 """Changes pin, connects with new pin and then disconnects."""
49 self.host.ChangePin('222222')
50 self.client.ConnectMe2Me('222222', 'IN_SESSION',
51 self.client_tab_index)
52 self.client.DisconnectMe2Me(True, self.client_tab_index)
53
54 def testMe2MeChangeName(self):
55 """Changes host name, connects and then disconnects."""
56 self.client.ChangeName("Changed")
57 self.client.ConnectMe2Me('111111', 'IN_SESSION',
58 self.client_tab_index)
59 self.client.DisconnectMe2Me(True, self.client_tab_index)
60
61
62 if __name__ == '__main__':
63 sys.exit(chromoting_base.Main())
Nirnimesh 2012/08/08 19:46:10 It's probably not necessary to wrap inside sys.exi
yihongg 2012/08/10 20:42:52 Done.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698