blob: db92ebf9fe776eb7580c3eb65b1b20c9b20f82fd [file] [log] [blame]
<!doctype html>
<head>
<title>Reproduces the crash in https://crbug.com/848212</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
'use strict'
document.addEventListener("DOMContentLoaded", () => {
test(() => {
var anchorLink = document.getElementById("anchorlink");
anchorLink.click();
anchorLink.focus();
assert_equals(document.activeElement, anchorLink);
}, "should not crash on focus call");
});
</script>
<link rel="stylesheet" type="text/css" href="/resources/load-and-stall.php?name=dummy.css&stallAt&stallFor=2">
</head>
<body>
<div>
<a id="anchorlink" href="#bottom">Link to bottom of the page</a>
</div>
<div style="height: 1000px;"></div>
<a name="bottom" id="bt">Bottom of the page</a>
</body>