Chromium Code Reviews| Index: chrome/test/functional/chromoting/chromoting_base.py |
| =================================================================== |
| --- chrome/test/functional/chromoting/chromoting_base.py (revision 0) |
| +++ chrome/test/functional/chromoting/chromoting_base.py (revision 0) |
| @@ -0,0 +1,44 @@ |
| +# Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +"""Common imports, setup, etc for chromoting tests.""" |
| + |
| +import os |
| + |
| +# Add chrome/test/functional to sys.path for importing pyauto_functional |
| +os.sys.path.insert( |
|
Nirnimesh
2012/08/08 19:46:10
Use sys.path.append.
Move it inside a local funct
yihongg
2012/08/10 20:42:52
Done.
|
| + 0, |
| + os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) |
| + |
| +import pyauto_functional # Must come before chromoting and pyauto. |
| +import pyauto |
| +import chromoting |
| + |
| + |
| +from pyauto_functional import Main |
| + |
| + |
| +class ChromotingBase(chromoting.ChromotingMixIn, pyauto.PyUITest): |
| + """Chromoting pyauto test base class.""" |
| + |
| + def __init__(self, methodName): |
| + pyauto.PyUITest.__init__(self, methodName) |
| + |
| + self.client_local = (self.remote == None) |
|
Nirnimesh
2012/08/08 19:46:10
Can all this be done in setUp instead?
yihongg
2012/08/10 20:42:52
It is OK to put those in setUp. It is just better
|
| + self.host = self |
|
Nirnimesh
2012/08/08 19:46:10
Clearly declare the host and client vars in the do
yihongg
2012/08/10 20:42:52
I am putting this in class docstring. Not sure if
|
| + self.client = self if self.client_local else self.remote |
| + self.client_tab_index = 2 if self.client_local else 1 |
| + |
| + def ExtraChromeFlags(self): |
| + """Add --allow-nacl-socket-api to connect chromoting successfully.""" |
| + extra_chrome_flags = ['--allow-nacl-socket-api=*',] |
| + return pyauto.PyUITest.ExtraChromeFlags(self) + extra_chrome_flags |
| + |
| + def setUp(self): |
|
Nirnimesh
2012/08/08 19:46:10
no-op. Remove
yihongg
2012/08/10 20:42:52
This calls PyUITest setUp. In this way, PyUITest d
Nirnimesh
2012/08/14 22:09:30
Override it when you need to add more steps here.
yihongg
2012/08/15 17:48:38
Done.
|
| + """Calls PyUITest setup.""" |
| + pyauto.PyUITest.setUp(self) |
| + |
|
Nirnimesh
2012/08/08 19:46:10
remove spurious blank lines
yihongg
2012/08/10 20:42:52
Done.
|
| + |
| + |
| + |
| Property changes on: chrome/test/functional/chromoting/chromoting_base.py |
| ___________________________________________________________________ |
| Added: svn:executable |
| + * |