diff --git a/.buckconfig b/.buckconfig index d07e6d3066069..b9c497dd1fdf3 100644 --- a/.buckconfig +++ b/.buckconfig @@ -10,6 +10,7 @@ [test] # Maximum timeout of 1 minute per test. timeout = 60000 + run_transitive = false [alias] chrome = //java/client/src/org/openqa/selenium/chrome:chrome diff --git a/.buckjavaargs b/.buckjavaargs new file mode 100644 index 0000000000000..2f9a386658e90 --- /dev/null +++ b/.buckjavaargs @@ -0,0 +1 @@ +-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError diff --git a/.buckversion b/.buckversion index 601f1bb8c8011..f3d1677f70540 100644 --- a/.buckversion +++ b/.buckversion @@ -1 +1 @@ -8b7dbf7526c747d4d3a5197d8dc56877652cfcf1 +7b683678599070e55ff9b0f038f5b1375626dace diff --git a/java/client/src/com/thoughtworks/selenium/webdriven/BUCK b/java/client/src/com/thoughtworks/selenium/webdriven/BUCK index 0e765cbafa058..61338b27fec7c 100644 --- a/java/client/src/com/thoughtworks/selenium/webdriven/BUCK +++ b/java/client/src/com/thoughtworks/selenium/webdriven/BUCK @@ -12,19 +12,20 @@ java_library(name = 'webdriven', resources = [ 'htmlutils.js', 'injectableSelenium.js', - '//javascript/selenium-atoms:findElement', - '//javascript/selenium-atoms:findOption', - '//javascript/selenium-atoms:fireEvent', - '//javascript/selenium-atoms:fireEventAt', - '//javascript/selenium-atoms:getAttribute', - '//javascript/selenium-atoms:getText', - '//javascript/selenium-atoms:linkLocator', - '//javascript/selenium-atoms:isElementPresent', - '//javascript/selenium-atoms:isSomethingSelected', - '//javascript/selenium-atoms:isTextPresent', - '//javascript/selenium-atoms:isVisible', - '//javascript/selenium-atoms:type', - '//third_party/js/sizzle:sizzle', + ':findElement', + ':findOption', + ':fireEvent', + ':fireEventAt', + ':getAttribute', + ':getText', + ':linkLocator', + ':isElementPresent', + ':isSomethingSelected', + ':isTextPresent', + ':isVisible', + ':type', + # TODO(simons): remove sizzle. There are no longer any browsers that need it. + ':sizzle', ], exported_deps = [ ':emulation-api', @@ -37,6 +38,9 @@ java_library(name = 'webdriven', ], visibility = [ '//java/client/src/com/thoughtworks/selenium/...', + '//java/client/test/org/openqa/selenium/v1:tests', + '//java/client/test/org/openqa/selenium/v1/internal/seleniumemulation:LargeTests', + '//java/client/test/org/openqa/selenium/v1/internal/seleniumemulation:tests', ], ) @@ -56,5 +60,19 @@ java_library(name = 'emulation-api', ], visibility = [ '//java/client/src/com/thoughtworks/selenium/...', + '//java/client/test/org/openqa/selenium/v1/internal/seleniumemulation:tests', ], ) + +for name in ['findElement', 'findOption', 'fireEvent', 'fireEventAt', 'getAttribute', 'getText', + 'linkLocator', 'isElementPresent', 'isSomethingSelected', 'isTextPresent', + 'isVisible', 'type',]: + export_file(name = name, + out = '%s.js' % name, + src = '//javascript/selenium-atoms:%s' % name, + ) + +export_file(name = 'sizzle', + out = 'sizzle.js', + src = '//third_party/js/sizzle:sizzle', +) \ No newline at end of file diff --git a/java/client/src/org/openqa/selenium/BUCK b/java/client/src/org/openqa/selenium/BUCK index 764bc4889f1fc..aa241c4d068ac 100644 --- a/java/client/src/org/openqa/selenium/BUCK +++ b/java/client/src/org/openqa/selenium/BUCK @@ -35,8 +35,11 @@ java_library(name = 'core', 'Keys.java', 'OutputType.java', 'Proxy.java', + 'Rotatable.java', + 'ScreenOrientation.java', 'SearchContext.java', 'TakesScreenshot.java', + 'UnexpectedAlertBehaviour.java', 'WebDriver.java', 'WebElement.java', 'internal/Base64Encoder.java', @@ -95,12 +98,14 @@ java_library(name = 'exceptions', visibility = [ '//java/client/src/org/openqa/selenium/interactions:exceptions', '//java/client/src/org/openqa/selenium/io:io', + '//java/client/test/org/openqa/selenium/testing:helpers', ], ) java_library( name = 'platform', srcs = [ + 'Architecture.java', 'Platform.java', ], visibility = ['PUBLIC'], diff --git a/java/client/src/org/openqa/selenium/browserlaunchers/BUCK b/java/client/src/org/openqa/selenium/browserlaunchers/BUCK index 800080712e67a..a874dad95deda 100644 --- a/java/client/src/org/openqa/selenium/browserlaunchers/BUCK +++ b/java/client/src/org/openqa/selenium/browserlaunchers/BUCK @@ -12,5 +12,6 @@ java_library(name = 'proxies', '//java/client/src/org/openqa/selenium/firefox:firefox', '//java/client/src/org/openqa/selenium/htmlunit:htmlunit', '//java/client/src/org/openqa/selenium/remote:remote', + '//java/client/test/org/openqa/selenium:tests', ], ) diff --git a/java/client/src/org/openqa/selenium/chrome/BUCK b/java/client/src/org/openqa/selenium/chrome/BUCK index b446bbc54cc09..31859cf677e1f 100644 --- a/java/client/src/org/openqa/selenium/chrome/BUCK +++ b/java/client/src/org/openqa/selenium/chrome/BUCK @@ -12,4 +12,5 @@ java_library( '//third_party/java/guava-libraries:guava-libraries', '//third_party/java/json:json', ], + visibility = [ 'PUBLIC' ], ) diff --git a/java/client/src/org/openqa/selenium/ie/BUCK b/java/client/src/org/openqa/selenium/ie/BUCK new file mode 100644 index 0000000000000..31e8c85d2a9d3 --- /dev/null +++ b/java/client/src/org/openqa/selenium/ie/BUCK @@ -0,0 +1,11 @@ +java_library(name = 'ie', + srcs = glob(['*.java']), + deps = [ + '//java/client/src/org/openqa/selenium/net:net', + '//java/client/src/org/openqa/selenium/remote/service:service', + '//java/client/src/org/openqa/selenium/remote:remote', + '//java/client/src/org/openqa/selenium:webdriver-api', + '//third_party/java/guava-libraries:guava-libraries', + ], + visibility = [ 'PUBLIC' ], +) diff --git a/java/client/src/org/openqa/selenium/interactions/BUCK b/java/client/src/org/openqa/selenium/interactions/BUCK index cd6155a1fc8ca..18deb32bffc0b 100644 --- a/java/client/src/org/openqa/selenium/interactions/BUCK +++ b/java/client/src/org/openqa/selenium/interactions/BUCK @@ -1,7 +1,7 @@ java_library(name = 'interactions', srcs = [ 'Actions.java', - ] + glob(['*Action.java', 'internal/*Action.java']), + ] + glob(['*Action.java', 'internal/*Action.java', 'touch/*.java']), exported_deps = [ ':core', ':exceptions', diff --git a/java/client/src/org/openqa/selenium/os/BUCK b/java/client/src/org/openqa/selenium/os/BUCK index 6fecac7b33e3a..16986bacbed2a 100644 --- a/java/client/src/org/openqa/selenium/os/BUCK +++ b/java/client/src/org/openqa/selenium/os/BUCK @@ -10,6 +10,8 @@ java_library( visibility = [ '//java/client/src/org/openqa/selenium/firefox:firefox', '//java/client/src/org/openqa/selenium/remote/service:service', + '//java/client/test/org/openqa/selenium:tests', + '//java/client/test/org/openqa/selenium/testing/drivers:drivers', ], ) diff --git a/java/client/src/org/openqa/selenium/remote/BUCK b/java/client/src/org/openqa/selenium/remote/BUCK index e679f22e9a4f4..58ec024032793 100644 --- a/java/client/src/org/openqa/selenium/remote/BUCK +++ b/java/client/src/org/openqa/selenium/remote/BUCK @@ -45,6 +45,7 @@ java_library(name = 'remote', 'HttpVerb.java', 'JsonException.java', 'JsonToBeanConverter.java', + 'LocalFileDetector.java', 'RemoteExecuteMethod.java', 'RemoteKeyboard.java', 'RemoteLogs.java', diff --git a/java/client/test/org/openqa/selenium/BUCK b/java/client/test/org/openqa/selenium/BUCK index a02201215460a..43edc53e81465 100644 --- a/java/client/test/org/openqa/selenium/BUCK +++ b/java/client/test/org/openqa/selenium/BUCK @@ -1,3 +1,27 @@ +java_test(name = 'SmallTests', + srcs = [ + 'SmallTests.java', + ], + deps = [ + ':tests', + '//java/client/test/org/openqa/selenium/testing/drivers:SmallTests', + '//java/client/test/org/openqa/selenium/v1:SmallTests', + '//third_party/java/junit:junit', + ], +) + +java_library(name = 'annotations', + srcs = [ + 'NeedsFreshDriver.java', + 'NoDriverAfterTest.java', + ], + deps = [ + ], + visibility = [ + '//java/client/test/org/openqa/selenium/testing:test-base', + ], +) + java_library(name = 'doubles', srcs = [ 'StubDriver.java', @@ -10,4 +34,67 @@ java_library(name = 'doubles', '//java/client/test/...', '//java/server/test/...', ], +) + +java_library(name = 'helpers', + srcs = [ + 'Build.java', + 'Pages.java', + 'StubElement.java', + 'StubRenderedWebElement.java', + 'WaitingConditions.java', + ], + deps = [ + '//java/client/src/org/openqa/selenium:webdriver-api', + '//java/client/src/org/openqa/selenium/support/ui:wait', + '//java/client/test/org/openqa/selenium/environment:environment', + '//java/client/test/org/openqa/selenium/testing:helpers', + '//third_party/java/guava-libraries:guava-libraries', + '//third_party/java/junit:junit', + ], + visibility = [ + '//java/client/test/...', + '//java/server/test/...', + ], +) + +java_library(name = 'tests', + srcs = glob([ + '*Test.java', + 'internal/*Test.java', + 'interactions/*Test.java', + 'interactions/touch/*Test.java', + 'io/*Test.java', + 'logging/*.java', + 'net/*Test.java', + 'os/*Test.java',]) + + [ + 'Messages.java', + 'interactions/StubInputDeviceDriver.java', + 'interactions/touch/TouchTestBase.java', + 'net/StubNetworkInterfaceProvider.java', + ], + resources = [ + 'messages.properties', + ], + deps = [ + ':doubles', + ':helpers', + '//java/client/src/org/openqa/selenium:webdriver-api', + '//java/client/src/org/openqa/selenium/browserlaunchers:proxies', + '//java/client/src/org/openqa/selenium/ie:ie', + '//java/client/src/org/openqa/selenium/io:io', + '//java/client/src/org/openqa/selenium/net:net', + '//java/client/src/org/openqa/selenium/os:os', + '//java/client/src/org/openqa/selenium/remote:remote', + '//java/client/src/org/openqa/selenium/support:support', + '//java/client/src/org/openqa/selenium/support/ui:wait', + '//java/client/test/org/openqa/selenium/testing:test-base', + '//java/client/test/org/openqa/selenium/testing/drivers:drivers', + '//third_party/java/guava-libraries:guava-libraries', + '//third_party/java/hamcrest:hamcrest', + '//third_party/java/junit:junit', + '//third_party/java/mockito:mockito', + '//third_party/java/webbit:webbit', + ], ) \ No newline at end of file diff --git a/java/client/test/org/openqa/selenium/SmallTests.java b/java/client/test/org/openqa/selenium/SmallTests.java index b49a17589cd00..897bc8a4c7399 100644 --- a/java/client/test/org/openqa/selenium/SmallTests.java +++ b/java/client/test/org/openqa/selenium/SmallTests.java @@ -32,7 +32,7 @@ import org.openqa.selenium.net.NetworkUtilsTest; import org.openqa.selenium.os.CommandLineTest; import org.openqa.selenium.os.WindowsUtilsUnitTest; -import org.openqa.selenium.testing.IgnoreComparitorUnitTest; +import org.openqa.selenium.testing.drivers.IgnoreComparitorUnitTest; @RunWith(Suite.class) @Suite.SuiteClasses({ diff --git a/java/client/test/org/openqa/selenium/build.desc b/java/client/test/org/openqa/selenium/build.desc index 961a3c92bcab1..155f9ad095cf5 100644 --- a/java/client/test/org/openqa/selenium/build.desc +++ b/java/client/test/org/openqa/selenium/build.desc @@ -73,8 +73,8 @@ java_library(name = "tests", "//java/client/test/org/openqa/selenium/environment", "//java/client/test/org/openqa/selenium/testing:junit_4", "//java/client/test/org/openqa/selenium/testing:proxy", - "//java/client/test/org/openqa/selenium/testing:tests", "//java/client/test/org/openqa/selenium/testing:util", + "//java/client/test/org/openqa/selenium/testing/drivers:tests", "//java/client/test/org/openqa/selenium/v1:small_tests", "//third_party/java/commons-io", "//third_party/java/junit", diff --git a/java/client/test/org/openqa/selenium/environment/BUCK b/java/client/test/org/openqa/selenium/environment/BUCK new file mode 100644 index 0000000000000..8d2b6dad25e64 --- /dev/null +++ b/java/client/test/org/openqa/selenium/environment/BUCK @@ -0,0 +1,19 @@ +java_library(name = 'environment', + srcs = glob(['*.java', 'webserver/*.java'], excludes = ['**/*Test.java']), + deps = [ + '//java/client/src/org/openqa/selenium:webdriver-api', + '//java/client/src/org/openqa/selenium/io:io', + '//java/client/src/org/openqa/selenium/net:net', + '//java/client/test/org/openqa/selenium/testing:helpers', + '//third_party/java/apache-httpclient:apache-httpclient', + '//third_party/java/commons-fileupload:commons-fileupload', + '//third_party/java/guava-libraries:guava-libraries', + '//third_party/java/jetty:jetty', + '//third_party/java/servlet-api:servlet-api', + '//third_party/java/webbit:webbit', + ], + visibility = [ + '//java/client/test/org/openqa/selenium:helpers', + '//java/client/test/org/openqa/selenium/testing:test-base', + ], +) \ No newline at end of file diff --git a/java/client/test/org/openqa/selenium/support/build.desc b/java/client/test/org/openqa/selenium/support/build.desc index e46479ea7ed62..2b9d0d0647664 100644 --- a/java/client/test/org/openqa/selenium/support/build.desc +++ b/java/client/test/org/openqa/selenium/support/build.desc @@ -11,7 +11,6 @@ java_library(name = "tests", "//java/client/test/org/openqa/selenium/support/events:test", "//java/client/test/org/openqa/selenium/support/pagefactory:test", "//java/client/test/org/openqa/selenium/support/ui:test", - "//java/client/test/org/openqa/selenium/testing:tests", "//third_party/java/mockito", ]) diff --git a/java/client/test/org/openqa/selenium/testing/BUCK b/java/client/test/org/openqa/selenium/testing/BUCK new file mode 100644 index 0000000000000..051a994708631 --- /dev/null +++ b/java/client/test/org/openqa/selenium/testing/BUCK @@ -0,0 +1,62 @@ +java_library(name = 'annotations', + srcs = [ + 'Ignore.java', + 'JavascriptEnabled.java', + 'NativeEventsRequired.java', + 'NeedsLocalEnvironment.java', + ], + deps = [ + '//java/client/src/org/openqa/selenium:platform', + ], + visibility = [ + '//java/client/test/org/openqa/selenium/testing/drivers/...', + ], +) + +java_library(name = 'helpers', + srcs = [ + 'DevMode.java', + 'InProject.java', + ], + deps = [ + '//java/client/src/org/openqa/selenium:exceptions', + ], + visibility = [ + '//java/client/test/...', + '//java/server/test/...', + ], +) + +java_library(name = 'test-base', + srcs = [ + 'JUnit4TestBase.java', + 'ProxyServer.java', + 'SeleniumTestRunner.java', + 'TestUtilities.java', + ], + exported_deps = [ + ':annotations', + ':helpers', + '//java/client/test/org/openqa/selenium:annotations', + '//java/client/test/org/openqa/selenium:helpers', + '//java/client/test/org/openqa/selenium/testing/drivers:browser', + '//java/client/test/org/openqa/selenium/environment:environment', + ], + deps = [ + '//java/client/src/org/openqa/selenium:webdriver-api', + '//java/client/src/org/openqa/selenium/htmlunit:htmlunit', + '//java/client/src/org/openqa/selenium/net:net', + '//java/client/src/org/openqa/selenium/remote:remote', + '//java/client/src/org/openqa/selenium/support/ui:wait', + '//java/client/test/org/openqa/selenium/testing/drivers:drivers', + '//third_party/java/guava-libraries:guava-libraries', + '//third_party/java/hamcrest:hamcrest', + '//third_party/java/junit:junit', + '//third_party/java/little_proxy:little_proxy', + '//third_party/java/netty:netty', + ], + visibility = [ + '//java/client/test/...', + '//java/server/test/...', + ], +) diff --git a/java/client/test/org/openqa/selenium/testing/build.desc b/java/client/test/org/openqa/selenium/testing/build.desc index 9a5c0c7237d13..26f8ae42468ac 100644 --- a/java/client/test/org/openqa/selenium/testing/build.desc +++ b/java/client/test/org/openqa/selenium/testing/build.desc @@ -20,18 +20,6 @@ java_library(name = "annotations", "//java/client/src/org/openqa/selenium:base", ]) -java_library(name = "tests", - srcs = [ - "IgnoreComparitorUnitTest.java", - ], - deps = [ - ":junit", - ":junit_4", - "//third_party/java/guava-libraries", - "//third_party/java/junit", - "//third_party/java/mockito", - ]) - java_library(name = "dev_mode", srcs = [ "DevMode.java", @@ -48,7 +36,6 @@ java_library(name = "util", java_library(name = "junit", srcs = [ - "IgnoreComparator.java", "IgnoredTestCallback.java", ], deps = [ diff --git a/java/client/test/org/openqa/selenium/testing/drivers/BUCK b/java/client/test/org/openqa/selenium/testing/drivers/BUCK new file mode 100644 index 0000000000000..7502cb7dc9e0d --- /dev/null +++ b/java/client/test/org/openqa/selenium/testing/drivers/BUCK @@ -0,0 +1,59 @@ +java_library(name = 'browser', + srcs = [ + 'Browser.java', + ], + visibility = [ + '//java/client/test/...', + '//java/server/test/...', + ], +) + +java_library(name = 'drivers', + srcs = glob(['*Driver.java', '*Supplier.java',]) + [ + 'BrowserToCapabilities.java', + 'Firebug.java', + 'IgnoreComparator.java', + 'OutOfProcessSeleniumServer.java', + 'TestIgnorance.java', + 'WebDriverBuilder.java', + ], + deps = [ + ':browser', + '//java/client/src/org/openqa/selenium:webdriver-api', + '//java/client/src/org/openqa/selenium/chrome:chrome', + '//java/client/src/org/openqa/selenium/firefox:firefox', + '//java/client/src/org/openqa/selenium/ie:ie', + '//java/client/src/org/openqa/selenium/net:net', + '//java/client/src/org/openqa/selenium/os:os', + '//java/client/src/org/openqa/selenium/remote:remote', + '//java/client/src/org/openqa/selenium/remote/service:service', + '//java/client/test/org/openqa/selenium:helpers', + '//java/client/test/org/openqa/selenium/testing:annotations', + '//java/client/test/org/openqa/selenium/testing:helpers', + '//third_party/java/guava-libraries:guava-libraries', + '//third_party/java/junit:junit', + '//third_party/java/opera-driver:opera-driver', + '//third_party/java/phantomjs-driver:phantomjs-driver', + ], + visibility = [ + '//java/client/test/...', + '//java/server/test/...', + ], +) + +java_library(name = 'SmallTests', + srcs = [ + 'IgnoreComparitorUnitTest.java', + ], + deps = [ + ':drivers', + '//java/client/src/org/openqa/selenium:platform', + '//java/client/test/org/openqa/selenium/testing:annotations', + '//third_party/java/guava-libraries:guava-libraries', + '//third_party/java/junit:junit', + '//third_party/java/mockito:mockito', + ], + visibility = [ + '//java/client/test/org/openqa/selenium:SmallTests', + ] +) \ No newline at end of file diff --git a/java/client/test/org/openqa/selenium/testing/IgnoreComparator.java b/java/client/test/org/openqa/selenium/testing/drivers/IgnoreComparator.java similarity index 91% rename from java/client/test/org/openqa/selenium/testing/IgnoreComparator.java rename to java/client/test/org/openqa/selenium/testing/drivers/IgnoreComparator.java index 1025631bb021d..46e0f728480d0 100644 --- a/java/client/test/org/openqa/selenium/testing/IgnoreComparator.java +++ b/java/client/test/org/openqa/selenium/testing/drivers/IgnoreComparator.java @@ -16,17 +16,18 @@ */ -package org.openqa.selenium.testing; +package org.openqa.selenium.testing.drivers; import com.google.common.collect.Sets; import org.openqa.selenium.Platform; +import org.openqa.selenium.testing.Ignore; import org.openqa.selenium.testing.Ignore.Driver; import java.util.Set; public class IgnoreComparator { - private Set ignored = Sets.newHashSet(); + private Set ignored = Sets.newHashSet(); private Platform currentPlatform = Platform.getCurrent(); // TODO(simon): reduce visibility diff --git a/java/client/test/org/openqa/selenium/testing/IgnoreComparitorUnitTest.java b/java/client/test/org/openqa/selenium/testing/drivers/IgnoreComparitorUnitTest.java similarity index 96% rename from java/client/test/org/openqa/selenium/testing/IgnoreComparitorUnitTest.java rename to java/client/test/org/openqa/selenium/testing/drivers/IgnoreComparitorUnitTest.java index 4d3ff594a7e75..790da09e8619c 100644 --- a/java/client/test/org/openqa/selenium/testing/IgnoreComparitorUnitTest.java +++ b/java/client/test/org/openqa/selenium/testing/drivers/IgnoreComparitorUnitTest.java @@ -16,7 +16,7 @@ */ -package org.openqa.selenium.testing; +package org.openqa.selenium.testing.drivers; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; @@ -30,7 +30,9 @@ import org.junit.Before; import org.junit.Test; import org.openqa.selenium.Platform; +import org.openqa.selenium.testing.Ignore; import org.openqa.selenium.testing.Ignore.Driver; +import org.openqa.selenium.testing.drivers.IgnoreComparator; import java.util.Set; 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 badbc747a7dd2..57625bf8bf2b5 100644 --- a/java/client/test/org/openqa/selenium/testing/drivers/TestIgnorance.java +++ b/java/client/test/org/openqa/selenium/testing/drivers/TestIgnorance.java @@ -44,7 +44,6 @@ import org.junit.runners.model.FrameworkMethod; import org.openqa.selenium.Platform; import org.openqa.selenium.testing.Ignore; -import org.openqa.selenium.testing.IgnoreComparator; import org.openqa.selenium.testing.JavascriptEnabled; import org.openqa.selenium.testing.NativeEventsRequired; import org.openqa.selenium.testing.NeedsLocalEnvironment; diff --git a/java/client/test/org/openqa/selenium/testing/drivers/build.desc b/java/client/test/org/openqa/selenium/testing/drivers/build.desc index 4c8c9bca20470..a0950ad2db919 100644 --- a/java/client/test/org/openqa/selenium/testing/drivers/build.desc +++ b/java/client/test/org/openqa/selenium/testing/drivers/build.desc @@ -7,6 +7,7 @@ java_library(name = "drivers", "BrowserToCapabilities.java", "Firebug.java", "LocallyBuiltInternetExplorerDriver.java", + "IgnoreComparator.java", "SauceDriver.java", "SynthesizedFirefoxDriver.java", "TestChromeDriver.java", @@ -42,3 +43,16 @@ java_library(name = "test_selenium_server", "//java/server/src/org/openqa/grid/selenium:selenium", "//java/server/src/org/openqa/grid/selenium:selenium:classpath", ]) + +java_library(name = "tests", + srcs = [ + "IgnoreComparitorUnitTest.java", + ], + deps = [ + ":drivers", + "//java/client/src/org/openqa/selenium:base", + "//java/client/test/org/openqa/selenium/testing:annotations", + "//third_party/java/guava-libraries", + "//third_party/java/junit", + "//third_party/java/mockito", + ]) diff --git a/java/client/test/org/openqa/selenium/v1/BUCK b/java/client/test/org/openqa/selenium/v1/BUCK new file mode 100644 index 0000000000000..fa5f1f2ff58fb --- /dev/null +++ b/java/client/test/org/openqa/selenium/v1/BUCK @@ -0,0 +1,29 @@ +java_library(name = 'tests', + srcs = [ + 'FastWebDriverBackedSeleniumTest.java', + 'WebDriverCommandProcessorTest.java', + ], + deps = [ + '//java/client/src/com/thoughtworks/selenium:selenium', + '//java/client/src/com/thoughtworks/selenium/webdriven:webdriven', + '//java/client/src/org/openqa/selenium:webdriver-api', + '//java/client/test/org/openqa/selenium:doubles', + '//third_party/java/guava-libraries:guava-libraries', + '//third_party/java/junit:junit', + '//third_party/java/mockito:mockito', + ], +) + +java_test(name = 'SmallTests', + srcs = [ + 'SmallTests.java', + ], + deps = [ + ':tests', + '//java/client/test/org/openqa/selenium/v1/internal/seleniumemulation:SmallTests', + '//third_party/java/junit:junit', + ], + visibility = [ + '//java/client/test/org/openqa/selenium:SmallTests', + ], +) diff --git a/java/client/test/org/openqa/selenium/v1/SmallTests.java b/java/client/test/org/openqa/selenium/v1/SmallTests.java index 512357857f36a..951a58db8116d 100644 --- a/java/client/test/org/openqa/selenium/v1/SmallTests.java +++ b/java/client/test/org/openqa/selenium/v1/SmallTests.java @@ -27,5 +27,4 @@ org.openqa.selenium.v1.internal.seleniumemulation.SmallTests.class }) public class SmallTests { - } diff --git a/java/client/test/org/openqa/selenium/v1/internal/seleniumemulation/BUCK b/java/client/test/org/openqa/selenium/v1/internal/seleniumemulation/BUCK new file mode 100644 index 0000000000000..2732c5aba8aad --- /dev/null +++ b/java/client/test/org/openqa/selenium/v1/internal/seleniumemulation/BUCK @@ -0,0 +1,37 @@ +java_test(name = 'LargeTests', + srcs = [ + 'ScriptMutatorTest.java', + ], + deps = [ + '//java/client/src/com/thoughtworks/selenium/webdriven:webdriven', + '//java/client/src/com/thoughtworks/selenium:selenium', + '//java/client/src/org/openqa/selenium:webdriver-api', + '//java/client/test/org/openqa/selenium/testing:test-base', + '//third_party/java/guava-libraries:guava-libraries', + '//third_party/java/junit:junit', + ], +) + +java_test(name = 'SmallTests', + srcs = [ + 'SmallTests.java', + ], + deps = [ + ':tests', + '//third_party/java/junit:junit', + ], + visibility = [ + '//java/client/test/org/openqa/selenium/v1:SmallTests', + ], +) + +java_library(name = 'tests', + srcs = glob(['*Test.java'], excludes = ['ScriptMutatorTest.java',]), + deps = [ + '//java/client/src/com/thoughtworks/selenium/webdriven:emulation-api', + '//java/client/src/com/thoughtworks/selenium/webdriven:webdriven', + '//java/client/src/com/thoughtworks/selenium:api', + '//java/client/src/org/openqa/selenium:webdriver-api', + '//third_party/java/junit:junit', + ], +) diff --git a/javascript/selenium-atoms/BUCK b/javascript/selenium-atoms/BUCK index 22d15eff63a34..f7972fb73a4dc 100644 --- a/javascript/selenium-atoms/BUCK +++ b/javascript/selenium-atoms/BUCK @@ -29,82 +29,82 @@ js_fragment(name = 'findElement', module = 'core.locators', function = 'core.locators.findElement', deps = [':deps'], - visibility = [ '//java/client/src/com/thoughtworks/selenium/webdriven:webdriven' ], + visibility = [ '//java/client/src/com/thoughtworks/selenium/webdriven:findElement' ], ) js_fragment(name = 'findOption', module = 'core.select.option', function = 'core.select.option.findOption', deps = [':deps'], - visibility = [ '//java/client/src/com/thoughtworks/selenium/webdriven:webdriven' ], + visibility = [ '//java/client/src/com/thoughtworks/selenium/webdriven:findOption' ], ) js_fragment(name = 'fireEvent', module = 'core.events', function = 'core.events.fire', deps = [':deps'], - visibility = [ '//java/client/src/com/thoughtworks/selenium/webdriven:webdriven' ], + visibility = [ '//java/client/src/com/thoughtworks/selenium/webdriven:fireEvent' ], ) js_fragment(name = 'fireEventAt', module = 'core.events', function = 'core.events.fireAt', deps = [':deps'], - visibility = [ '//java/client/src/com/thoughtworks/selenium/webdriven:webdriven' ], + visibility = [ '//java/client/src/com/thoughtworks/selenium/webdriven:fireEventAt' ], ) js_fragment(name = 'getAttribute', module = 'core.element', function = 'core.element.getAttribute', deps = [':deps'], - visibility = [ '//java/client/src/com/thoughtworks/selenium/webdriven:webdriven' ], + visibility = [ '//java/client/src/com/thoughtworks/selenium/webdriven:getAttribute' ], ) js_fragment(name = 'getText', module = 'core.text.getText', function = 'core.text.getText', deps = [':deps'], - visibility = [ '//java/client/src/com/thoughtworks/selenium/webdriven:webdriven' ], + visibility = [ '//java/client/src/com/thoughtworks/selenium/webdriven:getText' ], ) js_fragment(name = 'linkLocator', module = 'core.text', function = 'core.text.linkLocator', deps = [':deps'], - visibility = [ '//java/client/src/com/thoughtworks/selenium/webdriven:webdriven' ], + visibility = [ '//java/client/src/com/thoughtworks/selenium/webdriven:linkLocator' ], ) js_fragment(name = 'isSomethingSelected', module = 'core.select', function = 'core.select.isSomethingSelected', deps = [':deps'], - visibility = [ '//java/client/src/com/thoughtworks/selenium/webdriven:webdriven' ], + visibility = [ '//java/client/src/com/thoughtworks/selenium/webdriven:isSomethingSelected' ], ) js_fragment(name = 'isElementPresent', module = 'core.locators', function = 'core.locators.isElementPresent', deps = [':deps'], - visibility = [ '//java/client/src/com/thoughtworks/selenium/webdriven:webdriven' ], + visibility = [ '//java/client/src/com/thoughtworks/selenium/webdriven:isElementPresent' ], ) js_fragment(name = 'isTextPresent', module = 'core.text', function = 'core.text.isTextPresent', deps = [':deps'], - visibility = [ '//java/client/src/com/thoughtworks/selenium/webdriven:webdriven' ], + visibility = [ '//java/client/src/com/thoughtworks/selenium/webdriven:isTextPresent' ], ) js_fragment(name = 'isVisible', module = 'core.browserbot', function = 'core.browserbot.isVisible', deps = [':deps'], - visibility = [ '//java/client/src/com/thoughtworks/selenium/webdriven:webdriven' ], + visibility = [ '//java/client/src/com/thoughtworks/selenium/webdriven:isVisible' ], ) js_fragment(name = 'type', module = 'core.events', function = 'core.events.setValue', deps = [':deps'], - visibility = [ '//java/client/src/com/thoughtworks/selenium/webdriven:webdriven' ], + visibility = [ '//java/client/src/com/thoughtworks/selenium/webdriven:type' ], ) diff --git a/third_party/java/commons-el/BUCK b/third_party/java/commons-el/BUCK new file mode 100644 index 0000000000000..151bf7fc78490 --- /dev/null +++ b/third_party/java/commons-el/BUCK @@ -0,0 +1,7 @@ +prebuilt_jar(name = 'commons-el', + binary_jar = 'commons-el-1.0.jar', + visibility = [ + '//third_party/java/jasper:jasper', + '//third_party/java/jetty:jetty', + ], +) diff --git a/third_party/java/commons-exec/BUCK b/third_party/java/commons-exec/BUCK index 3543e02862bd7..3f1d1c59e6b2d 100644 --- a/third_party/java/commons-exec/BUCK +++ b/third_party/java/commons-exec/BUCK @@ -3,5 +3,6 @@ prebuilt_jar( binary_jar = 'commons-exec-1.1.jar', visibility = [ '//java/client/src/org/openqa/selenium/os:os', + '//third_party/java/opera-driver:opera-driver', ], ) diff --git a/third_party/java/commons-fileupload/BUCK b/third_party/java/commons-fileupload/BUCK new file mode 100644 index 0000000000000..65ae721c89eb3 --- /dev/null +++ b/third_party/java/commons-fileupload/BUCK @@ -0,0 +1,6 @@ +prebuilt_jar(name = 'commons-fileupload', + binary_jar = 'commons-fileupload-1.2.2.jar', + visibility = [ + '//java/client/test/org/openqa/selenium/environment:environment', + ], +) diff --git a/third_party/java/commons-jxpath/BUCK b/third_party/java/commons-jxpath/BUCK new file mode 100644 index 0000000000000..6f14a6bd3ae6a --- /dev/null +++ b/third_party/java/commons-jxpath/BUCK @@ -0,0 +1,8 @@ + +prebuilt_jar(name = 'commons-jxpath', + binary_jar = 'commons-jxpath-1.3.jar', + visibility = [ + '//third_party/java/opera-driver:opera-driver', + ], +) + diff --git a/third_party/java/commons_cli/BUCK b/third_party/java/commons_cli/BUCK new file mode 100644 index 0000000000000..feab1da27e175 --- /dev/null +++ b/third_party/java/commons_cli/BUCK @@ -0,0 +1,7 @@ + +prebuilt_jar(name = 'commons_cli', + binary_jar = 'commons-cli-1.2.jar', + visibility = [ + '//third_party/java/little_proxy:little_proxy', + ], +) diff --git a/third_party/java/dnsjava/BUCK b/third_party/java/dnsjava/BUCK new file mode 100644 index 0000000000000..83a3832850a70 --- /dev/null +++ b/third_party/java/dnsjava/BUCK @@ -0,0 +1,6 @@ +prebuilt_jar(name = 'dnsjava', + binary_jar = 'dnsjava-2.1.3.jar', + visibility = [ + '//third_party/java/little_proxy:little_proxy', + ], +) diff --git a/third_party/java/dnssec4j/BUCK b/third_party/java/dnssec4j/BUCK new file mode 100644 index 0000000000000..f1d46f7c322b8 --- /dev/null +++ b/third_party/java/dnssec4j/BUCK @@ -0,0 +1,6 @@ +prebuilt_jar(name = 'dnssec4j', + binary_jar = 'dnssec4j-0.1-SNAPSHOT.jar', + visibility = [ + '//third_party/java/little_proxy:little_proxy', + ], +) diff --git a/third_party/java/ehcache/BUCK b/third_party/java/ehcache/BUCK new file mode 100644 index 0000000000000..96a44e5febdb2 --- /dev/null +++ b/third_party/java/ehcache/BUCK @@ -0,0 +1,9 @@ +prebuilt_jar(name = 'ehcache', + binary_jar = 'ehcache-core-2.5.2.jar', + deps = [ + '//third_party/java/slf4j:slf4j', + ], + visibility = [ + '//third_party/java/little_proxy:little_proxy', + ], +) diff --git a/third_party/java/google-protobuffers/BUCK b/third_party/java/google-protobuffers/BUCK new file mode 100644 index 0000000000000..0982cccd7f005 --- /dev/null +++ b/third_party/java/google-protobuffers/BUCK @@ -0,0 +1,7 @@ + +prebuilt_jar(name = 'google-protobuffers', + binary_jar = 'protobuf-java-2.4.1.jar', + visibility = [ + '//third_party/java/opera-driver:opera-driver', + ], +) diff --git a/third_party/java/ini4j/BUCK b/third_party/java/ini4j/BUCK new file mode 100644 index 0000000000000..df49e82340e71 --- /dev/null +++ b/third_party/java/ini4j/BUCK @@ -0,0 +1,6 @@ +prebuilt_jar(name = 'ini4j', + binary_jar = 'ini4j-0.5.2.jar', + visibility = [ + '//third_party/java/opera-driver:opera-driver', + ], +) diff --git a/third_party/java/jasper/BUCK b/third_party/java/jasper/BUCK new file mode 100644 index 0000000000000..1db62ab45f7c3 --- /dev/null +++ b/third_party/java/jasper/BUCK @@ -0,0 +1,29 @@ +java_library(name = "jasper", + deps = [ + ':compiler', + ':compiler-jdt', + ':jsp-api', + ':runtime', + '//third_party/java/commons-el:commons-el', + ], + visibility = [ + '//java/client/test/org/openqa/selenium/environment:environment', + '//third_party/java/jetty:jetty', + ], +) + +prebuilt_jar(name = 'compiler', + binary_jar = 'jasper-compiler-5.5.15.jar', +) + +prebuilt_jar(name = 'compiler-jdt', + binary_jar = 'jasper-compiler-jdt-5.5.15.jar', +) + +prebuilt_jar(name = 'runtime', + binary_jar = 'jasper-runtime-5.5.15.jar', +) + +prebuilt_jar(name = 'jsp-api', + binary_jar = 'jsp-api-2.0.jar', +) diff --git a/third_party/java/jetty/BUCK b/third_party/java/jetty/BUCK new file mode 100644 index 0000000000000..1283248ac3332 --- /dev/null +++ b/third_party/java/jetty/BUCK @@ -0,0 +1,20 @@ +prebuilt_jar(name = 'jetty', + binary_jar = 'jetty-repacked-7.6.1.jar', + deps = [ + '//third_party/java/jasper:jasper', + '//third_party/java/servlet-api:servlet-api', + ], + visibility = [ + '//java/client/test/org/openqa/selenium/environment:environment', + ], +) + +prebuilt_jar(name = 'jetty-for-rc', + binary_jar = 'jetty-repacked-5.jar', + deps = [ + '//third_party/java/commons-logging:commons-logging', + '//third_party/java/jasper:jasper', + '//third_party/java/mx4j:mx4j', + '//third_party/java/servlet-api:servlet-api', + ], +) diff --git a/third_party/java/junit/BUCK b/third_party/java/junit/BUCK index 1164335e3936a..793551f3def38 100644 --- a/third_party/java/junit/BUCK +++ b/third_party/java/junit/BUCK @@ -1,5 +1,8 @@ prebuilt_jar(name = 'junit', binary_jar = 'junit-dep-4.11.jar', source_jar = 'junit-4.11-src.jar', + deps = [ + '//third_party/java/hamcrest:hamcrest', + ], visibility = ['PUBLIC'], ) diff --git a/third_party/java/little_proxy/BUCK b/third_party/java/little_proxy/BUCK new file mode 100644 index 0000000000000..8fe9422bb1d6d --- /dev/null +++ b/third_party/java/little_proxy/BUCK @@ -0,0 +1,18 @@ +prebuilt_jar(name = 'little_proxy', + binary_jar = 'littleproxy-0.5.3.jar', + deps = [ + '//third_party/java/commons_cli:commons_cli', + '//third_party/java/commons-codec:commons-codec', + '//third_party/java/commons-lang:commons-lang', + '//third_party/java/commons-io:commons-io', + '//third_party/java/dnsjava:dnsjava', + '//third_party/java/dnssec4j:dnssec4j', + '//third_party/java/ehcache:ehcache', + '//third_party/java/netty:netty', + ], + visibility = [ + '//java/client/test/org/openqa/selenium/testing:test-base', + ], +) + + diff --git a/third_party/java/netty/BUCK b/third_party/java/netty/BUCK new file mode 100644 index 0000000000000..944f5f738ea4e --- /dev/null +++ b/third_party/java/netty/BUCK @@ -0,0 +1,8 @@ +prebuilt_jar(name = 'netty', + binary_jar = 'netty-3.5.7.Final.jar', + visibility = [ + '//java/client/test/org/openqa/selenium/testing:test-base', + '//third_party/java/little_proxy:little_proxy', + '//third_party/java/webbit:webbit', + ], +) diff --git a/third_party/java/opera-driver/BUCK b/third_party/java/opera-driver/BUCK new file mode 100644 index 0000000000000..5536447faf6e9 --- /dev/null +++ b/third_party/java/opera-driver/BUCK @@ -0,0 +1,15 @@ +prebuilt_jar(name = 'opera-driver', + binary_jar = 'operadriver-1.5.jar', + deps = [ + '//java/client/src/org/openqa/selenium/remote:remote', + '//java/client/src/org/openqa/selenium/support:support', + '//third_party/java/commons-exec:commons-exec', + '//third_party/java/commons-jxpath:commons-jxpath', + '//third_party/java/google-protobuffers:google-protobuffers', + '//third_party/java/guava-libraries:guava-libraries', + '//third_party/java/ini4j:ini4j', + ], + visibility = [ + '//java/client/test/org/openqa/selenium/testing/drivers:drivers', + ], +) diff --git a/third_party/java/phantomjs-driver/BUCK b/third_party/java/phantomjs-driver/BUCK new file mode 100644 index 0000000000000..387b2a6c1bae5 --- /dev/null +++ b/third_party/java/phantomjs-driver/BUCK @@ -0,0 +1,9 @@ +prebuilt_jar(name = 'phantomjs-driver', + binary_jar = 'phantomjsdriver-1.1.0.jar', + deps = [ + '//java/client/src/org/openqa/selenium/remote:remote', + ], + visibility = [ + '//java/client/test/org/openqa/selenium/testing/drivers:drivers', + ], +) diff --git a/third_party/java/servlet-api/BUCK b/third_party/java/servlet-api/BUCK new file mode 100644 index 0000000000000..f0c81386204f3 --- /dev/null +++ b/third_party/java/servlet-api/BUCK @@ -0,0 +1,7 @@ +prebuilt_jar(name = 'servlet-api', + binary_jar = 'servlet-api-2.5-6.1.9.jar', + visibility = [ + '//java/client/test/org/openqa/selenium/environment:environment', + '//third_party/java/jetty:jetty', + ], +) diff --git a/third_party/java/slf4j/BUCK b/third_party/java/slf4j/BUCK new file mode 100644 index 0000000000000..444a53737d568 --- /dev/null +++ b/third_party/java/slf4j/BUCK @@ -0,0 +1,20 @@ + +java_library(name = 'slf4j', + exported_deps = [ + ':api', + ], + deps = [ + ':jdk14', + ], + visibility = [ + '//third_party/java/ehcache:ehcache', + ], +) + +prebuilt_jar(name = 'api', + binary_jar = 'slf4j-api-1.6.6.jar', +) + +prebuilt_jar(name = 'jdk14', + binary_jar = 'slf4j-jdk14-1.6.6.jar', +) diff --git a/third_party/java/webbit/BUCK b/third_party/java/webbit/BUCK new file mode 100644 index 0000000000000..e425edfbffe97 --- /dev/null +++ b/third_party/java/webbit/BUCK @@ -0,0 +1,11 @@ +prebuilt_jar(name = 'webbit', + binary_jar = 'webbit-0.4.15.jar', + deps = [ + '//third_party/java/netty:netty', + ], + visibility = [ + '//java/client/test/org/openqa/selenium/environment:environment', + '//java/client/test/org/openqa/selenium:tests', + ], +) + diff --git a/third_party/js/sizzle/BUCK b/third_party/js/sizzle/BUCK index b79bdbc6499aa..4d7eed0413b74 100644 --- a/third_party/js/sizzle/BUCK +++ b/third_party/js/sizzle/BUCK @@ -2,5 +2,5 @@ export_file(name = 'sizzle', src = 'sizzle.js', out = 'sizzle.js', - visibility = [ '//java/client/src/com/thoughtworks/selenium/webdriven:webdriven' ], + visibility = [ '//java/client/src/com/thoughtworks/selenium/webdriven:sizzle' ], )