[Android] Set permissions when clearing app state in test runner platform mode.

BUG=609226

Review-Url: https://codereview.chromium.org/1952813002
Cr-Original-Commit-Position: refs/heads/master@{#392871}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7b6552417873165924fd7f62cc428fe5e6b12dc1
This commit is contained in:
rnephew 2016-05-11 00:22:12 -07:00 коммит произвёл Commit bot
Родитель 3c875b5c73
Коммит 14fc8b6da6
1 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -268,7 +268,13 @@ class LocalDeviceInstrumentationTestRun(
logging.info(' %s', l)
if (not self._env.skip_clear_data
and self._test_instance.package_info):
device.ClearApplicationState(self._test_instance.package_info.package)
permissions = (
self._test_instance.apk_under_test.GetPermissions()
if self._test_instance.apk_under_test
else None)
device.ClearApplicationState(self._test_instance.package_info.package,
permissions=permissions)
else:
logging.debug('raw output from %s:', test_display_name)
for l in output: