OLD | NEW |
| (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 """Basic tests for Chromoting it2me.""" | |
7 | |
8 import chromoting_base | |
9 import pyauto | |
10 | |
11 | |
12 class IT2MeBasic(chromoting_base.ChromotingBase): | |
13 """Drives it2me basic test cases.""" | |
14 | |
15 def setUp(self): | |
16 """Set up for it2me basic test.""" | |
17 pyauto.PyUITest.setUp(self) | |
18 | |
19 webapp = self.InstallExtension(self.GetWebappPath()) | |
20 self.LaunchApp(webapp) | |
21 self.Authenticate() | |
22 | |
23 if self.client_local: | |
24 self.client.LaunchApp(webapp) | |
25 | |
26 def testIT2MeBasic(self): | |
27 """Verify that we can start and disconnect a Chromoting it2me session.""" | |
28 access_code = self.host.Share() | |
29 self.assertTrue(access_code, | |
30 msg='Host attempted to share, but it failed. ' | |
31 'No access code was found.') | |
32 | |
33 self.client.Connect(access_code, self.client_tab_index) | |
34 | |
35 self.host.CancelShare() | |
36 self.client.Disconnect(self.client_tab_index) | |
37 | |
38 | |
39 if __name__ == '__main__': | |
40 chromoting_base.Main() | |
OLD | NEW |