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

Unified Diff: chrome/test/vr/perf/latency/android_webvr_latency_test.py

Issue 2904583003: Support multiple URLs for latency testing (Closed)
Patch Set: Fix adb startup message appearing in device name Created 3 years, 7 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 | « no previous file | chrome/test/vr/perf/latency/robot_arm.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/vr/perf/latency/android_webvr_latency_test.py
diff --git a/chrome/test/vr/perf/latency/android_webvr_latency_test.py b/chrome/test/vr/perf/latency/android_webvr_latency_test.py
index 18dc58aed81f8b3af99ede34808b8fa06e2acd97..6608dc5b4b3685d0bc6ef786eb7a393997e1c201 100644
--- a/chrome/test/vr/perf/latency/android_webvr_latency_test.py
+++ b/chrome/test/vr/perf/latency/android_webvr_latency_test.py
@@ -18,10 +18,15 @@ class AndroidWebVrLatencyTest(webvr_latency_test.WebVrLatencyTest):
"""Android implementation of the WebVR latency test."""
def __init__(self, args):
super(AndroidWebVrLatencyTest, self).__init__(args)
+ # Swarming stuff seems to routinely kill off adbd once a minute or so,
+ # which often causes adb's startup message to appear in the output. We need
+ # to remove this before getting the device name
+ # TODO(bsheedy): Look into preventing adbd from being killed altogether
+ # instead of working around it
self._device_name = self._Adb(['shell', 'getprop',
- 'ro.product.name']).strip()
+ 'ro.product.name']).strip().split('\n')[-1]
- def _Setup(self):
+ def _OneTimeSetup(self):
self._Adb(['root'])
# Install the latest VrCore and Chrome APKs
@@ -40,11 +45,13 @@ class AndroidWebVrLatencyTest(webvr_latency_test.WebVrLatencyTest):
self._Adb(['shell', 'input', 'keyevent', 'KEYCODE_WAKEUP'])
time.sleep(1)
+
+ def _Setup(self, url):
# Start Chrome
self._Adb(['shell', 'am', 'start',
'-a', 'android.intent.action.MAIN',
'-n', 'org.chromium.chrome/com.google.android.apps.chrome.Main',
- self._flicker_app_url])
+ url])
time.sleep(10)
# Tap the center of the screen to start presenting.
@@ -71,6 +78,10 @@ class AndroidWebVrLatencyTest(webvr_latency_test.WebVrLatencyTest):
# Exit VR and close Chrome
self._Adb(['shell', 'input', 'keyevent', 'KEYCODE_BACK'])
self._Adb(['shell', 'am', 'force-stop', 'org.chromium.chrome'])
+
+ def _OneTimeTeardown(self):
+ # Perform teardown again in case an exception was thrown
+ self._Teardown()
# Turn off the screen
self._Adb(['shell', 'input', 'keyevent', 'KEYCODE_POWER'])
« no previous file with comments | « no previous file | chrome/test/vr/perf/latency/robot_arm.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698