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

Unified Diff: build/android/pylib/run_java_tests.py

Issue 11366068: Take screenshots using /system/bin/screencap instead of monkeyrunner. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed bulach's comments Created 8 years, 1 month 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 | « build/android/pylib/constants.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..7254341bb289d6939e3148ed0b2506a030e3abe7 100644
--- a/build/android/pylib/run_java_tests.py
+++ b/build/android/pylib/run_java_tests.py
@@ -241,19 +241,9 @@ 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')
+ 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."""
« no previous file with comments | « build/android/pylib/constants.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698