Rename UrlParser to WhatWgUrlParser

See gh-33639
This commit is contained in:
rstoyanchev
2024-10-01 16:21:24 +01:00
parent 6ba3bb54a0
commit 10f45223aa
3 changed files with 42 additions and 42 deletions

View File

@@ -25,9 +25,9 @@ import static org.assertj.core.api.Assertions.assertThat;
/**
* @author Arjen Poutsma
*/
class UrlParserTests {
class WhatWgUrlParserTests {
private static final UrlParser.UrlRecord EMPTY_URL_RECORD = new UrlParser.UrlRecord();
private static final WhatWgUrlParser.UrlRecord EMPTY_URL_RECORD = new WhatWgUrlParser.UrlRecord();
@Test
void parse() {
@@ -45,7 +45,7 @@ class UrlParserTests {
}
private void testParse(String input, String scheme, @Nullable String host, @Nullable String port, String path, @Nullable String query, @Nullable String fragment) {
UrlParser.UrlRecord result = UrlParser.parse(input, EMPTY_URL_RECORD, null, null);
WhatWgUrlParser.UrlRecord result = WhatWgUrlParser.parse(input, EMPTY_URL_RECORD, null, null);
assertThat(result.scheme()).as("Invalid scheme").isEqualTo(scheme);
if (host != null) {
assertThat(result.host()).as("Host is null").isNotNull();
@@ -74,7 +74,7 @@ class UrlParserTests {
}
void testParseOpaque(String input, String path, @Nullable String query) {
UrlParser.UrlRecord result = UrlParser.parse("mailto:user@example.com?subject=foo", EMPTY_URL_RECORD, null, null);
WhatWgUrlParser.UrlRecord result = WhatWgUrlParser.parse("mailto:user@example.com?subject=foo", EMPTY_URL_RECORD, null, null);
assertThat(result.scheme()).as("Invalid scheme").isEqualTo("mailto");