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

Unified Diff: tools/telemetry/telemetry/core/platform/android_platform_backend.py

Issue 176863005: Add is_tracing to browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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: tools/telemetry/telemetry/core/platform/android_platform_backend.py
diff --git a/tools/telemetry/telemetry/core/platform/android_platform_backend.py b/tools/telemetry/telemetry/core/platform/android_platform_backend.py
index d5be43a5520cdef4eea9e1018c21130153958fb5..cffdf4c350977ce2f40519e20b0d7371b8d1ea0d 100644
--- a/tools/telemetry/telemetry/core/platform/android_platform_backend.py
+++ b/tools/telemetry/telemetry/core/platform/android_platform_backend.py
@@ -225,15 +225,19 @@ class AndroidPlatformBackend(
raise ValueError('Android video capture cannot capture at %dmbps. '
'Max capture rate is 100mbps.' % min_bitrate_mbps)
self._video_output = tempfile.mkstemp()[1]
- if self._video_recorder:
+ if self.is_video_capture_running:
self._video_recorder.Stop()
self._video_recorder = screenshot.VideoRecorder(
self._adb, self._video_output, megabits_per_second=min_bitrate_mbps)
self._video_recorder.Start()
util.WaitFor(self._video_recorder.IsStarted, 5)
+ @property
+ def is_video_capture_running(self):
+ return self._video_recorder is not None
+
def StopVideoCapture(self):
- assert self._video_recorder, 'Must start video capture first'
+ assert self.is_video_capture_running, 'Must start video capture first'
self._video_recorder.Stop()
self._video_output = self._video_recorder.Pull()
self._video_recorder = None
« no previous file with comments | « tools/telemetry/telemetry/core/browser_unittest.py ('k') | tools/telemetry/telemetry/core/platform/platform_backend.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698