Index: testing/android/junit/java/src/org/chromium/testing/local/JunitTestMain.java |
diff --git a/testing/android/junit/java/src/org/chromium/testing/local/JunitTestMain.java b/testing/android/junit/java/src/org/chromium/testing/local/JunitTestMain.java |
index d9c468d8470d5af2da99df76bb70f1ba043a69cf..3a305faff5f8dd6eb4abf8a0042acd0494b44d7c 100644 |
--- a/testing/android/junit/java/src/org/chromium/testing/local/JunitTestMain.java |
+++ b/testing/android/junit/java/src/org/chromium/testing/local/JunitTestMain.java |
@@ -76,10 +76,12 @@ public final class JunitTestMain { |
JunitTestArgParser parser = JunitTestArgParser.parse(args); |
JUnitCore core = new JUnitCore(); |
- GtestLogger logger = new GtestLogger(System.out); |
- core.addListener(new GtestListener(logger)); |
+ GtestLogger gtestLogger = new GtestLogger(System.out); |
+ core.addListener(new GtestListener(gtestLogger)); |
+ JsonLogger jsonLogger = new JsonLogger(parser.getJsonOutputFile()); |
+ core.addListener(new JsonListener(jsonLogger)); |
Class[] classes = findClassesFromClasspath(); |
- Request testRequest = Request.classes(new GtestComputer(logger), classes); |
+ Request testRequest = Request.classes(new GtestComputer(gtestLogger), classes); |
for (String packageFilter : parser.getPackageFilters()) { |
testRequest = testRequest.filterWith(new PackageFilter(packageFilter)); |
} |