| Index: testing/android/junit/java/src/org/chromium/testing/local/JunitTestArgParser.java
 | 
| diff --git a/testing/android/junit/java/src/org/chromium/testing/local/JunitTestArgParser.java b/testing/android/junit/java/src/org/chromium/testing/local/JunitTestArgParser.java
 | 
| index 9de7874dc7db37ffd3d1babc321c8f7702e569fc..20c5a657b5b81bab12f2104d76204fdd6114f87e 100644
 | 
| --- a/testing/android/junit/java/src/org/chromium/testing/local/JunitTestArgParser.java
 | 
| +++ b/testing/android/junit/java/src/org/chromium/testing/local/JunitTestArgParser.java
 | 
| @@ -4,17 +4,23 @@
 | 
|  
 | 
|  package org.chromium.testing.local;
 | 
|  
 | 
| +import java.io.File;
 | 
|  import java.util.HashSet;
 | 
|  import java.util.Set;
 | 
| +import java.util.regex.Pattern;
 | 
|  
 | 
|  /**
 | 
|   *  Parses command line arguments for JunitTestMain.
 | 
|   */
 | 
|  public class JunitTestArgParser {
 | 
|  
 | 
| +    private static final Pattern COLON = Pattern.compile(":");
 | 
| +
 | 
|      private final Set<String> mPackageFilters;
 | 
|      private final Set<Class<?>> mRunnerFilters;
 | 
|      private final Set<String> mGtestFilters;
 | 
| +    private File mJsonOutput;
 | 
| +    private String[] mTestJars;
 | 
|  
 | 
|      public static JunitTestArgParser parse(String[] args) {
 | 
|  
 | 
| @@ -38,6 +44,12 @@ public class JunitTestArgParser {
 | 
|                      } else if ("gtest-filter".equals(argName)) {
 | 
|                          // Read the command line argument after the flag.
 | 
|                          parsed.addGtestFilter(args[++i]);
 | 
| +                    } else if ("json-results-file".equals(argName)) {
 | 
| +                        // Read the command line argument after the flag.
 | 
| +                        parsed.setJsonOutputFile(args[++i]);
 | 
| +                    } else if ("test-jars".equals(argName)) {
 | 
| +                        // Read the command line argument after the flag.
 | 
| +                        parsed.setTestJars(args[++i]);
 | 
|                      } else {
 | 
|                          System.out.println("Ignoring flag: \"" + argName + "\"");
 | 
|                      }
 | 
| @@ -60,6 +72,7 @@ public class JunitTestArgParser {
 | 
|          mPackageFilters = new HashSet<String>();
 | 
|          mRunnerFilters = new HashSet<Class<?>>();
 | 
|          mGtestFilters = new HashSet<String>();
 | 
| +        mJsonOutput = null;
 | 
|      }
 | 
|  
 | 
|      public Set<String> getPackageFilters() {
 | 
| @@ -74,6 +87,14 @@ public class JunitTestArgParser {
 | 
|          return mGtestFilters;
 | 
|      }
 | 
|  
 | 
| +    public File getJsonOutputFile() {
 | 
| +        return mJsonOutput;
 | 
| +    }
 | 
| +
 | 
| +    public String[] getTestJars() {
 | 
| +        return mTestJars;
 | 
| +    }
 | 
| +
 | 
|      private void addPackageFilter(String packageFilter) {
 | 
|          mPackageFilters.add(packageFilter);
 | 
|      }
 | 
| @@ -86,5 +107,11 @@ public class JunitTestArgParser {
 | 
|          mGtestFilters.add(gtestFilter);
 | 
|      }
 | 
|  
 | 
| -}
 | 
| +    private void setJsonOutputFile(String path) {
 | 
| +        mJsonOutput = new File(path);
 | 
| +    }
 | 
|  
 | 
| +    private void setTestJars(String jars) {
 | 
| +        mTestJars = COLON.split(jars);
 | 
| +    }
 | 
| +}
 | 
| 
 |