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

Unified Diff: testing/android/appurify_support/java/src/org/chromium/test/support/RobotiumBundleGenerator.java

Issue 1982493002: [Android] Log uncaught Java exceptions when running native tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix findbugs warning Created 4 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
Index: testing/android/appurify_support/java/src/org/chromium/test/support/RobotiumBundleGenerator.java
diff --git a/testing/android/appurify_support/java/src/org/chromium/test/support/RobotiumBundleGenerator.java b/testing/android/appurify_support/java/src/org/chromium/test/support/RobotiumBundleGenerator.java
index e006954cfb2d9dedcab12dcfa3949b0562330a65..d102692db711f26ecc0f48bb7596016a9b1e5a8f 100644
--- a/testing/android/appurify_support/java/src/org/chromium/test/support/RobotiumBundleGenerator.java
+++ b/testing/android/appurify_support/java/src/org/chromium/test/support/RobotiumBundleGenerator.java
@@ -18,6 +18,11 @@ public class RobotiumBundleGenerator implements ResultsBundleGenerator {
private static final String TAG = "RobotiumBundleGenerator";
public Bundle generate(Map<String, ResultsBundleGenerator.TestResult> rawResults) {
+ Bundle resultsBundle = new Bundle();
+ if (rawResults.isEmpty()) {
+ return resultsBundle;
+ }
+
int testsPassed = 0;
int testsFailed = 0;
int testsErrored = 0;
@@ -53,7 +58,6 @@ public class RobotiumBundleGenerator implements ResultsBundleGenerator {
resultBuilder.append("\nOK (" + Integer.toString(testsPassed) + " tests)");
}
- Bundle resultsBundle = new Bundle();
resultsBundle.putString(Instrumentation.REPORT_KEY_STREAMRESULT,
resultBuilder.toString());
return resultsBundle;

Powered by Google App Engine
This is Rietveld 408576698