Chromium Code Reviews| Index: patch.diff |
| =================================================================== |
| --- patch.diff (revision 192389) |
| +++ patch.diff (working copy) |
| @@ -1,23 +1,8 @@ |
| -Index: java/client/test/org/openqa/selenium/testing/drivers/TestChromeDriver.java |
| -=================================================================== |
| ---- java/client/test/org/openqa/selenium/testing/drivers/TestChromeDriver.java (revision 17049) |
| -+++ java/client/test/org/openqa/selenium/testing/drivers/TestChromeDriver.java (working copy) |
| -@@ -74,6 +74,10 @@ |
| - if (chromePath != null) { |
| - options.setBinary(new File(chromePath)); |
| - } |
| -+ String androidPackage = System.getProperty("webdriver.chrome.android_package"); |
| -+ if (androidPackage != null) { |
| -+ options.setAndroidPackage(androidPackage); |
| -+ } |
| - |
| - DesiredCapabilities capabilities = DesiredCapabilities.chrome(); |
| - capabilities.setCapability(ChromeOptions.CAPABILITY, options); |
| -Index: java/client/src/org/openqa/selenium/chrome/ChromeOptions.java |
| -=================================================================== |
| ---- java/client/src/org/openqa/selenium/chrome/ChromeOptions.java (revision 17049) |
| -+++ java/client/src/org/openqa/selenium/chrome/ChromeOptions.java (working copy) |
| -@@ -65,6 +65,7 @@ |
| +diff --git a/java/client/src/org/openqa/selenium/chrome/ChromeOptions.java b/java/client/src/org/openqa/selenium/chrome/ChromeOptions.java |
| +index 322ca9f..bb3918b 100644 |
| +--- a/java/client/src/org/openqa/selenium/chrome/ChromeOptions.java |
| ++++ b/java/client/src/org/openqa/selenium/chrome/ChromeOptions.java |
| +@@ -71,6 +71,7 @@ |
| public static final String CAPABILITY = "chromeOptions"; |
| private File binary; |
| @@ -25,7 +10,7 @@ |
| private List<String> args = Lists.newArrayList(); |
| private List<File> extensionFiles = Lists.newArrayList(); |
| private Map<String, Object> experimentalOptions = Maps.newHashMap(); |
| -@@ -81,6 +82,16 @@ |
| +@@ -87,6 +88,16 @@ public void setBinary(File path) { |
| } |
| /** |
| @@ -42,7 +27,7 @@ |
| * @param arguments The arguments to use when starting Chrome. |
| * @see #addArguments(java.util.List) |
| */ |
| -@@ -147,6 +158,10 @@ |
| +@@ -165,6 +176,10 @@ public JSONObject toJson() throws IOException, JSONException { |
| options.put("binary", binary.getPath()); |
| } |
| @@ -53,3 +38,70 @@ |
| options.put("args", ImmutableList.copyOf(args)); |
| List<String> extensions = Lists.newArrayListWithExpectedSize( |
| +diff --git a/java/client/test/keystore b/java/client/test/keystore |
| +deleted file mode 100644 |
| +index 92040cd..0000000 |
| +Binary files a/java/client/test/keystore and /dev/null differ |
| +diff --git a/java/client/test/org/openqa/selenium/testing/drivers/TestChromeDriver.java b/java/client/test/org/openqa/selenium/testing/drivers/TestChromeDriver.java |
| +index e8a1c22..1629284 100644 |
| +--- a/java/client/test/org/openqa/selenium/testing/drivers/TestChromeDriver.java |
| ++++ b/java/client/test/org/openqa/selenium/testing/drivers/TestChromeDriver.java |
| +@@ -73,6 +73,10 @@ private static DesiredCapabilities chromeWithCustomCapabilities( |
| + if (chromePath != null) { |
| + options.setBinary(new File(chromePath)); |
| + } |
| ++ String androidPackage = System.getProperty("webdriver.chrome.android_package"); |
| ++ if (androidPackage != null) { |
| ++ options.setAndroidPackage(androidPackage); |
| ++ } |
| + |
| + DesiredCapabilities capabilities = DesiredCapabilities.chrome(); |
| + capabilities.setCapability(ChromeOptions.CAPABILITY, options); |
| +diff --git a/java/client/test/org/openqa/selenium/testing/drivers/TestIgnorance.java b/java/client/test/org/openqa/selenium/testing/drivers/TestIgnorance.java |
| +index 587cea0..91545ed 100644 |
| +--- a/java/client/test/org/openqa/selenium/testing/drivers/TestIgnorance.java |
| ++++ b/java/client/test/org/openqa/selenium/testing/drivers/TestIgnorance.java |
| +@@ -93,8 +93,35 @@ public boolean isIgnored(AnnotatedElement element) { |
| + return ignored; |
| + } |
| + |
| +- // JUnit 4 |
| + public boolean isIgnored(FrameworkMethod method, Object test) { |
| ++ String name = test.getClass().getSimpleName() + "." + method.getName(); |
| ++ String filter = System.getProperty("filter", ".*"); |
|
chrisgao (Use stgao instead)
2013/04/05 15:41:09
I think it is OK to create the positive/negative p
kkania
2013/04/05 17:31:26
keeping it here; it doesn't really matter, as you
|
| ++ String[] patternGroups = filter.split("-"); |
| ++ String[] positivePatterns = patternGroups[0].split(":"); |
| ++ String[] negativePatterns = new String[0]; |
| ++ if (patternGroups.length > 1) |
| ++ negativePatterns = patternGroups[1].split(":"); |
| ++ |
| ++ boolean positive = false; |
| ++ for (int i = 0; i < positivePatterns.length; i++) { |
|
chrisgao (Use stgao instead)
2013/04/05 15:41:09
Test against negative patterns and then the positi
kkania
2013/04/05 17:31:26
Done.
|
| ++ if (name.matches(positivePatterns[i])) { |
| ++ positive = true; |
| ++ break; |
| ++ } |
| ++ } |
| ++ if (!positive) |
| ++ return true; |
| ++ |
| ++ for (int i = 0; i < negativePatterns.length; i++) { |
| ++ if (name.matches(negativePatterns[i])) { |
| ++ return true; |
| ++ } |
| ++ } |
| ++ return false; |
| ++ } |
| ++ |
| ++ // JUnit 4 |
| ++ public boolean isIgnoredOld(FrameworkMethod method, Object test) { |
| + boolean ignored = ignoreComparator.shouldIgnore(test.getClass().getAnnotation(Ignore.class)) || |
| + ignoreComparator.shouldIgnore(method.getMethod().getAnnotation(Ignore.class)); |
| + |
| +@@ -224,4 +251,4 @@ private void addIgnoresForBrowser(Browser browser, IgnoreComparator comparator) |
| + } |
| + } |
| + |
| +-} |
| +\ No newline at end of file |
| ++} |