blob: caf6112c2d65259d19340212717bb331443441a0 [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<p>This tests whether clicking on an anchor in an iframe with scrolling="no" will scroll to anchor. If clicking on the link below triggers a scroll, the test passes.<p>
<iframe id="target" src="resources/iframe-with-anchor-crash.html" width="100%" height="2000" scrolling="no" onload="setupTopLevel();"></iframe>
<script>
var iframeTarget = document.getElementById('target');
function finish() {
var result = "PASS";
window.top.document.body.appendChild(document.createTextNode(result));
if (window.testRunner)
testRunner.notifyDone();
}
function setupTopLevel() {
var scrollTarget = iframeTarget.contentDocument.getElementById('might_scroll');
iframeTarget.contentWindow.registerAction(function () {
iframeTarget.remove();
setTimeout(finish, 0);
});
iframeTarget.contentWindow.run();
}
</script>
</body>
</html>