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