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

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 # Add chrome/test/functional to sys.path for importing pyauto_functional
10 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.
11 0,
12 os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
13
14 import pyauto_functional # Must come before chromoting and pyauto.
15 import pyauto
16 import chromoting
17
18
19 from pyauto_functional import Main
20
21
22 class ChromotingBase(chromoting.ChromotingMixIn, pyauto.PyUITest):
23 """Chromoting pyauto test base class."""
24
25 def __init__(self, methodName):
26 pyauto.PyUITest.__init__(self, methodName)
27
28 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
29 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
30 self.client = self if self.client_local else self.remote
31 self.client_tab_index = 2 if self.client_local else 1
32
33 def ExtraChromeFlags(self):
34 """Add --allow-nacl-socket-api to connect chromoting successfully."""
35 extra_chrome_flags = ['--allow-nacl-socket-api=*',]
36 return pyauto.PyUITest.ExtraChromeFlags(self) + extra_chrome_flags
37
38 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.
39 """Calls PyUITest setup."""
40 pyauto.PyUITest.setUp(self)
41
Nirnimesh 2012/08/08 19:46:10 remove spurious blank lines
yihongg 2012/08/10 20:42:52 Done.
42
43
44
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698