OLD | NEW |
| 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| 2 <html> |
| 3 <head> |
| 4 <link rel="stylesheet" href="../resources/live-pseudo-selectors.css"> |
| 5 <script src="../../../resources/js-test.js"></script> |
| 6 </head> |
| 7 <body> |
| 8 <p id="description"></p> |
| 9 <div id="console"></div> |
| 10 <script> |
1 description("This test performs a check that :valid/:invalid CSS psudo selectors
are lively applied."); | 11 description("This test performs a check that :valid/:invalid CSS psudo selectors
are lively applied."); |
2 | 12 |
3 // Setup for static elements. | 13 // Setup for static elements. |
4 var form = document.createElement('form'); | 14 var form = document.createElement('form'); |
5 document.body.appendChild(form); | 15 document.body.appendChild(form); |
6 var nonForm = document.createElement('div'); | 16 var nonForm = document.createElement('div'); |
7 document.body.appendChild(nonForm); | 17 document.body.appendChild(nonForm); |
8 | 18 |
9 function mouseDownOnSelect(selId, index, modifier) { | 19 function mouseDownOnSelect(selId, index, modifier) { |
10 var sl = document.getElementById(selId); | 20 var sl = document.getElementById(selId); |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 // -------------------------------- | 213 // -------------------------------- |
204 debug('Change required:'); | 214 debug('Change required:'); |
205 el = makeInvalid(); | 215 el = makeInvalid(); |
206 o1 = appendOption('', el); | 216 o1 = appendOption('', el); |
207 o2 = appendOption('X', el); | 217 o2 = appendOption('X', el); |
208 o1.selected = true; | 218 o1.selected = true; |
209 el.required = false; | 219 el.required = false; |
210 shouldBe(elBackground, 'validColor'); | 220 shouldBe(elBackground, 'validColor'); |
211 el.required = true; | 221 el.required = true; |
212 shouldBe(elBackground, 'invalidColor'); | 222 shouldBe(elBackground, 'invalidColor'); |
| 223 </script> |
| 224 </body> |
| 225 </html> |
OLD | NEW |