[Android] Don't rely on INJECT_EVENTS exception for dismissing dialogs.
The failure could manifest in other ways. For example some tests downstream assert whether activity has focus. BUG=None R=dfalcantara@chromium.org Review URL: https://codereview.chromium.org/115473002 git-svn-id: http://src.chromium.org/svn/trunk/src/build@240755 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
Родитель
1e1b1c6294
Коммит
47ef6f9876
|
@ -340,17 +340,16 @@ class TestRunner(base_test_runner.BaseTestRunner):
|
|||
duration_ms = int(time.time()) * 1000 - start_date_ms
|
||||
status_code = raw_result.GetStatusCode()
|
||||
if status_code:
|
||||
result_type = base_test_result.ResultType.FAIL
|
||||
if self.options.screenshot_failures:
|
||||
self._TakeScreenshot(test)
|
||||
log = raw_result.GetFailureReason()
|
||||
if not log:
|
||||
log = 'No information.'
|
||||
elif log.find('INJECT_EVENTS perm') >= 0:
|
||||
package = self.adb.DismissCrashDialogIfNeeded()
|
||||
# Assume test package convention of ".test" suffix
|
||||
if package and package in self.test_pkg.GetPackageName():
|
||||
result_type = base_test_result.ResultType.CRASH
|
||||
result_type = base_test_result.ResultType.FAIL
|
||||
package = self.adb.DismissCrashDialogIfNeeded()
|
||||
# Assume test package convention of ".test" suffix
|
||||
if package and package in self.test_pkg.GetPackageName():
|
||||
result_type = base_test_result.ResultType.CRASH
|
||||
result = test_result.InstrumentationTestResult(
|
||||
test, result_type, start_date_ms, duration_ms, log=log)
|
||||
else:
|
||||
|
|
Загрузка…
Ссылка в новой задаче