blob: 9e4286b3400714834075450ce01a140ab21a2632 [file] [log] [blame]
<!DOCTYPE HTML>
<html>
<head>
<title>Forms</title>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
</head>
<body>
<p>
<h3>input_valueAsNumber</h3>
</p>
<li>Number 5 is showed in input when window is loaded.</li>
<hr>
<div id="log"></div>
<form method="post"
enctype="application/x-www-form-urlencoded"
action=""
name="input_form">
<p><input type='number' id='input_number'></p>
</form>
<script>
var input_number = document.getElementById("input_number");
input_number.valueAsNumber = 5;
if (typeof(input_number.valueAsNumber) == "number") {
if (input_number.value != 5) {
test(function() {
assert_true(false, "valueAsNumber attribute is not correct.");
});
}
} else {
test(function() {
assert_unreached("valueAsNumber attribute is not exist.");
});
}
</script>
</body>
</html>