OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <title>HTMLSelectElement.value null handling</title> |
| 3 <script src="../../resources/testharness.js"></script> |
| 4 <script src="../../resources/testharnessreport.js"></script> |
| 5 <script> |
| 6 </script> |
| 7 <select> |
| 8 <option id="option1" value=""></option> |
| 9 <option id="option2" value="null"></option> |
| 10 </select> |
| 11 <div id="log"></div> |
| 12 <script> |
| 13 test(function() |
| 14 { |
| 15 var select = document.querySelector('select'); |
| 16 assert_equals(select.value, ""); |
| 17 assert_true(document.getElementById("option1").selected); |
| 18 select.value = null; |
| 19 assert_equals(select.value, "null"); |
| 20 assert_true(document.getElementById("option2").selected); |
| 21 }, "Setting HTMLSelectElement.value to null"); |
| 22 </script> |
OLD | NEW |