blob: f4b533c1ad17d4e9de49da40c443b387fe9503b1 [file] [log] [blame]
<!DOCTYPE html>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
if (window.internals && internals.settings)
internals.settings.setShouldRestrictBaseURLSchemes(true);
</script>
<base href="javascript:// This is JavaScript">
</head>
<body>
<script>
async_test(t => {
var base = document.querySelector('base');
var img = new Image();
img.onload = t.step_func_done(_ => {
assert_equals(img.naturalWidth, 76, "Image loaded correctly.");
assert_equals(img.src, "http://127.0.0.1:8000/security/resources/abe.png");
});
img.onerror = t.unreached_func("Image should have loaded.");
img.src = "/security/resources/abe.png";
}, "'javascript:' is an invalid base URL.");
</script>
</body>