aboutsummaryrefslogtreecommitdiff
path: root/testrunner
diff options
context:
space:
mode:
authorGravatar Rogan Creswick <creswick@gmail.com>2012-09-02 14:10:01 -0700
committerGravatar Rogan Creswick <creswick@gmail.com>2012-09-02 14:10:01 -0700
commita8664102395dc9c899428ea6e31a64ff6f22046e (patch)
treea1d764b3983ff385d59d2d2fad8c9ccda4e78495 /testrunner
parent172992b50a44417ec758ba79b25026c700961e4b (diff)
refactored the java-based apps: testrunner, rstester, batch-executor
Diffstat (limited to 'testrunner')
-rw-r--r--testrunner/.buildpath3
-rw-r--r--testrunner/.classpath124
-rw-r--r--testrunner/.project46
-rw-r--r--testrunner/.settings/org.ebayopensource.vjet.eclipse.core.prefs2
-rw-r--r--testrunner/.settings/org.eclipse.jdt.core.prefs13
-rw-r--r--testrunner/pom.xml5
-rw-r--r--testrunner/src/main/java/com/galois/fiveui/testrunner/Drivers.java116
-rw-r--r--testrunner/src/test/java/com/galois/fiveui/chrome/ChromeOptionsTest.java2
-rw-r--r--testrunner/src/test/java/com/galois/fiveui/chrome/RuleEvaluationTest.java2
-rw-r--r--testrunner/src/test/java/com/galois/fiveui/firefox/FirefoxExtensionRunsTest.java2
-rw-r--r--testrunner/src/test/java/com/galois/fiveui/testrunner/JSRunner.java1
11 files changed, 61 insertions, 255 deletions
diff --git a/testrunner/.buildpath b/testrunner/.buildpath
new file mode 100644
index 0000000..a187add
--- /dev/null
+++ b/testrunner/.buildpath
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<buildpath>
+</buildpath>
diff --git a/testrunner/.classpath b/testrunner/.classpath
index e2c0988..0a1dadd 100644
--- a/testrunner/.classpath
+++ b/testrunner/.classpath
@@ -1,100 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src/test/java" output="target/test-classes" including="**/*.java"/>
- <classpathentry kind="src" path="src/main/java" including="**/*.java"/>
- <classpathentry kind="output" path="target/classes"/>
- <classpathentry kind="var" path="M2_REPO/cglib/cglib-nodep/2.1_3/cglib-nodep-2.1_3.jar" sourcepath="M2_REPO/cglib/cglib-nodep/2.1_3/cglib-nodep-2.1_3-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/commons-codec/commons-codec/1.4/commons-codec-1.4.jar" sourcepath="M2_REPO/commons-codec/commons-codec/1.4/commons-codec-1.4-sources.jar">
- <attributes>
- <attribute value="jar:file:/home/creswick/.m2/repository/commons-codec/commons-codec/1.4/commons-codec-1.4-javadoc.jar!/" name="javadoc_location"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar" sourcepath="M2_REPO/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1-sources.jar">
- <attributes>
- <attribute value="jar:file:/home/creswick/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1-javadoc.jar!/" name="javadoc_location"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/org/apache/commons/commons-exec/1.1/commons-exec-1.1.jar" sourcepath="M2_REPO/org/apache/commons/commons-exec/1.1/commons-exec-1.1-sources.jar">
- <attributes>
- <attribute value="jar:file:/home/creswick/.m2/repository/org/apache/commons/commons-exec/1.1/commons-exec-1.1-javadoc.jar!/" name="javadoc_location"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/commons-io/commons-io/2.0.1/commons-io-2.0.1.jar" sourcepath="M2_REPO/commons-io/commons-io/2.0.1/commons-io-2.0.1-sources.jar">
- <attributes>
- <attribute value="jar:file:/home/creswick/.m2/repository/commons-io/commons-io/2.0.1/commons-io-2.0.1-javadoc.jar!/" name="javadoc_location"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.6/commons-lang-2.6.jar" sourcepath="M2_REPO/commons-lang/commons-lang/2.6/commons-lang-2.6-sources.jar">
- <attributes>
- <attribute value="jar:file:/home/creswick/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6-javadoc.jar!/" name="javadoc_location"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar" sourcepath="M2_REPO/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1-sources.jar">
- <attributes>
- <attribute value="jar:file:/home/creswick/.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1-javadoc.jar!/" name="javadoc_location"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/net/sourceforge/cssparser/cssparser/0.9.5/cssparser-0.9.5.jar" sourcepath="M2_REPO/net/sourceforge/cssparser/cssparser/0.9.5/cssparser-0.9.5-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/google/guava/guava/10.0.1/guava-10.0.1.jar" sourcepath="M2_REPO/com/google/guava/guava/10.0.1/guava-10.0.1-sources.jar">
- <attributes>
- <attribute value="jar:file:/home/creswick/.m2/repository/com/google/guava/guava/10.0.1/guava-10.0.1-javadoc.jar!/" name="javadoc_location"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1.jar" sourcepath="M2_REPO/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/net/sourceforge/htmlunit/htmlunit/2.9/htmlunit-2.9.jar" sourcepath="M2_REPO/net/sourceforge/htmlunit/htmlunit/2.9/htmlunit-2.9-sources.jar">
- <attributes>
- <attribute value="jar:file:/home/creswick/.m2/repository/net/sourceforge/htmlunit/htmlunit/2.9/htmlunit-2.9-javadoc.jar!/" name="javadoc_location"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/net/sourceforge/htmlunit/htmlunit-core-js/2.9/htmlunit-core-js-2.9.jar" sourcepath="M2_REPO/net/sourceforge/htmlunit/htmlunit-core-js/2.9/htmlunit-core-js-2.9-sources.jar">
- <attributes>
- <attribute value="jar:file:/home/creswick/.m2/repository/net/sourceforge/htmlunit/htmlunit-core-js/2.9/htmlunit-core-js-2.9-javadoc.jar!/" name="javadoc_location"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpclient/4.1.2/httpclient-4.1.2.jar" sourcepath="M2_REPO/org/apache/httpcomponents/httpclient/4.1.2/httpclient-4.1.2-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpcore/4.1.2/httpcore-4.1.2.jar" sourcepath="M2_REPO/org/apache/httpcomponents/httpcore/4.1.2/httpcore-4.1.2-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpmime/4.1.2/httpmime-4.1.2.jar" sourcepath="M2_REPO/org/apache/httpcomponents/httpmime/4.1.2/httpmime-4.1.2-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/mortbay/jetty/jetty/6.1H.22/jetty-6.1H.22.jar" sourcepath="M2_REPO/org/mortbay/jetty/jetty/6.1H.22/jetty-6.1H.22-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/mortbay/jetty/jetty-util/6.1H.22/jetty-util-6.1H.22.jar" sourcepath="M2_REPO/org/mortbay/jetty/jetty-util/6.1H.22/jetty-util-6.1H.22-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/net/java/dev/jna/jna/3.4.0/jna-3.4.0.jar" sourcepath="M2_REPO/net/java/dev/jna/jna/3.4.0/jna-3.4.0-sources.jar">
- <attributes>
- <attribute value="jar:file:/home/creswick/.m2/repository/net/java/dev/jna/jna/3.4.0/jna-3.4.0-javadoc.jar!/" name="javadoc_location"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/org/json/json/20080701/json-20080701.jar" sourcepath="M2_REPO/org/json/json/20080701/json-20080701-sources.jar">
- <attributes>
- <attribute value="jar:file:/home/creswick/.m2/repository/org/json/json/20080701/json-20080701-javadoc.jar!/" name="javadoc_location"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar"/>
- <classpathentry kind="var" path="M2_REPO/junit/junit/4.9/junit-4.9.jar" sourcepath="M2_REPO/junit/junit/4.9/junit-4.9-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/net/sourceforge/nekohtml/nekohtml/1.9.15/nekohtml-1.9.15.jar" sourcepath="M2_REPO/net/sourceforge/nekohtml/nekohtml/1.9.15/nekohtml-1.9.15-sources.jar">
- <attributes>
- <attribute value="jar:file:/home/creswick/.m2/repository/net/sourceforge/nekohtml/nekohtml/1.9.15/nekohtml-1.9.15-javadoc.jar!/" name="javadoc_location"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/org/jboss/netty/netty/3.2.7.Final/netty-3.2.7.Final.jar" sourcepath="M2_REPO/org/jboss/netty/netty/3.2.7.Final/netty-3.2.7.Final-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/net/java/dev/jna/platform/3.4.0/platform-3.4.0.jar" sourcepath="M2_REPO/net/java/dev/jna/platform/3.4.0/platform-3.4.0-sources.jar">
- <attributes>
- <attribute value="jar:file:/home/creswick/.m2/repository/net/java/dev/jna/platform/3.4.0/platform-3.4.0-javadoc.jar!/" name="javadoc_location"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/org/w3c/css/sac/1.3/sac-1.3.jar" sourcepath="M2_REPO/org/w3c/css/sac/1.3/sac-1.3-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-android-driver/2.25.0/selenium-android-driver-2.25.0.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-android-driver/2.25.0/selenium-android-driver-2.25.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-api/2.25.0/selenium-api-2.25.0.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-api/2.25.0/selenium-api-2.25.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-chrome-driver/2.25.0/selenium-chrome-driver-2.25.0.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-chrome-driver/2.25.0/selenium-chrome-driver-2.25.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-firefox-driver/2.25.0/selenium-firefox-driver-2.25.0.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-firefox-driver/2.25.0/selenium-firefox-driver-2.25.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-htmlunit-driver/2.25.0/selenium-htmlunit-driver-2.25.0.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-htmlunit-driver/2.25.0/selenium-htmlunit-driver-2.25.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-ie-driver/2.25.0/selenium-ie-driver-2.25.0.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-ie-driver/2.25.0/selenium-ie-driver-2.25.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-iphone-driver/2.25.0/selenium-iphone-driver-2.25.0.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-iphone-driver/2.25.0/selenium-iphone-driver-2.25.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-java/2.25.0/selenium-java-2.25.0.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-java/2.25.0/selenium-java-2.25.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-remote-driver/2.25.0/selenium-remote-driver-2.25.0.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-remote-driver/2.25.0/selenium-remote-driver-2.25.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-safari-driver/2.25.0/selenium-safari-driver-2.25.0.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-safari-driver/2.25.0/selenium-safari-driver-2.25.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-support/2.25.0/selenium-support-2.25.0.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-support/2.25.0/selenium-support-2.25.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/xalan/serializer/2.7.1/serializer-2.7.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/mortbay/jetty/servlet-api/2.5-20081211/servlet-api-2.5-20081211.jar" sourcepath="M2_REPO/org/mortbay/jetty/servlet-api/2.5-20081211/servlet-api-2.5-20081211-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/webbitserver/webbit/0.4.6/webbit-0.4.6.jar" sourcepath="M2_REPO/org/webbitserver/webbit/0.4.6/webbit-0.4.6-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/xalan/xalan/2.7.1/xalan-2.7.1.jar" sourcepath="M2_REPO/xalan/xalan/2.7.1/xalan-2.7.1-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis/1.3.04/xml-apis-1.3.04.jar" sourcepath="M2_REPO/xml-apis/xml-apis/1.3.04/xml-apis-1.3.04-sources.jar"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-</classpath> \ No newline at end of file
+ <classpathentry kind="src" output="target/classes" path="src/main/java">
+ <attributes>
+ <attribute name="optional" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java">
+ <attributes>
+ <attribute name="optional" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/testrunner/.project b/testrunner/.project
index 3ec58f5..50cd2c6 100644
--- a/testrunner/.project
+++ b/testrunner/.project
@@ -1,25 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>testrunner</name>
- <comment>NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
- <projects/>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- </buildCommand>
- <buildCommand>
- <name>edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder</name>
- </buildCommand>
- <buildCommand>
- <name>org.maven.ide.eclipse.maven2Builder</name>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.m2e.core.maven2Builder</name>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.m2e.core.maven2Nature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.maven.ide.eclipse.maven2Nature</nature>
- <nature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</nature>
- </natures>
-</projectDescription> \ No newline at end of file
+ <name>testrunner</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ </natures>
+</projectDescription>
diff --git a/testrunner/.settings/org.ebayopensource.vjet.eclipse.core.prefs b/testrunner/.settings/org.ebayopensource.vjet.eclipse.core.prefs
new file mode 100644
index 0000000..6e8a644
--- /dev/null
+++ b/testrunner/.settings/org.ebayopensource.vjet.eclipse.core.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+initialized_project_from_v4classpath=true
diff --git a/testrunner/.settings/org.eclipse.jdt.core.prefs b/testrunner/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index be4b762..0000000
--- a/testrunner/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,13 +0,0 @@
-#Fri Jan 20 09:37:14 PST 2012
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/testrunner/pom.xml b/testrunner/pom.xml
index de311d9..87caf41 100644
--- a/testrunner/pom.xml
+++ b/testrunner/pom.xml
@@ -80,5 +80,10 @@
<artifactId>jetty</artifactId>
<version>6.1H.22</version>
</dependency>
+ <dependency>
+ <groupId>com.galois.fiveui</groupId>
+ <artifactId>webdrivers</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </dependency>
</dependencies>
</project>
diff --git a/testrunner/src/main/java/com/galois/fiveui/testrunner/Drivers.java b/testrunner/src/main/java/com/galois/fiveui/testrunner/Drivers.java
deleted file mode 100644
index 34e2acb..0000000
--- a/testrunner/src/main/java/com/galois/fiveui/testrunner/Drivers.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/**
- * Module : Drivers.java
- * Copyright : (c) 2011-2012, Galois, Inc.
- *
- * Maintainer :
- * Stability : Provisional
- * Portability: Portable
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.galois.fiveui.testrunner;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.openqa.selenium.browserlaunchers.locators.FirefoxLocator;
-import org.openqa.selenium.chrome.ChromeDriver;
-import org.openqa.selenium.chrome.ChromeOptions;
-import org.openqa.selenium.firefox.FirefoxBinary;
-import org.openqa.selenium.firefox.FirefoxDriver;
-import org.openqa.selenium.firefox.FirefoxProfile;
-
-/**
- * @author creswick
- *
- */
-public class Drivers {
- private static final String CD_BINARY_NAME = "chromedriver";
- private static final String CD_BASE_PATH =
- mkPath("..", "tools", "seleniumChromeDrivers");
-
- public static FirefoxDriver buildFFDriver() {
- // Extracted into a method so we can set up profiles
-
- File profileDir = new File("../profiles/firefox/");
- FirefoxProfile profile = new FirefoxProfile(profileDir);
- File fiveuiXpi = new File("../contexts/fiveui.xpi");
- try {
- profile.addExtension(fiveuiXpi);
- } catch (IOException e) {
- System.err.println("could not load firefox with FiveUI");
- e.printStackTrace();
- }
-
- String ffBinaryPath = System.getProperty("FIREFOX_BIN_PATH");
-
- FirefoxDriver driver;
- if (null == ffBinaryPath) {
- System.err.println("WARNING: Running essentially random version of FireFox!");
- System.err.println(" set a path to firefox with -DFIREFOX_BIN_PATH=<path to firefox>");
- driver = new FirefoxDriver(profile);
- } else {
- FirefoxBinary binary = new FirefoxBinary(new File(ffBinaryPath));
- driver = new FirefoxDriver(binary, profile);
- }
-
- return driver;
- }
-
- public static ChromeDriver buildChromeDriver() {
- // set the chrome driver path:
- String chromeDriverPth = mkPath(CD_BASE_PATH, osNameArch(), CD_BINARY_NAME);
- System.setProperty("webdriver.chrome.driver", chromeDriverPth);
-
- // setting the path to chrome also seems to cause issues:
- ChromeOptions options = new ChromeOptions();
- options.addArguments("--user-data-dir=../profiles/chrome"); // , "--enable-logging", "--v=1");
- options.addExtensions(new File("../contexts/fiveui.crx"));
- // options.setBinary(new File("/usr/bin/google-chrome"));
-
- // For use with ChromeDriver:
- return new ChromeDriver(options);
- //return new ChromeDriver();
- }
-
- private static String mkPath(String... components) {
- StringBuilder path = new StringBuilder();
- int remaining = components.length;
- for (String c : components) {
- path.append(c);
- remaining--;
- if (remaining != 0) {
- path.append(File.separator);
- }
- }
-
- return path.toString();
- }
-
- /**
- * Determine the name of the directory that the chromedriver is in, based on os.name and os.arch.
- *
- * @return The name of the directory containing 'chromedriver'
- */
- private static String osNameArch() {
- String rawOsName = System.getProperty("os.name").toLowerCase();
- String osName = rawOsName.substring(0,3);
- boolean is64bit = System.getProperty("os.arch").indexOf("64") >= 0;
-
- if (osName.equals("lin")) {
- osName += is64bit ? "64" : "32";
- }
- return osName;
- }
-
-}
diff --git a/testrunner/src/test/java/com/galois/fiveui/chrome/ChromeOptionsTest.java b/testrunner/src/test/java/com/galois/fiveui/chrome/ChromeOptionsTest.java
index 6d380e0..677987c 100644
--- a/testrunner/src/test/java/com/galois/fiveui/chrome/ChromeOptionsTest.java
+++ b/testrunner/src/test/java/com/galois/fiveui/chrome/ChromeOptionsTest.java
@@ -34,7 +34,7 @@ import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.support.ui.WebDriverWait;
-import com.galois.fiveui.testrunner.Drivers;
+import com.galois.fiveui.drivers.Drivers;
import com.galois.fiveui.testrunner.FiveUINav;
import com.google.common.base.Predicate;
import com.google.common.collect.ImmutableMap;
diff --git a/testrunner/src/test/java/com/galois/fiveui/chrome/RuleEvaluationTest.java b/testrunner/src/test/java/com/galois/fiveui/chrome/RuleEvaluationTest.java
index d9540a1..0acab88 100644
--- a/testrunner/src/test/java/com/galois/fiveui/chrome/RuleEvaluationTest.java
+++ b/testrunner/src/test/java/com/galois/fiveui/chrome/RuleEvaluationTest.java
@@ -35,7 +35,7 @@ import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
-import com.galois.fiveui.testrunner.Drivers;
+import com.galois.fiveui.drivers.Drivers;
import com.galois.fiveui.testrunner.FileServer;
import com.galois.fiveui.testrunner.FiveUINav;
import com.google.common.base.Predicate;
diff --git a/testrunner/src/test/java/com/galois/fiveui/firefox/FirefoxExtensionRunsTest.java b/testrunner/src/test/java/com/galois/fiveui/firefox/FirefoxExtensionRunsTest.java
index a10daa0..a30e3fd 100644
--- a/testrunner/src/test/java/com/galois/fiveui/firefox/FirefoxExtensionRunsTest.java
+++ b/testrunner/src/test/java/com/galois/fiveui/firefox/FirefoxExtensionRunsTest.java
@@ -30,7 +30,7 @@ import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
-import com.galois.fiveui.testrunner.Drivers;
+import com.galois.fiveui.drivers.Drivers;
public class FirefoxExtensionRunsTest {
static FirefoxDriver _driver;
diff --git a/testrunner/src/test/java/com/galois/fiveui/testrunner/JSRunner.java b/testrunner/src/test/java/com/galois/fiveui/testrunner/JSRunner.java
index 00b7010..0fbd4c1 100644
--- a/testrunner/src/test/java/com/galois/fiveui/testrunner/JSRunner.java
+++ b/testrunner/src/test/java/com/galois/fiveui/testrunner/JSRunner.java
@@ -34,6 +34,7 @@ import org.junit.runner.notification.RunNotifier;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
+import com.galois.fiveui.drivers.Drivers;
import com.google.common.collect.ImmutableMap;
/**