| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <script src="../../resources/js-test-pre.js"></script> |
| :valid { background: lime; } |
| :invalid { background: red; } |
| select { background: red; } |
| <select name="victim"><option>Lorem ipsum</option></select> |
| <select name="victim" required><option>empty</option><option>another</option></select> |
| description("This test performs a check for the :valid CSS selector on a select element."); |
| v = document.getElementsByName("victim"); |
| for (i = 0; i < v.length; i++) |
| shouldBe("document.defaultView.getComputedStyle(v[i], null).getPropertyValue('background-color')", "'rgb(0, 255, 0)'"); |
| <script src="../../resources/js-test-post.js"></script> |