blob: 578cee071db7769c414318e399191c635e5f1c74 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="/js-test-resources/js-test.js"></script>
<script>
if (window.internals && internals.settings)
internals.settings.setShouldRestrictBaseURLSchemes(false);
var embed;
function embedLoad() {
embed = document.getElementById('embed');
embed.onbeforeload = () => {
embed.onbeforeload = null;
let base = document.head.appendChild(document.createElement('base'));
base.href = 'javascript:///%0aalert("FAIL");//';
finishJSTest();
};
embed.src = 'xxxxx';
};
</script>
</head>
<body>
<script>
description("Check that forcing a navigation during an embed element load is well-behaved.")
window.jsTestIsAsync = true;
</script>
<embed id='embed' type='image/png' src='/resources/square100.png' onload='embedLoad()'>
</embed>
</body>
</html>