blob: 8e7e6ed77550c1673f8cdf30bf33e57ca6901856 [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>select_length</h3>
</p>
<li>In select control there is only 3 items.</li>
<hr>
<div id="log"></div>
<form method="post"
enctype="application/x-www-form-urlencoded"
action=""
id="input_form">
<p>
<label for="unittype">Select unit type:</label>
<select id="unittype" name="unittype">
<option value="1"> Miner </option>
<option value="2"> Puffer </option>
<option value="3" selected> Snipey </option>
<option value="4"> Max </option>
<option value="5"> Firebot </option>
</select>
</p>
</form>
<script>
var select = document.getElementById("unittype");
var length = select.length;
select.length = 3;
if (typeof(length) == "number") {
if (length != 5) {
test(function() {
assert_true(false, "length attribute is not correct.");
});
}
} else {
test(function() {
assert_unreached("length attribute is not exist.");
});
}
</script>
</body>
</html>