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

Unified Diff: patch.diff

Issue 13688002: [chromedriver] Update Java tests to latest selenium release, 2.31. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/webdriver/
Patch Set: Created 7 years, 9 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
« README.chromium ('K') | « common.zip ('k') | test-standalone.jar » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
++}
« README.chromium ('K') | « common.zip ('k') | test-standalone.jar » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698