Skip to content

Commit d063185

Browse files
asashourbarancev
authored andcommitted
Update HtmlUnit and HtmlUnitDriver to 2.26
Signed-off-by: Alexei Barantsev <[email protected]>
1 parent 138e3ab commit d063185

File tree

51 files changed

+68
-97
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+68
-97
lines changed

.idea/libraries/cssparser.xml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/htmlunit.xml

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/websocket.xml

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

java/client/.classpath

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@
77
<classpathentry kind="lib" path="/third-party/java/hamcrest/hamcrest-core-1.3.jar"/>
88
<classpathentry kind="lib" path="/third-party/java/hamcrest/hamcrest-library-1.3.jar"/>
99
<classpathentry kind="lib" path="/third-party/java/guava/guava-21.0.jar" sourcepath="/third-party/java/guava/guava-21.0-sources.jar"/>
10-
<classpathentry kind="lib" path="/third-party/java/htmlunit/htmlunit-2.24.jar" sourcepath="/third-party/java/htmlunit/htmlunit-2.24-sources.jar"/>
11-
<classpathentry kind="lib" path="/third-party/java/htmlunit/neko-htmlunit-2.24.jar" sourcepath="/third-party/java/htmlunit/neko-htmlunit-2.24-sources.jar"/>
12-
<classpathentry kind="lib" path="/third-party/java/htmlunit/htmlunit-core-js-2.23.jar"/>
13-
<classpathentry kind="lib" path="/third-party/java/selenium/htmlunit-driver-2.24.jar" sourcepath="/third-party/java/selenium/htmlunit-driver-2.24.jar"/>
10+
<classpathentry kind="lib" path="/third-party/java/htmlunit/htmlunit-2.26.jar" sourcepath="/third-party/java/htmlunit/htmlunit-2.26-sources.jar"/>
11+
<classpathentry kind="lib" path="/third-party/java/htmlunit/neko-htmlunit-2.25.jar" sourcepath="/third-party/java/htmlunit/neko-htmlunit-2.25-sources.jar"/>
12+
<classpathentry kind="lib" path="/third-party/java/htmlunit/htmlunit-core-js-2.26.jar" sourcepath="/third-party/java/htmlunit/htmlunit-core-js-2.26-sources.jar"/>
13+
<classpathentry kind="lib" path="/third-party/java/selenium/htmlunit-driver-2.26.jar" sourcepath="/third-party/java/selenium/htmlunit-driver-2.26.jar"/>
1414
<classpathentry kind="lib" path="/third-party/java/jna/jna-4.1.0.jar" sourcepath="/third-party/java/jna/jna-4.1.0-src.jar"/>
1515
<classpathentry kind="lib" path="/third-party/java/jna/jna-platform-4.1.0.jar" sourcepath="/third-party/java/jna/jna-platform-4.1.0-src.jar"/>
1616
<classpathentry kind="lib" path="/third-party/java/commons/commons-exec-1.3.jar" sourcepath="/third-party/java/commons/commons-exec-1.3-sources.jar"/>
1717
<classpathentry kind="lib" path="/third-party/java/jetty/jetty-repacked.jar"/>
18+
<classpathentry kind="lib" path="/third-party/java/jetty/jetty-util-9.4.1.v20170120.jar" sourcepath="/third-party/java/jetty/jetty-util-9.4.1.v20170120-sources.jar"/>
1819
<classpathentry kind="lib" path="/third-party/java/cglib/cglib-nodep-3.2.4.jar"/>
1920
<classpathentry kind="lib" path="/third-party/java/servlet/javax.servlet-api-3.1.0.jar" sourcepath="/third-party/java/servlet/javax.servlet-api-3.1.0-sources.jar"/>
2021
<classpathentry kind="lib" path="/third-party/java/phantomjs-driver/phantomjsdriver-1.4.0.jar" sourcepath="/third-party/java/phantomjs-driver/phantomjsdriver-1.4.0-sources.jar"/>
@@ -23,15 +24,18 @@
2324
<classpathentry kind="lib" path="/third-party/java/commons-logging/commons-logging-1.2.jar"/>
2425
<classpathentry kind="lib" path="/third-party/java/commons-io/commons-io-2.5.jar" sourcepath="/third-party/java/commons-io/commons-io-2.5-sources.jar"/>
2526
<classpathentry kind="lib" path="/third-party/java/commons-codec/commons-codec-1.10.jar" sourcepath="/third-party/java/commons-codec/commons-codec-1.10-sources.jar"/>
26-
<classpathentry kind="lib" path="/third-party/java/css/sac-1.3.jar"/>
27+
<classpathentry kind="lib" path="/third-party/java/css/sac-1.3.jar" sourcepath="/third-party/java/css/sac-1.3-sources.jar"/>
2728
<classpathentry kind="lib" path="/third-party/java/commons/commons-lang3-3.5.jar" sourcepath="/third-party/java/commons/commons-lang3-3.5-sources.jar"/>
2829
<classpathentry kind="lib" path="/third-party/java/httpcomponents/httpmime-4.5.3.jar" sourcepath="/third-party/java/httpcomponents/httpmime-4.5.3-sources.jar"/>
2930
<classpathentry kind="lib" path="/third-party/java/commons-collections/commons-collections-3.2.2.jar" sourcepath="/third-party/java/commons-collections/commons-collections-3.2.2-sources.jar"/>
30-
<classpathentry kind="lib" path="/third-party/java/cssparser/cssparser-0.9.21.jar"/>
31+
<classpathentry kind="lib" path="/third-party/java/cssparser/cssparser-0.9.22.jar" sourcepath="/third-party/java/cssparser/cssparser-0.9.22-sources.jar"/>
3132
<classpathentry kind="lib" path="/third-party/java/xerces/xercesImpl-2.11.0.jar" sourcepath="/third-party/java/xerces/xercesImpl-2.11.0-sources.jar"/>
3233
<classpathentry kind="lib" path="/third-party/java/xalan/xalan-2.7.2.jar"/>
3334
<classpathentry kind="lib" path="/third-party/java/commons-fileupload/commons-fileupload-1.2.2.jar" sourcepath="/third-party/java/commons-fileupload/commons-fileupload-1.2.2-src.jar"/>
3435
<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"/>
36+
<classpathentry kind="lib" path="/third-party/java/websocket/websocket-api-9.4.3.v20170317.jar" sourcepath="/third-party/java/websocket/websocket-api-9.4.3.v20170317-sources.jar"/>
37+
<classpathentry kind="lib" path="/third-party/java/websocket/websocket-client-9.4.3.v20170317.jar" sourcepath="/third-party/java/websocket/websocket-client-9.4.3.v20170317-sources.jar"/>
38+
<classpathentry kind="lib" path="/third-party/java/websocket/websocket-common-9.4.3.v20170317.jar" sourcepath="/third-party/java/websocket/websocket-common-9.4.3.v20170317-sources.jar"/>
3539
<classpathentry kind="lib" path="/third-party/java/netty/netty-3.5.7.Final.jar"/>
3640
<classpathentry kind="lib" path="/third-party/java/xml-apis/xml-apis-1.4.01.jar"/>
3741
<classpathentry kind="lib" path="/third-party/java/mockito/mockito-core-1.9.5.jar"/>

java/client/test/org/openqa/selenium/AlertsTest.java

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ public void testShouldAllowUsersToAcceptAnAlertWithNoTextManually() {
123123
@Test
124124
@Ignore(CHROME)
125125
@Ignore(MARIONETTE)
126-
@NotYetImplemented(HTMLUNIT)
127126
public void testShouldGetTextOfAlertOpenedInSetTimeout() throws Exception {
128127
driver.get(appServer.create(new Page()
129128
.withTitle("Testing Alerts")
@@ -160,8 +159,6 @@ public void testShouldAllowUsersToDismissAnAlertManually() {
160159

161160
@JavascriptEnabled
162161
@Test
163-
@NotYetImplemented(value = HTMLUNIT,
164-
reason = "HtmlUnit: click()/prompt need to run in different threads.")
165162
public void testShouldAllowAUserToAcceptAPrompt() {
166163
driver.get(promptPage(null));
167164

@@ -175,8 +172,6 @@ public void testShouldAllowAUserToAcceptAPrompt() {
175172

176173
@JavascriptEnabled
177174
@Test
178-
@NotYetImplemented(value = HTMLUNIT,
179-
reason = "HtmlUnit: click()/prompt need to run in different threads.")
180175
public void testShouldAllowAUserToDismissAPrompt() {
181176
driver.get(promptPage(null));
182177

@@ -189,8 +184,6 @@ public void testShouldAllowAUserToDismissAPrompt() {
189184
}
190185

191186
@JavascriptEnabled
192-
@Test
193-
@NotYetImplemented(value = HTMLUNIT, reason = "click()/prompt need to run in different threads")
194187
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/607")
195188
public void testShouldAllowAUserToSetTheValueOfAPrompt() {
196189
driver.get(promptPage(null));
@@ -235,8 +228,7 @@ public void testShouldAllowTheUserToGetTheTextOfAnAlert() {
235228
}
236229

237230
@Test
238-
@NotYetImplemented(value = HTMLUNIT,
239-
reason = "HtmlUnit: click()/prompt need to run in different threads.")
231+
@Ignore(value = HTMLUNIT, reason="test should enable JavaScript")
240232
public void testShouldAllowTheUserToGetTheTextOfAPrompt() {
241233
driver.get(promptPage(null));
242234

@@ -337,8 +329,6 @@ public void testSwitchingToMissingAlertInAClosedWindowThrows() throws Exception
337329

338330
@JavascriptEnabled
339331
@Test
340-
@NotYetImplemented(value = HTMLUNIT,
341-
reason = "HtmlUnit: runs on the same test thread.")
342332
public void testPromptShouldUseDefaultValueIfNoKeysSent() {
343333
driver.get(promptPage("This is a default value"));
344334

@@ -351,8 +341,6 @@ public void testPromptShouldUseDefaultValueIfNoKeysSent() {
351341

352342
@JavascriptEnabled
353343
@Test
354-
@NotYetImplemented(value = HTMLUNIT,
355-
reason = "HtmlUnit: click()/prompt need to run in different threads.")
356344
public void testPromptShouldHaveNullValueIfDismissed() {
357345
driver.get(promptPage("This is a default value"));
358346

@@ -365,7 +353,6 @@ public void testPromptShouldHaveNullValueIfDismissed() {
365353

366354
@JavascriptEnabled
367355
@Test
368-
@NotYetImplemented(value = HTMLUNIT, reason = "click()/prompt need to run in different threads")
369356
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/607")
370357
public void testHandlesTwoAlertsFromOneInteraction() {
371358
driver.get(appServer.create(new Page()
@@ -436,6 +423,7 @@ public void testShouldHandleAlertOnPageLoadUsingGet() {
436423
@Ignore(FIREFOX)
437424
@Ignore(value = IE, reason = "Fails in versions 6 and 7")
438425
@Ignore(MARIONETTE)
426+
@NotYetImplemented(HTMLUNIT)
439427
public void testShouldNotHandleAlertInAnotherWindow() {
440428
String pageWithOnLoad = appServer.create(new Page()
441429
.withOnLoad("javascript:alert(\"onload\")")
@@ -489,8 +477,6 @@ public void testShouldHandleAlertOnPageUnload() {
489477

490478
@JavascriptEnabled
491479
@Test
492-
@NotYetImplemented(value = HTMLUNIT,
493-
reason = "HtmlUnit: runs on the same test thread, and .click() already changs the current window.")
494480
public void testShouldHandleAlertOnPageBeforeUnload() {
495481
String blank = appServer.create(new Page().withTitle("Success"));
496482
driver.get(appServer.create(new Page()
@@ -515,8 +501,7 @@ public void testShouldHandleAlertOnPageBeforeUnload() {
515501

516502
@NoDriverAfterTest
517503
@Test
518-
@NotYetImplemented(value = HTMLUNIT,
519-
reason = "HtmlUnit: runs on the same test thread.")
504+
@Ignore(value = HTMLUNIT, reason="test should enable JavaScript")
520505
public void testShouldHandleAlertOnPageBeforeUnloadAtQuit() {
521506
String blank = appServer.create(new Page().withTitle("Success"));
522507
driver.get(appServer.create(new Page()

java/client/test/org/openqa/selenium/CorrectEventFiringTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ public void testSendingKeysToAFocusedElementShouldNotBlurThatElement() {
322322
@JavascriptEnabled
323323
@Test
324324
@Ignore(SAFARI)
325-
@Ignore(HTMLUNIT)
325+
@NotYetImplemented(HTMLUNIT)
326326
public void testClickingAnUnfocusableChildShouldNotBlurTheParent() {
327327
assumeFalse(isOldIe(driver));
328328
driver.get(pages.javascriptPage);

java/client/test/org/openqa/selenium/ElementFindingTest.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import static org.junit.Assert.assertThat;
2727
import static org.junit.Assume.assumeFalse;
2828
import static org.openqa.selenium.testing.Driver.CHROME;
29-
import static org.openqa.selenium.testing.Driver.HTMLUNIT;
3029
import static org.openqa.selenium.testing.Driver.IE;
3130
import static org.openqa.selenium.testing.Driver.MARIONETTE;
3231
import static org.openqa.selenium.testing.Driver.SAFARI;
@@ -38,7 +37,6 @@
3837
import org.openqa.selenium.testing.JUnit4TestBase;
3938
import org.openqa.selenium.testing.JavascriptEnabled;
4039
import org.openqa.selenium.testing.NeedsFreshDriver;
41-
import org.openqa.selenium.testing.NotYetImplemented;
4240
import org.openqa.selenium.testing.SwitchToTopAfterTest;
4341
import org.openqa.selenium.testing.TestUtilities;
4442

@@ -447,7 +445,6 @@ public void testShouldBeAbleToFindElementByXPathWithNamespace() {
447445
@Ignore(IE)
448446
@Ignore(SAFARI)
449447
@Ignore(CHROME)
450-
@NotYetImplemented(value = HTMLUNIT, reason = "This used to work in HtmlUnit 2.23")
451448
public void testShouldBeAbleToFindElementByXPathInXmlDocument() {
452449
driver.get(pages.simpleXmlDocument);
453450
WebElement element = driver.findElement(By.xpath("//foo"));

java/client/test/org/openqa/selenium/ExecutingAsyncJavascriptTest.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,6 @@ public void shouldBeAbleToMakeXMLHttpRequestsAndWaitForTheResponse() {
332332
@Ignore(CHROME)
333333
@Ignore(IE)
334334
@Ignore(MARIONETTE)
335-
@NotYetImplemented(HTMLUNIT)
336335
@NeedsLocalEnvironment(reason = "Relies on timing")
337336
public void throwsIfScriptTriggersAlert() {
338337
driver.get(pages.simpleTestPage);
@@ -349,7 +348,6 @@ public void throwsIfScriptTriggersAlert() {
349348
@Ignore(CHROME)
350349
@Ignore(IE)
351350
@Ignore(MARIONETTE)
352-
@NotYetImplemented(HTMLUNIT)
353351
@NeedsLocalEnvironment(reason = "Relies on timing")
354352
public void throwsIfAlertHappensDuringScript() {
355353
driver.get(pages.slowLoadingAlertPage);
@@ -364,7 +362,7 @@ public void throwsIfAlertHappensDuringScript() {
364362
@Ignore(CHROME)
365363
@Ignore(IE)
366364
@Ignore(MARIONETTE)
367-
@NotYetImplemented(HTMLUNIT)
365+
@Ignore(value = HTMLUNIT, reason="test should enable JavaScript")
368366
@NeedsLocalEnvironment(reason = "Relies on timing")
369367
public void throwsIfScriptTriggersAlertWhichTimesOut() {
370368
driver.get(pages.simpleTestPage);
@@ -381,7 +379,6 @@ public void throwsIfScriptTriggersAlertWhichTimesOut() {
381379
@Ignore(CHROME)
382380
@Ignore(IE)
383381
@Ignore(MARIONETTE)
384-
@NotYetImplemented(HTMLUNIT)
385382
@NeedsLocalEnvironment(reason = "Relies on timing")
386383
public void throwsIfAlertHappensDuringScriptWhichTimesOut() {
387384
driver.get(pages.slowLoadingAlertPage);
@@ -397,7 +394,6 @@ public void throwsIfAlertHappensDuringScriptWhichTimesOut() {
397394
@Ignore(CHROME)
398395
@Ignore(IE)
399396
@Ignore(MARIONETTE)
400-
@NotYetImplemented(HTMLUNIT)
401397
@NeedsLocalEnvironment(reason = "Relies on timing")
402398
public void includesAlertTextInUnhandledAlertException() {
403399
driver.manage().timeouts().setScriptTimeout(5000, TimeUnit.MILLISECONDS);

java/client/test/org/openqa/selenium/ExecutingJavascriptTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,6 @@ public void testShouldThrowAnExceptionWhenArgumentsWithStaleElementPassed() {
562562
@Ignore(PHANTOMJS)
563563
@Ignore(SAFARI)
564564
@Ignore(MARIONETTE)
565-
@NotYetImplemented(HTMLUNIT)
566565
public void testShouldBeAbleToReturnADateObject() {
567566
driver.get(pages.simpleTestPage);
568567

java/client/test/org/openqa/selenium/FormHandlingTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,6 @@ public void testCanClickOnASubmitButton() {
293293
checkSubmitButton("internal_explicit_submit");
294294
}
295295

296-
297296
@Test
298297
@Ignore(SAFARI)
299298
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")

0 commit comments

Comments
 (0)