blob: 86e403a9ac2732ddc087919e5cc88654f5bde2ee [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="/js-test-resources/js-test.js"></script>
<script>
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>