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

Side by Side Diff: chrome/test/functional/chromoting/chromoting_base.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 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 """Common imports, setup, etc for chromoting tests."""
6
7 import os
8
9
10 def _SetupPaths():
11 """Add chrome/test/functional to sys.path for importing pyauto_functional"""
12 functional_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
13 os.sys.path.append(functional_dir)
14
15 _SetupPaths()
16
17
18 import pyauto_functional # Must come before chromoting and pyauto.
19 import pyauto
20 import chromoting
Nirnimesh 2012/08/14 22:09:30 can this go before pyauto?
21
22
23 from pyauto_functional import Main
Nirnimesh 2012/08/14 22:09:30 move this near import pyauto_functional
yihongg 2012/08/15 17:48:38 Done.
24
25
26 class ChromotingBase(chromoting.ChromotingMixIn, pyauto.PyUITest):
27 """Chromoting pyauto test base class.
28
29 Instance variable:
Nirnimesh 2012/08/14 22:09:30 Replace with: The following member vars can be use
yihongg 2012/08/15 17:48:38 Done.
30 client_local: True if the client is on the same machines as host
31 host: The chromoting host side
Nirnimesh 2012/08/14 22:09:30 append: , and instance of XYZ
yihongg 2012/08/15 17:48:38 Done.
32 client: The chromoting client side
Nirnimesh 2012/08/14 22:09:30 ditto
yihongg 2012/08/15 17:48:38 Done.
33 client_tab_index: The tab index to the chromoting client tab
34 """
35
36 def __init__(self, methodName):
37 pyauto.PyUITest.__init__(self, methodName)
38
39 self.client_local = (self.remote == None)
40 self.host = self
41 self.client = self if self.client_local else self.remote
42 self.client_tab_index = 2 if self.client_local else 1
43
44 def ExtraChromeFlags(self):
45 """Add --allow-nacl-socket-api to connect chromoting successfully."""
46 extra_chrome_flags = ['--allow-nacl-socket-api=*',]
47 return pyauto.PyUITest.ExtraChromeFlags(self) + extra_chrome_flags
48
49 def setUp(self):
Nirnimesh 2012/08/14 22:09:30 remove no-op
yihongg 2012/08/15 17:48:38 Done.
50 """Calls PyUITest setup."""
51 pyauto.PyUITest.setUp(self)
52
53 def tearDown(self):
Nirnimesh 2012/08/14 22:09:30 remove no-op. The parent's tearDown() will get cal
yihongg 2012/08/15 17:48:38 Done.
54 """Calls PyUITest teardown."""
55 pyauto.PyUITest.tearDown(self)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698