ladybird/Tests/LibWeb/Text/input/URL/invalid-urls.html
2025-03-20 11:50:49 +01:00

23 lines
605 B
HTML

<!DOCTYPE html>
<script src="../include.js"></script>
<script>
test(() => {
const urls = [
{ input: 'file://xn--/p' },
{ input: 'http://0xffffffff1' },
];
for (url of urls) {
if (url.base === undefined)
println(`new URL('${url.input}', ${url.base})`);
else
println(`new URL('${url.input}', '${url.base}')`);
try {
new URL(url.input, url.base);
} catch (e) {
println(`error creating URL: '${e}'`);
}
}
});
</script>