| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <title>HTMLOptionsCollection</title> | 2 <title>HTMLOptionsCollection</title> |
| 3 <script src="/resources/testharness.js"></script> | 3 <script src="/resources/testharness.js"></script> |
| 4 <script src="/resources/testharnessreport.js"></script> | 4 <script src="/resources/testharnessreport.js"></script> |
| 5 <link rel="help" href="https://html.spec.whatwg.org/multipage/#htmloptionscollec
tion-0"> | 5 <link rel="help" href="https://html.spec.whatwg.org/multipage/#htmloptionscollec
tion-0"> |
| 6 <select id=a> | 6 <select id=a> |
| 7 <option>1</option> | 7 <option>1</option> |
| 8 <option>2</option> | 8 <option>2</option> |
| 9 <option>3</option> | 9 <option>3</option> |
| 10 <!-- Note whitespace is important --> | 10 <!--Note whitespace is important--> |
| 11 <option>4</option> | 11 <option>4</option> |
| 12 <option>5</option> | 12 <option>5</option> |
| 13 </select> | 13 </select> |
| 14 | 14 |
| 15 <select id=b> | 15 <select id=b> |
| 16 <option id=b1>1</option> | 16 <option id=b1>1</option> |
| 17 <option name=b2>2</option> | 17 <option name=b2>2</option> |
| 18 <option id=b3>3</option> | 18 <option id=b3>3</option> |
| 19 <option id=b3>4</option> | 19 <option id=b3>4</option> |
| 20 <option name=b4>5</option> | 20 <option name=b4>5</option> |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 assert_equals(b_opts.length, b_opts_length - 1); | 207 assert_equals(b_opts.length, b_opts_length - 1); |
| 208 }, "HTMLOptionsCollection.remove method remove Option element by index"); | 208 }, "HTMLOptionsCollection.remove method remove Option element by index"); |
| 209 | 209 |
| 210 test(function() { | 210 test(function() { |
| 211 var add = document.createElement("p"); | 211 var add = document.createElement("p"); |
| 212 assert_throws(new TypeError(), function() {b_opts.add(add);}); | 212 assert_throws(new TypeError(), function() {b_opts.add(add);}); |
| 213 }, "Add non-option to collection"); | 213 }, "Add non-option to collection"); |
| 214 | 214 |
| 215 </script> | 215 </script> |
| 216 <div id=log></div> | 216 <div id=log></div> |
| OLD | NEW |