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 makeInvalid() { | 19 function makeInvalid() { |
10 var i = document.createElement('textarea'); | 20 var i = document.createElement('textarea'); |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 el.value = '1234567890'; | 104 el.value = '1234567890'; |
95 shouldBe(elBackground, 'validColor'); | 105 shouldBe(elBackground, 'validColor'); |
96 // Make the value dirty by deleting the last character. | 106 // Make the value dirty by deleting the last character. |
97 el.focus(); | 107 el.focus(); |
98 el.setSelectionRange(10, 10); | 108 el.setSelectionRange(10, 10); |
99 eventSender.keyDown('backspace'); | 109 eventSender.keyDown('backspace'); |
100 el.maxLength = 5; | 110 el.maxLength = 5; |
101 shouldBe(elBackground, 'invalidColor'); | 111 shouldBe(elBackground, 'invalidColor'); |
102 el.maxLength = 10; | 112 el.maxLength = 10; |
103 shouldBe(elBackground, 'validColor'); | 113 shouldBe(elBackground, 'validColor'); |
| 114 </script> |
| 115 </body> |
| 116 </html> |
OLD | NEW |