blob: 687428de7265b5c6c300bc2b050f9e1cc500bdf7 [file] [log] [blame]
<html>
<head>
<title>ValidityState minimal test case</title>
<script language="JavaScript" type="text/javascript">
function log(message) {
document.getElementById("console").innerHTML += "<li>"+message+"</li>";
}
function countAttr(o) {
a = 0;
for (pisell in o)
a++;
return a;
}
function test() {
if (window.testRunner)
testRunner.dumpAsText();
v = document.getElementsByName("victim");
for (i = 0; i < v.length; i++)
log('Test for ' + v[i].tagName + ': ' + ((v[i].validity && countAttr(v[i].validity) == 11) ? "SUCCESS" : "FAILURE"));
}
</script>
</head>
<body onload="test()">
<p>Each form control in this document exposes a validity attribute that returns
a live instance of ValidityState.</p>
<fieldset name="victim">
<select name="victim"></select>
<input name="victim"/>
<textarea name="victim"></textarea>
<button name="victim"></button>
<output name="victim"></output>
<object name="victim"></object>
</fieldset>
<hr>
<ol id="console"></ol>
</body>
</html>