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

Unified Diff: build/android/pylib/uiautomator/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: 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
Index: build/android/pylib/uiautomator/test_runner.py
diff --git a/build/android/pylib/uiautomator/test_runner.py b/build/android/pylib/uiautomator/test_runner.py
index a7f06df325198ad3759285346380674eeca27e62..3046f330c91dcafbd8fcb6249e4a9e1be22adda7 100644
--- a/build/android/pylib/uiautomator/test_runner.py
+++ b/build/android/pylib/uiautomator/test_runner.py
@@ -6,6 +6,7 @@
from pylib import constants
from pylib import flag_changer
+from pylib.device import intent
from pylib.instrumentation import test_options as instr_test_options
from pylib.instrumentation import test_runner as instr_test_runner
@@ -64,10 +65,11 @@ class TestRunner(instr_test_runner.TestRunner):
self.flags.RemoveFlags(['--disable-fre'])
else:
self.flags.AddFlags(['--disable-fre'])
- 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(action='android.intent.action.MAIN',
+ activity=self._activity,
+ package=self._package),
+ blocking=True,
+ force_stop=True)
return self.device.old_interface.RunUIAutomatorTest(
test, self.test_pkg.GetPackageName(), timeout)

Powered by Google App Engine
This is Rietveld 408576698