summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/forms/select/select-assign-null.html
blob: d9066befb69cd5a745f34105d077e93a6d8747fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/js-test.js"></script>
</head>
<body>
<select id="tags">
<option selected="selected" value="marquee">marquee</option>
<option value="blink">blink</option>
</select>
<script>
description('Check if an option is removed when it is assigned null.');
var tags = document.getElementById('tags');
shouldBe("tags.options.length", "2");

tags[0] = null;
shouldBe("tags.options.length", "1");

tags[tags.length] = new Option("bgsound", "bgsound");
shouldBe("tags.options.length", "2");
</script>
</body>
</html>