blob: 6aebcfd28e0206ac9a57273e4a13ffdc45938388 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<form method="get">
<input name="victim" type="text" required oninvalid="testPassed('Invalid control')"/>
<input name="victim" type="text" pattern="Lorem ipsum" value="Loremipsum" oninvalid="testPassed('Invalid control')"/>
<textarea name="victim" required oninvalid="testPassed('Invalid control')"></textarea>
</form>
<div id="console"></div>
<script>
description("This test checks if checkValidity() correctly fires an invalid event on invalid form control elements.");
v = document.getElementsByName("victim");
for (i = 0; i < v.length; i++)
shouldBe("v[i].checkValidity()", "false");
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>