| 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 import chromoting |
| 9 import pyauto |
| 10 |
| 11 class ChromotingBase(chromoting.ChromotingMixIn, pyauto.PyUITest): |
| 12 """Chromoting pyatuo test base class.""" |
| 13 |
| 14 _EXTRA_CHROME_FLAGS = [ |
| 15 '--allow-nacl-socket-api=*', |
| 16 ] |
| 17 |
| 18 def ExtraChromeFlags(self): |
| 19 """Ensures Chrome is launched with some custom flags. |
| 20 |
| 21 Overrides the default list of extra flags passed to Chrome. See |
| 22 ExtraChromeFlags() in pyauto.py. |
| 23 """ |
| 24 return pyauto.PyUITest.ExtraChromeFlags(self) + self._EXTRA_CHROME_FLAGS |
| 25 |
| 26 def setUp(self): |
| 27 """Prepares chromoting client, host, etc.""" |
| 28 super(ChromotingBase, self).setUp() |
| 29 |
| 30 self.client_local = (self.remote == None) |
| 31 self.host = self |
| 32 self.client = self if self.client_local else self.remote |
| 33 self.client_tab_index = 2 if self.client_local else 1 |
| 34 |
| 35 |
| OLD | NEW |