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

Unified Diff: chrome/test/chromedriver/test_environment.py

Issue 14130017: [chromedriver] Add option to relaunch the test harness after each java test for debugging. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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
Index: chrome/test/chromedriver/test_environment.py
diff --git a/chrome/test/chromedriver/test_environment.py b/chrome/test/chromedriver/test_environment.py
index e56b519c506a93851bf74eb2b4a3cb460cfdfb52..6af003c1d53afbc24d6b1567fed6d8a0db5084f8 100644
--- a/chrome/test/chromedriver/test_environment.py
+++ b/chrome/test/chromedriver/test_environment.py
@@ -42,6 +42,10 @@ class BaseTestEnvironment(object):
"""
self._chrome_version = chrome_version
+ def GetOS(self):
+ """Name of the OS."""
+ raise NotImplementedError
+
def GlobalSetUp(self):
"""Sets up the global test environment state."""
pass
@@ -56,16 +60,22 @@ class BaseTestEnvironment(object):
Returns:
Filter string, in Google Test (C++) format.
"""
- raise NotImplementedError
+ return _EXPECTATIONS['GetPassedJavaTestFilter'](
+ 'android', self._chrome_version)
+
+ def GetPassedJavaTests(self):
frankf 2013/04/16 23:21:35 doc
+ with open(os.path.join(_THIS_DIR, 'java_tests.txt'), 'r') as f:
+ return _EXPECTATIONS['ApplyJavaTestFilter'](
+ 'android', self._chrome_version,
+ [t.strip('\n') for t in f.readlines()])
class DesktopTestEnvironment(BaseTestEnvironment):
"""Manages the environment java tests require to run on Desktop."""
#override
- def GetPassedJavaTestFilter(self):
- return _EXPECTATIONS['GetPassedJavaTestFilter'](
- util.GetPlatformName(), self._chrome_version)
+ def GetOS(self):
+ return util.GetPlatformName()
class AndroidTestEnvironment(DesktopTestEnvironment):
@@ -95,6 +105,5 @@ class AndroidTestEnvironment(DesktopTestEnvironment):
self._forwarder.Close()
#override
- def GetPassedJavaTestFilter(self):
- return _EXPECTATIONS['GetPassedJavaTestFilter'](
- 'android', self._chrome_version)
+ def GetOS(self):
+ return 'android'

Powered by Google App Engine
This is Rietveld 408576698