| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src="../../resources/js-test.js"></script> |
| </head> |
| <body> |
| <select id="select"> |
| <optgroup> |
| <option value="A">A</option> |
| <option value="B">B</option> |
| <option value="C">C</option> |
| </optgroup> |
| </select> |
| </body> |
| <script> |
| |
| description("Tests that setting the value of a <select> element to an <option> within an <optgroup> sets the correct value."); |
| |
| shouldBeEqualToString("select.value", "A"); |
| select.value = "B"; |
| shouldBeEqualToString("select.value", "B"); |
| |
| </script> |
| </html> |