Chromium Code Reviews| Index: build/android/pylib/run_java_tests.py |
| diff --git a/build/android/pylib/run_java_tests.py b/build/android/pylib/run_java_tests.py |
| index fc0a13fd8120323d9f31ff0fef78105fae49cb4d..90543215b9fcccd1af8a38f0e9bd94c4ea10b992 100644 |
| --- a/build/android/pylib/run_java_tests.py |
| +++ b/build/android/pylib/run_java_tests.py |
| @@ -241,19 +241,11 @@ class TestRunner(BaseTestRunner): |
| def _TakeScreenshot(self, test): |
| """Takes a screenshot from the device.""" |
| - screenshot_tool = os.path.join(constants.CHROME_DIR, |
| - 'third_party/android_tools/sdk/tools/monkeyrunner') |
| - screenshot_script = os.path.join(constants.CHROME_DIR, |
| - 'build/android/monkeyrunner_screenshot.py') |
| - screenshot_path = os.path.join(constants.CHROME_DIR, |
| - 'out_screenshots') |
| - if not os.path.exists(screenshot_path): |
| - os.mkdir(screenshot_path) |
| - screenshot_name = os.path.join(screenshot_path, test + '.png') |
| + if not os.path.exists(constants.SCREENSHOTS_DIR): |
| + os.mkdir(constants.SCREENSHOTS_DIR) |
|
bulach
2012/11/06 11:06:48
nit: maybe move 244-245 this to TakeScreenshot usi
frankf
2012/11/06 19:04:40
Hmm. I think it's more flexible for the caller to
bulach
2012/11/06 19:06:06
sorry, my suggestion was just to move the check an
frankf
2012/11/06 19:44:03
Ah. Done.
On 2012/11/06 19:06:06, bulach wrote:
|
| + screenshot_name = os.path.join(constants.SCREENSHOTS_DIR, test + '.png') |
| logging.info('Taking screenshot named %s', screenshot_name) |
| - cmd_helper.RunCmd([screenshot_tool, screenshot_script, |
| - '--serial', self.device, |
| - '--file', screenshot_name]) |
| + self.adb.TakeScreenshot(screenshot_name) |
| def SetUp(self): |
| """Sets up the test harness and device before all tests are run.""" |