ladybird/Tests/LibWeb/Text/input/URL/search-params-with-no-query.html
Shannon Booth d755a83c09 LibWeb: Actually set empty serialized query to OptionalNone
Because the type returned by to_string is a String, _not_ an
Optional<String>, the following code:

if (serialized_query.is_empty())
    serialized_query = {};

Was achieving nothing at all! Make sure that the type is an
Optional<String> so that we're not just setting an empty string to an
empty string.
2024-08-12 23:01:29 +01:00

9 lines
232 B
HTML

<script src="../include.js"></script>
<script>
test(() => {
let url = new URL("https://www.birdoftheyear.org.nz/?")
println(url.href);
url.searchParams.sort()
println(url.href);
});
</script>