| 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,81 @@
|
| options.put("args", ImmutableList.copyOf(args));
|
|
|
| List<String> extensions = Lists.newArrayListWithExpectedSize(
|
| +diff --git a/java/client/test/org/openqa/selenium/testing/drivers/ReflectionBackedDriverSupplier.java b/java/client/test/org/openqa/selenium/testing/drivers/ReflectionBackedDriverSupplier.java
|
| +index 3cc5799..7316a41 100644
|
| +--- a/java/client/test/org/openqa/selenium/testing/drivers/ReflectionBackedDriverSupplier.java
|
| ++++ b/java/client/test/org/openqa/selenium/testing/drivers/ReflectionBackedDriverSupplier.java
|
| +@@ -29,6 +29,7 @@
|
| + import org.openqa.selenium.WebDriver;
|
| + import org.openqa.selenium.firefox.FirefoxDriver;
|
| + import org.openqa.selenium.firefox.FirefoxProfile;
|
| ++import org.openqa.selenium.remote.Augmenter;
|
| + import org.openqa.selenium.remote.DesiredCapabilities;
|
| + import org.openqa.selenium.testing.InProject;
|
| +
|
| +@@ -76,7 +77,8 @@ public WebDriver get() {
|
| + }
|
| +
|
| + //TODO: Call constructor with two Capabilities arguments for all driver classes
|
| +- return driverClass.getConstructor(Capabilities.class).newInstance(desiredCapsToUse);
|
| ++ WebDriver d = driverClass.getConstructor(Capabilities.class).newInstance(desiredCapsToUse);
|
| ++ return new Augmenter().augment(d);
|
| + } catch (InvocationTargetException e) {
|
| + throw Throwables.propagate(e.getTargetException());
|
| + } catch (Exception e) {
|
| +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..c14b8fd 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,28 @@ 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", ".*");
|
| ++ String[] patternGroups = filter.split("-");
|
| ++ String[] positivePatterns = patternGroups[0].split(":");
|
| ++ String[] negativePatterns = new String[0];
|
| ++ if (patternGroups.length > 1)
|
| ++ negativePatterns = patternGroups[1].split(":");
|
| ++
|
| ++ for (int i = 0; i < negativePatterns.length; i++) {
|
| ++ if (name.matches(negativePatterns[i]))
|
| ++ return true;
|
| ++ }
|
| ++ for (int i = 0; i < positivePatterns.length; i++) {
|
| ++ if (name.matches(positivePatterns[i]))
|
| ++ return false;
|
| ++ }
|
| ++ return true;
|
| ++ }
|
| ++
|
| ++ // 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 +244,4 @@ private void addIgnoresForBrowser(Browser browser, IgnoreComparator comparator)
|
| + }
|
| + }
|
| +
|
| +-}
|
| +\ No newline at end of file
|
| ++}
|
|
|