haikuwebkit/LayoutTests/fast/forms/focus-style-pending.html

16 lines
477 B
HTML

<html>
<link rel=stylesheet href="data:text/css,bogus{}">
<script>
if (window.testRunner)
testRunner.dumpAsText();
</script>
<body>
Test that focus() sets input focus correctly even when there are pending stylesheet loads.<br>
<input id=t onfocus="window.hasFocus=1">
<script>
var hasFocus = 0;
var t = document.getElementById('t');
t.focus();
document.write('<br>' + (hasFocus ? "<span style='color:green'>PASS</span>" : "<span style='color:red'>FAIL</span>"));
</script>