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

Unified Diff: build/android/pylib/monkey/test_runner.py

Issue 338353004: [Android] Switch KillAll, StartActivity, and BroadcastIntent to DeviceUtils. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: appeasing windows Created 6 years, 6 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 | « build/android/pylib/linker/test_case.py ('k') | build/android/pylib/perf/cache_control.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/monkey/test_runner.py
diff --git a/build/android/pylib/monkey/test_runner.py b/build/android/pylib/monkey/test_runner.py
index 5f0cc5dd2e36c1a9dda34bc74851a1b1f97ee530..42b7d41f116df21b353e416cf80fdfcbd7d5f04f 100644
--- a/build/android/pylib/monkey/test_runner.py
+++ b/build/android/pylib/monkey/test_runner.py
@@ -10,7 +10,7 @@ import random
from pylib import constants
from pylib.base import base_test_result
from pylib.base import base_test_runner
-
+from pylib.device import intent
class TestRunner(base_test_runner.BaseTestRunner):
"""A TestRunner instance runs a monkey test on a single device."""
@@ -51,9 +51,10 @@ class TestRunner(base_test_runner.BaseTestRunner):
Returns:
A tuple of (TestRunResults, retry).
"""
- self.device.old_interface.StartActivity(
- self._package, self._activity, wait_for_completion=True,
- action='android.intent.action.MAIN', force_stop=True)
+ self.device.StartActivity(
+ intent.Intent(package=self._package, activity=self._activity,
+ action='android.intent.action.MAIN'),
+ blocking=True, force_stop=True)
# Chrome crashes are not always caught by Monkey test runner.
# Verify Chrome has the same PID before and after the test.
« no previous file with comments | « build/android/pylib/linker/test_case.py ('k') | build/android/pylib/perf/cache_control.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698