blob: 1e19d499e91788bb3223d17aa2ae68e75ce2c1f6 [file] [edit]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test.js"></script>
<script src="../../resources/ui-helper.js"></script>
</head>
<body>
<input id="input">
<input id="hidden" style="display: none" autofocus>
</body>
<script>
jsTestIsAsync = true;
addEventListener("load", async function() {
description("This test verifies that we don't crash when focusing an element that triggers a layout change, resulting in a change of focus.");
if (!window.testRunner)
return;
input.addEventListener("click", () => {
hidden.style.display = "block";
input.focus();
testPassed("Did not crash.");
finishJSTest();
});
await UIHelper.activateElement(input);
});
</script>
</html>