Skip to content

Commit

Permalink
java: remove support for Presto-based Opera
Browse files Browse the repository at this point in the history
This removes support for running tests for Presto-based Opera from
Selenium. This means Presto-based Operas are unsupported for Selenium,
but not that the existing OperaDriver will not run using existing
Selenium technology.
  • Loading branch information
andreastt committed Feb 28, 2015
1 parent cf2aefb commit 45afa32
Show file tree
Hide file tree
Showing 89 changed files with 290 additions and 870 deletions.
9 changes: 0 additions & 9 deletions .idea/libraries/commons_jxpath.xml

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/libraries/google_protobuffers.xml

This file was deleted.

11 changes: 0 additions & 11 deletions .idea/libraries/operadriver.xml

This file was deleted.

2 changes: 0 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,6 @@ if (!mac?)
task :test_firefox => [ "//java/client/test/org/openqa/selenium/firefox:test_native:run" ]
end
task :test_opera => [ "//java/client/test/org/openqa/selenium/opera:test_blink:run" ]
task :test_operapresto => [ "//java/client/test/org/openqa/selenium/opera:test_presto:run" ]
task :test_opera_mobile => [ "//java/client/test/org/openqa/selenium/opera/mobile:test:run" ]
task :test_remote_server => [ '//java/server/test/org/openqa/selenium/remote/server:test:run' ]
task :test_remote => [
'//java/client/test/org/openqa/selenium/remote:common-tests:run',
Expand Down
3 changes: 0 additions & 3 deletions java/client/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<classpathentry kind="lib" path="/third-party/java/jetty/jetty-repacked-7.6.1.jar" sourcepath="/third-party/java/jetty/jetty-repacked-7.6.1-sources.jar"/>
<classpathentry kind="lib" path="/third-party/java/cglib/cglib-nodep-2.1_3.jar"/>
<classpathentry kind="lib" path="/third-party/java/servlet-api/servlet-api-2.5-6.1.9.jar" sourcepath="/third-party/java/servlet-api/servlet-api-2.5-6.1.9-sources.jar"/>
<classpathentry kind="lib" path="/third-party/java/opera-driver/operadriver-1.5.jar"/>
<classpathentry kind="lib" path="/third-party/java/phantomjs-driver/phantomjsdriver-1.2.1.jar" sourcepath="/third-party/java/phantomjs-driver/phantomjsdriver-1.2.1-sources.jar"/>
<classpathentry kind="lib" path="/third-party/java/apache-httpclient/httpclient-4.3.6.jar" sourcepath="/third-party/java/apache-httpclient/httpclient-4.3.6-sources.jar"/>
<classpathentry kind="lib" path="/third-party/java/apache-httpclient/httpcore-4.3.3.jar" sourcepath="/third-party/java/apache-httpclient/httpcore-4.3.3-sources.jar"/>
Expand All @@ -35,8 +34,6 @@
<classpathentry kind="lib" path="/third-party/java/little_proxy/littleproxy-0.5.3.jar" sourcepath="/third-party/java/little_proxy/littleproxy-0.5.3-sources.jar"/>
<classpathentry kind="lib" path="/third-party/java/nekohtml/nekohtml-1.9.21.jar"/>
<classpathentry kind="lib" path="/third-party/java/netty/netty-3.5.7.Final.jar"/>
<classpathentry kind="lib" path="/third-party/java/google-protobuffers/protobuf-java-2.4.1.jar"/>
<classpathentry kind="lib" path="/third-party/java/commons-jxpath/commons-jxpath-1.3.jar"/>
<classpathentry kind="lib" path="/third-party/java/xml/xml-apis-1.4.01.jar"/>
<classpathentry kind="lib" path="/third-party/java/mockito/mockito-core-1.9.5.jar"/>
<classpathentry kind="lib" path="/third-party/java/objenesis/objenesis-1.0.jar"/>
Expand Down
2 changes: 0 additions & 2 deletions java/client/client.iml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@
<orderEntry type="library" name="commons-fileupload" level="project" />
<orderEntry type="library" name="commons-httpclient" level="project" />
<orderEntry type="library" name="commons-io" level="project" />
<orderEntry type="library" name="commons-jxpath" level="project" />
<orderEntry type="library" scope="RUNTIME" name="commons-lang" level="project" />
<orderEntry type="library" scope="RUNTIME" name="commons-logging" level="project" />
<orderEntry type="library" scope="RUNTIME" name="cssparser" level="project" />
<orderEntry type="library" exported="" name="guava-libraries" level="project" />
<orderEntry type="library" name="google-protobuffers" level="project" />
<orderEntry type="library" exported="" name="gson" level="project" />
<orderEntry type="library" name="hamcrest" level="project" />
<orderEntry type="library" name="htmlunit" level="project" />
Expand Down
1 change: 0 additions & 1 deletion java/client/src/org/openqa/selenium/build.desc
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ java_library(name = "client-combined",
"//java/client/src/org/openqa/selenium/safari",
"//java/client/src/org/openqa/selenium/support",
"//java/client/src/org/openqa/selenium/remote:augmenter",
"//third_party/java/opera-driver",
"//third_party/java/phantomjs-driver"
])

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Copyright 2012-2015 Software Freedom Conservancy
Copyright 2012 Selenium committers
Copyright 2012 Software Freedom Conservancy
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -236,15 +236,8 @@ protected void before() throws Throwable {
return;
}

try {
selenium.selectWindow("");
selenium.windowFocus();
} catch (SeleniumException e) {
// TODO(simon): Window switching in Opera is picky.
if (Browser.detect() != Browser.opera) {
throw e;
}
}
selenium.selectWindow("");
selenium.windowFocus();
}
};

Expand Down
12 changes: 0 additions & 12 deletions java/client/test/com/thoughtworks/selenium/build.desc
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,6 @@ java_test(name = "ie-emulation-test",
"//cpp/iedriverserver:win32",
])

java_test(name = "opera-emulation-test",
test_suite = "com.thoughtworks.selenium.WebDriverSeleniumTestSuite",
deps = [
":rc-tests",
],
sysproperties = [
{ "selenium.browser" : "opera" },
],
deps = [
":rc-tests",
])

java_test(name = "chrome-rc-test",
test_suite = "com.thoughtworks.selenium.SeleniumRcTestSuite",
sysproperties = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ public class TestGet extends InternalSelenseTestBase {
public void testGet() throws Exception {
// test API getters
selenium.open("../tests/html/test_get.html");
// IE uppercases the property names of the style. Both Opera and Firefox
// lowercase the property names of the style. Both IE and Opera omit the
// trailing semi-colon.
// IE uppercases the property names of the style.
// Firefox lowercases the property names of the style.
// IE omits the trailing semi-colon.
verifyTrue(Pattern.compile("(width|WIDTH): 644px; (height|HEIGHT): 41px(;?)")
.matcher(selenium.getAttribute("//img[@alt='banner']@style")).find());
// This asserts on the current behavior of selArrayToString(). Commas and
Expand Down
12 changes: 5 additions & 7 deletions java/client/test/org/openqa/selenium/AlertsTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2012 Software Freedom Conservancy
Copyright 2012-2015 Software Freedom Conservancy
Copyright 2007-2012 Selenium committers
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -32,14 +32,12 @@
import static org.openqa.selenium.testing.Ignore.Driver.HTMLUNIT;
import static org.openqa.selenium.testing.Ignore.Driver.IE;
import static org.openqa.selenium.testing.Ignore.Driver.MARIONETTE;
import static org.openqa.selenium.testing.Ignore.Driver.OPERA;
import static org.openqa.selenium.testing.Ignore.Driver.PHANTOMJS;
import static org.openqa.selenium.testing.Ignore.Driver.SAFARI;
import static org.openqa.selenium.testing.Ignore.Driver.OPERA_MOBILE;
import static org.openqa.selenium.testing.TestUtilities.isFirefox;
import static org.openqa.selenium.testing.TestUtilities.isNativeEventsEnabled;
import static org.openqa.selenium.testing.TestUtilities.getEffectivePlatform;
import static org.openqa.selenium.testing.TestUtilities.getFirefoxVersion;
import static org.openqa.selenium.testing.TestUtilities.isFirefox;
import static org.openqa.selenium.testing.TestUtilities.isNativeEventsEnabled;

import org.openqa.selenium.support.ui.ExpectedCondition;
import org.openqa.selenium.support.ui.WebDriverWait;
Expand All @@ -53,7 +51,7 @@

import java.util.Set;

@Ignore({HTMLUNIT, OPERA, PHANTOMJS, SAFARI, OPERA_MOBILE, MARIONETTE})
@Ignore({HTMLUNIT, PHANTOMJS, SAFARI, MARIONETTE})
public class AlertsTest extends JUnit4TestBase {

private WebDriverWait wait;
Expand Down Expand Up @@ -460,7 +458,7 @@ public void testShouldHandleAlertOnWindowClose() {
}

@JavascriptEnabled
@Ignore(value = {CHROME, HTMLUNIT, OPERA})
@Ignore(value = {CHROME, HTMLUNIT})
@Test
public void testIncludesAlertTextInUnhandledAlertException() {
driver.findElement(By.id("alert")).click();
Expand Down
7 changes: 1 addition & 6 deletions java/client/test/org/openqa/selenium/ClearTest.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
Copyright 2015 Software Freedom Conservancy
Copyright 2012 Selenium committers
Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -22,8 +23,6 @@

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import static org.openqa.selenium.testing.Ignore.Driver.OPERA;
import static org.openqa.selenium.testing.Ignore.Driver.OPERA_MOBILE;

public class ClearTest extends JUnit4TestBase {

Expand All @@ -49,7 +48,6 @@ public void testTextInputShouldNotClearWhenDisabled() {
}

@Test
@Ignore({OPERA, OPERA_MOBILE})
public void testTextInputShouldNotClearWhenReadOnly() {
try {
driver.get(pages.readOnlyPage);
Expand Down Expand Up @@ -82,7 +80,6 @@ public void testTextAreaShouldNotClearWhenDisabled() {
}

@Test
@Ignore({OPERA, OPERA_MOBILE})
public void testTextAreaShouldNotClearWhenReadOnly() {
try {
driver.get(pages.readOnlyPage);
Expand All @@ -94,13 +91,11 @@ public void testTextAreaShouldNotClearWhenReadOnly() {
}
}

@Ignore({OPERA_MOBILE})
@Test
public void testContentEditableAreaShouldClear() {
driver.get(pages.readOnlyPage);
WebElement element = driver.findElement(By.id("content-editable"));
element.clear();
assertEquals("", element.getText());
}

}
23 changes: 7 additions & 16 deletions java/client/test/org/openqa/selenium/ClickScrollingTest.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Copyright 2012 Selenium committers
Copyright 2012 Software Freedom Conservancy
Copyright 2012-2015 Software Freedom Conservancy
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -15,7 +15,6 @@
limitations under the License.
*/


package org.openqa.selenium;

import static org.hamcrest.Matchers.greaterThan;
Expand All @@ -29,7 +28,6 @@
import static org.openqa.selenium.testing.Ignore.Driver.HTMLUNIT;
import static org.openqa.selenium.testing.Ignore.Driver.IE;
import static org.openqa.selenium.testing.Ignore.Driver.MARIONETTE;
import static org.openqa.selenium.testing.Ignore.Driver.OPERA;
import static org.openqa.selenium.testing.Ignore.Driver.PHANTOMJS;
import static org.openqa.selenium.testing.Ignore.Driver.SAFARI;

Expand Down Expand Up @@ -110,7 +108,6 @@ public void testShouldBeAbleToClickOnAnElementHiddenByYOverflow() {
}

@JavascriptEnabled
@Ignore({OPERA})
@Test
public void testShouldNotScrollOverflowElementsWhichAreVisible() {
driver.get(appServer.whereIs("scroll2.html"));
Expand Down Expand Up @@ -152,8 +149,7 @@ public void testShouldScrollOverflowElementsIfClickPointIsOutOfViewButElementIsI
}

@Test
@Ignore(value = {OPERA, SAFARI, MARIONETTE},
reason = "Opera: fails, others: not tested")
@Ignore(value = {SAFARI, MARIONETTE}, reason = "others: not tested")
public void testShouldBeAbleToClickElementInAFrameThatIsOutOfView() {
try {
driver.get(appServer.whereIs("scrolling_tests/page_with_frame_out_of_view.html"));
Expand All @@ -167,8 +163,7 @@ public void testShouldBeAbleToClickElementInAFrameThatIsOutOfView() {
}

@Test
@Ignore(value = {OPERA, SAFARI, MARIONETTE},
reason = "Opera: fails, others: not tested")
@Ignore(value = {SAFARI, MARIONETTE}, reason = "not tested")
public void testShouldBeAbleToClickElementThatIsOutOfViewInAFrame() {
try {
driver.get(appServer.whereIs("scrolling_tests/page_with_scrolling_frame.html"));
Expand All @@ -195,8 +190,7 @@ public void testShouldNotBeAbleToClickElementThatIsOutOfViewInANonScrollableFram
}

@Test
@Ignore(value = {OPERA, SAFARI, MARIONETTE},
reason = "Opera: fails, others: not tested")
@Ignore(value = {SAFARI, MARIONETTE}, reason = "not tested")
public void testShouldBeAbleToClickElementThatIsOutOfViewInAFrameThatIsOutOfView() {
try {
driver.get(appServer.whereIs("scrolling_tests/page_with_scrolling_frame_out_of_view.html"));
Expand All @@ -210,8 +204,7 @@ public void testShouldBeAbleToClickElementThatIsOutOfViewInAFrameThatIsOutOfView
}

@Test
@Ignore(value = {OPERA, SAFARI, MARIONETTE},
reason = "Opera: fails, others: not tested")
@Ignore(value = {SAFARI, MARIONETTE}, reason = "not tested")
public void testShouldBeAbleToClickElementThatIsOutOfViewInANestedFrame() {
try {
driver.get(appServer.whereIs("scrolling_tests/page_with_nested_scrolling_frames.html"));
Expand All @@ -226,8 +219,7 @@ public void testShouldBeAbleToClickElementThatIsOutOfViewInANestedFrame() {
}

@Test
@Ignore(value = {OPERA, SAFARI, MARIONETTE},
reason = "Opera: fails, others: not tested")
@Ignore(value = {SAFARI, MARIONETTE}, reason = "not tested")
public void testShouldBeAbleToClickElementThatIsOutOfViewInANestedFrameThatIsOutOfView() {
try {
driver.get(appServer.whereIs("scrolling_tests/page_with_nested_scrolling_frames_out_of_view.html"));
Expand Down Expand Up @@ -255,8 +247,7 @@ private long getScrollTop() {
}

@Test
@Ignore(value = {OPERA, SAFARI, MARIONETTE},
reason = "Not tested")
@Ignore(value = {SAFARI, MARIONETTE}, reason = "Not tested")
public void testShouldBeAbleToClickElementInATallFrame() {
try {
driver.get(appServer.whereIs("scrolling_tests/page_with_tall_frame.html"));
Expand Down
Loading

0 comments on commit 45afa32

Please sign in to comment.