Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#1010] deps: updated htmlunit to 3.5.0 #1035

Merged
merged 1 commit into from
Aug 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion integration-tests/guice3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<groupId>org.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<scope>test</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -52,9 +51,9 @@ void logIn() throws FailingHttpStatusCodeException, MalformedURLException, IOExc

HtmlPage page = webClient.getPage(getBaseUri() + "login.jsp");
HtmlForm form = page.getFormByName("loginform");
form.<HtmlInput>getInputByName("username").setValueAttribute("root");
form.<HtmlInput>getInputByName("password").setValueAttribute("secret");
page = form.<HtmlInput>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");
}
Expand All @@ -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.<HtmlInput>getInputByName("username").setValueAttribute("root");
form.<HtmlInput>getInputByName("password").setValueAttribute("secret");
form.getInputByName("username").setValueAttribute("root");
form.getInputByName("password").setValueAttribute("secret");
HtmlCheckBoxInput checkbox = form.getInputByName("rememberMe");
checkbox.setChecked(true);
page = form.<HtmlInput>getInputByName("submit").click();
page = form.getInputByName("submit").click();
jetty.stop();
jetty.start();
page = webClient.getPage(getBaseUri());
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/guice4/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<groupId>org.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<scope>test</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -52,9 +51,9 @@ void logIn() throws FailingHttpStatusCodeException, MalformedURLException, IOExc

HtmlPage page = webClient.getPage(getBaseUri() + "login.jsp");
HtmlForm form = page.getFormByName("loginform");
form.<HtmlInput>getInputByName("username").setValueAttribute("root");
form.<HtmlInput>getInputByName("password").setValueAttribute("secret");
page = form.<HtmlInput>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");
}
Expand All @@ -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.<HtmlInput>getInputByName("username").setValueAttribute("root");
form.<HtmlInput>getInputByName("password").setValueAttribute("secret");
form.getInputByName("username").setValueAttribute("root");
form.getInputByName("password").setValueAttribute("secret");
HtmlCheckBoxInput checkbox = form.getInputByName("rememberMe");
checkbox.setChecked(true);
page = form.<HtmlInput>getInputByName("submit").click();
page = form.getInputByName("submit").click();
jetty.stop();
jetty.start();
page = webClient.getPage(getBaseUri());
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/support/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
</dependency>

<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<groupId>org.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
<spring-boot.version>2.7.14</spring-boot.version>
<guice.version>4.2.3</guice.version>
<jaxrs.api.version>2.1.6</jaxrs.api.version>
<htmlunit.version>2.70.0</htmlunit.version>
<htmlunit.version>3.5.0</htmlunit.version>
<bouncycastle.version>1.70</bouncycastle.version>

<!-- Test 3rd-party dependencies: -->
Expand Down Expand Up @@ -1242,7 +1242,7 @@
<version>${hazelcast.version}</version>
</dependency>
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<groupId>org.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<version>${htmlunit.version}</version>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion samples/guice/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
</dependency>

<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<groupId>org.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<scope>test</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -51,9 +50,9 @@ void logIn() throws FailingHttpStatusCodeException, MalformedURLException, IOExc

HtmlPage page = webClient.getPage(getBaseUri() + "login.jsp");
HtmlForm form = page.getFormByName("loginform");
form.<HtmlInput>getInputByName("username").setValueAttribute("root");
form.<HtmlInput>getInputByName("password").setValueAttribute("secret");
page = form.<HtmlInput>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");
}
Expand All @@ -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.<HtmlInput>getInputByName("username").setValueAttribute("root");
form.<HtmlInput>getInputByName("password").setValueAttribute("secret");
form.getInputByName("username").setValueAttribute("root");
form.getInputByName("password").setValueAttribute("secret");
HtmlCheckBoxInput checkbox = form.getInputByName("rememberMe");
checkbox.setChecked(true);
page = form.<HtmlInput>getInputByName("submit").click();
page = form.getInputByName("submit").click();
jetty.stop();
jetty.start();
page = webClient.getPage(getBaseUri());
Expand Down
2 changes: 1 addition & 1 deletion samples/servlet-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<groupId>org.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<scope>test</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -49,9 +48,9 @@ void logIn() throws FailingHttpStatusCodeException, MalformedURLException, IOExc

HtmlPage page = webClient.getPage(getBaseUri() + "login.jsp");
HtmlForm form = page.getFormByName("loginform");
form.<HtmlInput>getInputByName("username").setValueAttribute("root");
form.<HtmlInput>getInputByName("password").setValueAttribute("secret");
page = form.<HtmlInput>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");
}
Expand Down
2 changes: 1 addition & 1 deletion samples/spring-hibernate/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
</dependency>

<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<groupId>org.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<scope>test</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion samples/web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<groupId>org.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<scope>test</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -52,9 +51,9 @@ void logIn() throws FailingHttpStatusCodeException, MalformedURLException, IOExc

HtmlPage page = webClient.getPage(getTlsBaseUri() + "login.jsp");
HtmlForm form = page.getFormByName("loginform");
form.<HtmlInput>getInputByName("username").setValueAttribute("root");
form.<HtmlInput>getInputByName("password").setValueAttribute("secret");
page = form.<HtmlInput>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");
}
Expand Down