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

Unified Diff: chrome/test/pyautolib/pyauto.py

Issue 9583034: PyAuto tests derived from PolicyTestBase now clear the profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 8 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/pyautolib/policy_base.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/pyautolib/pyauto.py
diff --git a/chrome/test/pyautolib/pyauto.py b/chrome/test/pyautolib/pyauto.py
index 959ca457e330ad9991f26edce9d3108f41e37e78..98399e8d1f3d492262a9d453fbc666bf68762595 100755
--- a/chrome/test/pyautolib/pyauto.py
+++ b/chrome/test/pyautolib/pyauto.py
@@ -168,15 +168,7 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase):
else:
self.AppendBrowserLaunchSwitch(flag)
- def setUp(self):
- """Override this method to launch browser differently.
-
- Can be used to prevent launching the browser window by default in case a
- test wants to do some additional setup before firing browser.
-
- When using the named interface, it connects to an existing browser
- instance.
- """
+ def __SetUp(self):
named_channel_id = None
if _OPTIONS:
named_channel_id = _OPTIONS.channel_id
@@ -212,6 +204,17 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase):
remote.CreateTarget(self)
remote.setUp()
+ def setUp(self):
+ """Override this method to launch browser differently.
+
+ Can be used to prevent launching the browser window by default in case a
+ test wants to do some additional setup before firing browser.
+
+ When using the named interface, it connects to an existing browser
+ instance.
+ """
+ self.__SetUp()
+
def tearDown(self):
for remote in self.remotes:
remote.tearDown()
@@ -3677,8 +3680,7 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase):
assert self.WaitForSessionManagerRestart(
lambda: self.ApplyAccelerator(IDC_EXIT)), \
'Session manager did not restart after logout.'
-
- self.setUp()
+ self.__SetUp()
def LockScreen(self):
"""Locks the screen on chromeos.
@@ -3726,7 +3728,7 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase):
assert self.WaitForSessionManagerRestart(
lambda: self._GetResultFromJSONRequest(cmd_dict, windex=None)), \
'Session manager did not restart after logout.'
- self.setUp()
+ self.__SetUp()
def GetBatteryInfo(self):
"""Get details about battery state.
« no previous file with comments | « chrome/test/pyautolib/policy_base.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698