servo/tests/content/test_document_activeElement.html
2015-04-04 10:57:11 -07:00

18 lines
649 B
HTML

<!doctype html>
<html>
<head >
<title></title>
<script src="harness.js"></script>
</head>
<body>
<input id="foo" type="text"></input>
<script>
is_not(document.activeElement, null, "test_1.1, document.activeElement");
is(document.activeElement, document.body, "test_1.2, document.activeElement");
document.getElementById('foo').focus();
is_not(document.activeElement, null, "test_2.1, document.activeElement");
is(document.activeElement, document.getElementById("foo"), "test_2.2, document.activeElement");
</script>
</body>
</html>