pkasting@chromium.org | 482148e | 2009-08-18 19:50:04 +0000 | [diff] [blame] | 1 | <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| 2 | <html> |
| 3 | <head> |
pkasting@chromium.org | 482148e | 2009-08-18 19:50:04 +0000 | [diff] [blame] | 4 | <script src="../js/resources/js-test-pre.js"></script> |
| 5 | <style> |
| 6 | :valid { background: lime; } |
| 7 | :invalid { background: red; } |
| 8 | select { background: red; } |
| 9 | </style> |
| 10 | </head> |
| 11 | <body> |
| 12 | <p id="description"></p> |
| 13 | <form method="get"> |
| 14 | <select name="victim"><option>Lorem ipsum</option></select> |
commit-queue@webkit.org | 7b050ca | 2010-12-22 11:38:33 +0000 | [diff] [blame] | 15 | <select name="victim" required><option>empty</option><option>another</option></select> |
pkasting@chromium.org | 482148e | 2009-08-18 19:50:04 +0000 | [diff] [blame] | 16 | </form> |
| 17 | <div id="console"></div> |
| 18 | <script> |
| 19 | description("This test performs a check for the :valid CSS selector on a select element."); |
| 20 | |
| 21 | v = document.getElementsByName("victim"); |
| 22 | for (i = 0; i < v.length; i++) |
| 23 | shouldBe("document.defaultView.getComputedStyle(v[i], null).getPropertyValue('background-color')", "'rgb(0, 255, 0)'"); |
pkasting@chromium.org | 482148e | 2009-08-18 19:50:04 +0000 | [diff] [blame] | 24 | </script> |
| 25 | <script src="../js/resources/js-test-post.js"></script> |
| 26 | </body> |
| 27 | </html> |