3 <script src='test.js'
></script>
4 <script src='is_option_element_toggleable.js'
></script>
7 function testNonoptionElement() {
9 isOptionElementToggleable(document
.getElementById("s"));
12 assert(error
.message
);
13 assertEquals('element is not an option', error
.message
);
17 function testOptionNotInSelect() {
19 isOptionElementToggleable(document
.getElementById("b"));
22 assert(error
.message
);
23 assertEquals('option element is not in a select', error
.message
);
27 function testTogglable() {
28 document
.getElementById("s").multiple
= 'multiple';
29 assert(isOptionElementToggleable(document
.getElementById("a")));
32 function testNotTogglable() {
33 document
.getElementById("s").multiple
= '';
34 assert(!isOptionElementToggleable(document
.getElementById("a")));
40 <option id=
"a">a
</option>
42 <option id =
"b">b
</option>