From 5b642095fa5328a3620bc696dbdb3ca73c59ae92 Mon Sep 17 00:00:00 2001 From: lprimak Date: Sun, 20 Aug 2023 14:02:49 -0500 Subject: [PATCH] deps: updated htmlunit to 3.5.0 --- integration-tests/guice3/pom.xml | 2 +- .../samples/guice/ContainerIntegrationIT.java | 25 +++++++++---------- integration-tests/guice4/pom.xml | 2 +- .../samples/guice/ContainerIntegrationIT.java | 25 +++++++++---------- integration-tests/support/pom.xml | 2 +- .../testing/web/AbstractContainerIT.java | 2 +- pom.xml | 4 +-- samples/guice/pom.xml | 2 +- .../samples/guice/ContainerIntegrationIT.java | 25 +++++++++---------- samples/servlet-plugin/pom.xml | 2 +- .../shiro/test/ContainerIntegrationIT.java | 15 ++++++----- samples/spring-hibernate/pom.xml | 2 +- .../shiro/samples/ContainerIntegrationIT.java | 14 +++++------ samples/web/pom.xml | 2 +- .../test/WebAppContainerIntegrationIT.java | 17 ++++++------- 15 files changed, 67 insertions(+), 74 deletions(-) diff --git a/integration-tests/guice3/pom.xml b/integration-tests/guice3/pom.xml index 79aa731e01..1bac8e1b49 100644 --- a/integration-tests/guice3/pom.xml +++ b/integration-tests/guice3/pom.xml @@ -100,7 +100,7 @@ test - net.sourceforge.htmlunit + org.htmlunit htmlunit test diff --git a/integration-tests/guice3/src/test/java/org/apache/shiro/samples/guice/ContainerIntegrationIT.java b/integration-tests/guice3/src/test/java/org/apache/shiro/samples/guice/ContainerIntegrationIT.java index 2a259671a0..fe9d7a1502 100644 --- a/integration-tests/guice3/src/test/java/org/apache/shiro/samples/guice/ContainerIntegrationIT.java +++ b/integration-tests/guice3/src/test/java/org/apache/shiro/samples/guice/ContainerIntegrationIT.java @@ -20,15 +20,14 @@ import org.apache.shiro.testing.web.AbstractContainerIT; -import com.gargoylesoftware.htmlunit.ElementNotFoundException; -import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; -import com.gargoylesoftware.htmlunit.WebAssert; -import com.gargoylesoftware.htmlunit.html.HtmlCheckBoxInput; -import com.gargoylesoftware.htmlunit.html.HtmlForm; -import com.gargoylesoftware.htmlunit.html.HtmlInput; -import com.gargoylesoftware.htmlunit.html.HtmlPage; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.htmlunit.ElementNotFoundException; +import org.htmlunit.FailingHttpStatusCodeException; +import org.htmlunit.WebAssert; +import org.htmlunit.html.HtmlCheckBoxInput; +import org.htmlunit.html.HtmlForm; +import org.htmlunit.html.HtmlPage; import java.io.IOException; import java.net.MalformedURLException; @@ -52,9 +51,9 @@ void logIn() throws FailingHttpStatusCodeException, MalformedURLException, IOExc HtmlPage page = webClient.getPage(getBaseUri() + "login.jsp"); HtmlForm form = page.getFormByName("loginform"); - form.getInputByName("username").setValueAttribute("root"); - form.getInputByName("password").setValueAttribute("secret"); - page = form.getInputByName("submit").click(); + form.getInputByName("username").setValueAttribute("root"); + form.getInputByName("password").setValueAttribute("secret"); + page = form.getInputByName("submit").click(); // This'll throw an exception if not logged in page.getAnchorByHref("/logout"); } @@ -63,11 +62,11 @@ void logIn() throws FailingHttpStatusCodeException, MalformedURLException, IOExc void logInAndRememberMe() throws Exception { HtmlPage page = webClient.getPage(getBaseUri() + "login.jsp"); HtmlForm form = page.getFormByName("loginform"); - form.getInputByName("username").setValueAttribute("root"); - form.getInputByName("password").setValueAttribute("secret"); + form.getInputByName("username").setValueAttribute("root"); + form.getInputByName("password").setValueAttribute("secret"); HtmlCheckBoxInput checkbox = form.getInputByName("rememberMe"); checkbox.setChecked(true); - page = form.getInputByName("submit").click(); + page = form.getInputByName("submit").click(); jetty.stop(); jetty.start(); page = webClient.getPage(getBaseUri()); diff --git a/integration-tests/guice4/pom.xml b/integration-tests/guice4/pom.xml index 0c45c46803..51e27429a1 100644 --- a/integration-tests/guice4/pom.xml +++ b/integration-tests/guice4/pom.xml @@ -105,7 +105,7 @@ test - net.sourceforge.htmlunit + org.htmlunit htmlunit test diff --git a/integration-tests/guice4/src/test/java/org/apache/shiro/samples/guice/ContainerIntegrationIT.java b/integration-tests/guice4/src/test/java/org/apache/shiro/samples/guice/ContainerIntegrationIT.java index 2a259671a0..fe9d7a1502 100644 --- a/integration-tests/guice4/src/test/java/org/apache/shiro/samples/guice/ContainerIntegrationIT.java +++ b/integration-tests/guice4/src/test/java/org/apache/shiro/samples/guice/ContainerIntegrationIT.java @@ -20,15 +20,14 @@ import org.apache.shiro.testing.web.AbstractContainerIT; -import com.gargoylesoftware.htmlunit.ElementNotFoundException; -import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; -import com.gargoylesoftware.htmlunit.WebAssert; -import com.gargoylesoftware.htmlunit.html.HtmlCheckBoxInput; -import com.gargoylesoftware.htmlunit.html.HtmlForm; -import com.gargoylesoftware.htmlunit.html.HtmlInput; -import com.gargoylesoftware.htmlunit.html.HtmlPage; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.htmlunit.ElementNotFoundException; +import org.htmlunit.FailingHttpStatusCodeException; +import org.htmlunit.WebAssert; +import org.htmlunit.html.HtmlCheckBoxInput; +import org.htmlunit.html.HtmlForm; +import org.htmlunit.html.HtmlPage; import java.io.IOException; import java.net.MalformedURLException; @@ -52,9 +51,9 @@ void logIn() throws FailingHttpStatusCodeException, MalformedURLException, IOExc HtmlPage page = webClient.getPage(getBaseUri() + "login.jsp"); HtmlForm form = page.getFormByName("loginform"); - form.getInputByName("username").setValueAttribute("root"); - form.getInputByName("password").setValueAttribute("secret"); - page = form.getInputByName("submit").click(); + form.getInputByName("username").setValueAttribute("root"); + form.getInputByName("password").setValueAttribute("secret"); + page = form.getInputByName("submit").click(); // This'll throw an exception if not logged in page.getAnchorByHref("/logout"); } @@ -63,11 +62,11 @@ void logIn() throws FailingHttpStatusCodeException, MalformedURLException, IOExc void logInAndRememberMe() throws Exception { HtmlPage page = webClient.getPage(getBaseUri() + "login.jsp"); HtmlForm form = page.getFormByName("loginform"); - form.getInputByName("username").setValueAttribute("root"); - form.getInputByName("password").setValueAttribute("secret"); + form.getInputByName("username").setValueAttribute("root"); + form.getInputByName("password").setValueAttribute("secret"); HtmlCheckBoxInput checkbox = form.getInputByName("rememberMe"); checkbox.setChecked(true); - page = form.getInputByName("submit").click(); + page = form.getInputByName("submit").click(); jetty.stop(); jetty.start(); page = webClient.getPage(getBaseUri()); diff --git a/integration-tests/support/pom.xml b/integration-tests/support/pom.xml index b1b3d62dcf..d9085c6812 100644 --- a/integration-tests/support/pom.xml +++ b/integration-tests/support/pom.xml @@ -66,7 +66,7 @@ - net.sourceforge.htmlunit + org.htmlunit htmlunit diff --git a/integration-tests/support/src/main/java/org/apache/shiro/testing/web/AbstractContainerIT.java b/integration-tests/support/src/main/java/org/apache/shiro/testing/web/AbstractContainerIT.java index 823aff0477..b76a06dd4b 100644 --- a/integration-tests/support/src/main/java/org/apache/shiro/testing/web/AbstractContainerIT.java +++ b/integration-tests/support/src/main/java/org/apache/shiro/testing/web/AbstractContainerIT.java @@ -20,7 +20,6 @@ import org.apache.shiro.lang.codec.Base64; -import com.gargoylesoftware.htmlunit.WebClient; import com.github.mjeanroy.junit.servers.jetty9.EmbeddedJetty; import com.github.mjeanroy.junit.servers.jetty.EmbeddedJettyConfiguration; import org.eclipse.jetty.annotations.AnnotationConfiguration; @@ -40,6 +39,7 @@ import org.eclipse.jetty.webapp.WebAppContext; import org.eclipse.jetty.webapp.WebInfConfiguration; import org.eclipse.jetty.webapp.WebXmlConfiguration; +import org.htmlunit.WebClient; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; diff --git a/pom.xml b/pom.xml index 9bd1fe8a08..2f6fff4e66 100644 --- a/pom.xml +++ b/pom.xml @@ -113,7 +113,7 @@ 2.7.14 4.2.3 2.1.6 - 2.70.0 + 3.5.0 1.70 @@ -1242,7 +1242,7 @@ ${hazelcast.version} - net.sourceforge.htmlunit + org.htmlunit htmlunit ${htmlunit.version} diff --git a/samples/guice/pom.xml b/samples/guice/pom.xml index 3262723df5..3f6bccd039 100644 --- a/samples/guice/pom.xml +++ b/samples/guice/pom.xml @@ -87,7 +87,7 @@ - net.sourceforge.htmlunit + org.htmlunit htmlunit test diff --git a/samples/guice/src/test/java/org/apache/shiro/samples/guice/ContainerIntegrationIT.java b/samples/guice/src/test/java/org/apache/shiro/samples/guice/ContainerIntegrationIT.java index 8d76d2d918..d7bb94ebde 100644 --- a/samples/guice/src/test/java/org/apache/shiro/samples/guice/ContainerIntegrationIT.java +++ b/samples/guice/src/test/java/org/apache/shiro/samples/guice/ContainerIntegrationIT.java @@ -18,16 +18,15 @@ */ package org.apache.shiro.samples.guice; -import com.gargoylesoftware.htmlunit.ElementNotFoundException; -import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; -import com.gargoylesoftware.htmlunit.WebAssert; -import com.gargoylesoftware.htmlunit.html.HtmlCheckBoxInput; -import com.gargoylesoftware.htmlunit.html.HtmlForm; -import com.gargoylesoftware.htmlunit.html.HtmlInput; -import com.gargoylesoftware.htmlunit.html.HtmlPage; import org.apache.shiro.testing.web.AbstractContainerIT; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.htmlunit.ElementNotFoundException; +import org.htmlunit.FailingHttpStatusCodeException; +import org.htmlunit.WebAssert; +import org.htmlunit.html.HtmlCheckBoxInput; +import org.htmlunit.html.HtmlForm; +import org.htmlunit.html.HtmlPage; import java.io.IOException; import java.net.MalformedURLException; @@ -51,9 +50,9 @@ void logIn() throws FailingHttpStatusCodeException, MalformedURLException, IOExc HtmlPage page = webClient.getPage(getBaseUri() + "login.jsp"); HtmlForm form = page.getFormByName("loginform"); - form.getInputByName("username").setValueAttribute("root"); - form.getInputByName("password").setValueAttribute("secret"); - page = form.getInputByName("submit").click(); + form.getInputByName("username").setValueAttribute("root"); + form.getInputByName("password").setValueAttribute("secret"); + page = form.getInputByName("submit").click(); // This'll throw an exception if not logged in page.getAnchorByHref("/logout"); } @@ -62,11 +61,11 @@ void logIn() throws FailingHttpStatusCodeException, MalformedURLException, IOExc void logInAndRememberMe() throws Exception { HtmlPage page = webClient.getPage(getBaseUri() + "login.jsp"); HtmlForm form = page.getFormByName("loginform"); - form.getInputByName("username").setValueAttribute("root"); - form.getInputByName("password").setValueAttribute("secret"); + form.getInputByName("username").setValueAttribute("root"); + form.getInputByName("password").setValueAttribute("secret"); HtmlCheckBoxInput checkbox = form.getInputByName("rememberMe"); checkbox.setChecked(true); - page = form.getInputByName("submit").click(); + page = form.getInputByName("submit").click(); jetty.stop(); jetty.start(); page = webClient.getPage(getBaseUri()); diff --git a/samples/servlet-plugin/pom.xml b/samples/servlet-plugin/pom.xml index 5088e3f352..de83d018ed 100644 --- a/samples/servlet-plugin/pom.xml +++ b/samples/servlet-plugin/pom.xml @@ -111,7 +111,7 @@ runtime - net.sourceforge.htmlunit + org.htmlunit htmlunit test diff --git a/samples/servlet-plugin/src/test/java/org/apache/shiro/test/ContainerIntegrationIT.java b/samples/servlet-plugin/src/test/java/org/apache/shiro/test/ContainerIntegrationIT.java index be78865e87..60d3666be6 100644 --- a/samples/servlet-plugin/src/test/java/org/apache/shiro/test/ContainerIntegrationIT.java +++ b/samples/servlet-plugin/src/test/java/org/apache/shiro/test/ContainerIntegrationIT.java @@ -18,14 +18,13 @@ */ package org.apache.shiro.test; -import com.gargoylesoftware.htmlunit.ElementNotFoundException; -import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; -import com.gargoylesoftware.htmlunit.html.HtmlForm; -import com.gargoylesoftware.htmlunit.html.HtmlInput; -import com.gargoylesoftware.htmlunit.html.HtmlPage; import org.apache.shiro.testing.web.AbstractContainerIT; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.htmlunit.ElementNotFoundException; +import org.htmlunit.FailingHttpStatusCodeException; +import org.htmlunit.html.HtmlForm; +import org.htmlunit.html.HtmlPage; import java.io.IOException; import java.net.MalformedURLException; @@ -49,9 +48,9 @@ void logIn() throws FailingHttpStatusCodeException, MalformedURLException, IOExc HtmlPage page = webClient.getPage(getBaseUri() + "login.jsp"); HtmlForm form = page.getFormByName("loginform"); - form.getInputByName("username").setValueAttribute("root"); - form.getInputByName("password").setValueAttribute("secret"); - page = form.getInputByName("submit").click(); + form.getInputByName("username").setValueAttribute("root"); + form.getInputByName("password").setValueAttribute("secret"); + page = form.getInputByName("submit").click(); // This'll throw an exception if not logged in page.getAnchorByHref("/logout"); } diff --git a/samples/spring-hibernate/pom.xml b/samples/spring-hibernate/pom.xml index 7bfe6b251b..b0f34b7e76 100644 --- a/samples/spring-hibernate/pom.xml +++ b/samples/spring-hibernate/pom.xml @@ -108,7 +108,7 @@ - net.sourceforge.htmlunit + org.htmlunit htmlunit test diff --git a/samples/spring-hibernate/src/test/java/org/apache/shiro/samples/ContainerIntegrationIT.java b/samples/spring-hibernate/src/test/java/org/apache/shiro/samples/ContainerIntegrationIT.java index 753d270b9b..6a84ccfc60 100644 --- a/samples/spring-hibernate/src/test/java/org/apache/shiro/samples/ContainerIntegrationIT.java +++ b/samples/spring-hibernate/src/test/java/org/apache/shiro/samples/ContainerIntegrationIT.java @@ -18,18 +18,16 @@ */ package org.apache.shiro.samples; -import com.gargoylesoftware.htmlunit.ElementNotFoundException; -import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; -import com.gargoylesoftware.htmlunit.WebClient; -import com.gargoylesoftware.htmlunit.html.HtmlForm; -import com.gargoylesoftware.htmlunit.html.HtmlInput; -import com.gargoylesoftware.htmlunit.html.HtmlPage; import org.apache.shiro.testing.web.AbstractContainerIT; +import org.htmlunit.ElementNotFoundException; +import org.htmlunit.FailingHttpStatusCodeException; +import org.htmlunit.WebClient; +import org.htmlunit.html.HtmlForm; +import org.htmlunit.html.HtmlInput; +import org.htmlunit.html.HtmlPage; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; - import java.io.IOException; -import java.net.MalformedURLException; public class ContainerIntegrationIT extends AbstractContainerIT { diff --git a/samples/web/pom.xml b/samples/web/pom.xml index f771559c7d..3bb6caad44 100644 --- a/samples/web/pom.xml +++ b/samples/web/pom.xml @@ -82,7 +82,7 @@ runtime - net.sourceforge.htmlunit + org.htmlunit htmlunit test diff --git a/samples/web/src/test/java/org/apache/shiro/test/WebAppContainerIntegrationIT.java b/samples/web/src/test/java/org/apache/shiro/test/WebAppContainerIntegrationIT.java index 31dd4e177d..e17e8147fb 100644 --- a/samples/web/src/test/java/org/apache/shiro/test/WebAppContainerIntegrationIT.java +++ b/samples/web/src/test/java/org/apache/shiro/test/WebAppContainerIntegrationIT.java @@ -18,15 +18,14 @@ */ package org.apache.shiro.test; -import com.gargoylesoftware.htmlunit.ElementNotFoundException; -import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; -import com.gargoylesoftware.htmlunit.WebClient; -import com.gargoylesoftware.htmlunit.html.HtmlForm; -import com.gargoylesoftware.htmlunit.html.HtmlInput; -import com.gargoylesoftware.htmlunit.html.HtmlPage; import org.apache.shiro.testing.web.AbstractContainerIT; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.htmlunit.ElementNotFoundException; +import org.htmlunit.FailingHttpStatusCodeException; +import org.htmlunit.WebClient; +import org.htmlunit.html.HtmlForm; +import org.htmlunit.html.HtmlPage; import java.io.IOException; import java.net.MalformedURLException; @@ -52,9 +51,9 @@ void logIn() throws FailingHttpStatusCodeException, MalformedURLException, IOExc HtmlPage page = webClient.getPage(getTlsBaseUri() + "login.jsp"); HtmlForm form = page.getFormByName("loginform"); - form.getInputByName("username").setValueAttribute("root"); - form.getInputByName("password").setValueAttribute("secret"); - page = form.getInputByName("submit").click(); + form.getInputByName("username").setValueAttribute("root"); + form.getInputByName("password").setValueAttribute("secret"); + page = form.getInputByName("submit").click(); // This'll throw an exception if not logged in page.getAnchorByHref("/logout"); }