OLD | NEW |
---|---|
1 description("This test performs a check that :valid/:invalid CSS psudo selectors are lively applied."); | 1 description("This test performs a check that :valid/:invalid CSS psudo selectors are lively applied."); |
2 | 2 |
3 // Setup for static elements. | 3 // Setup for static elements. |
4 var form = document.createElement('form'); | 4 var form = document.createElement('form'); |
5 document.body.appendChild(form); | 5 document.body.appendChild(form); |
6 var nonForm = document.createElement('div'); | 6 var nonForm = document.createElement('div'); |
7 document.body.appendChild(nonForm); | 7 document.body.appendChild(nonForm); |
8 | 8 |
9 function mouseDownOnSelect(selId, index, modifier) { | 9 function mouseDownOnSelect(selId, index, modifier) { |
10 var sl = document.getElementById(selId); | 10 var sl = document.getElementById(selId); |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
109 ' <option id="multiple-empty">empty</option>' + | 109 ' <option id="multiple-empty">empty</option>' + |
110 ' <option id="multiple-another">another</option>' + | 110 ' <option id="multiple-another">another</option>' + |
111 '</select>' + | 111 '</select>' + |
112 '<select id="select-size4" size="4" required>' + | 112 '<select id="select-size4" size="4" required>' + |
113 ' <option id="size4-empty">empty</option>' + | 113 ' <option id="size4-empty">empty</option>' + |
114 ' <option id="size4-another">another</option>' + | 114 ' <option id="size4-another">another</option>' + |
115 '</select>'; | 115 '</select>'; |
116 mouseDownOnSelect('select-multiple', 0); | 116 mouseDownOnSelect('select-multiple', 0); |
117 mouseDownOnSelect('select-size4', 0); | 117 mouseDownOnSelect('select-size4', 0); |
118 shouldBe('backgroundOf("select-multiple")', 'validColor'); | 118 shouldBe('backgroundOf("select-multiple")', 'validColor'); |
119 shouldBe('backgroundOf("multiple-empty")', 'transparentColor'); | 119 shouldNotBe('backgroundOf("multiple-empty")', 'validColor'); |
keishi
2014/06/22 11:59:55
Background color of this option is -internal-activ
| |
120 shouldBe('backgroundOf("select-size4")', 'validColor'); | 120 shouldBe('backgroundOf("select-size4")', 'validColor'); |
121 shouldBe('backgroundOf("size4-empty")', 'transparentColor'); | 121 shouldNotBe('backgroundOf("size4-empty")', 'validColor'); |
122 | 122 |
123 debug('Change the value with a placeholder label option:'); | 123 debug('Change the value with a placeholder label option:'); |
124 el = makeInvalid(); | 124 el = makeInvalid(); |
125 o1 = appendOption('', el); | 125 o1 = appendOption('', el); |
126 o2 = appendOption('X', el); | 126 o2 = appendOption('X', el); |
127 o2.selected = true; | 127 o2.selected = true; |
128 shouldBe(elBackground, 'validColor'); | 128 shouldBe(elBackground, 'validColor'); |
129 o1.selected = true; | 129 o1.selected = true; |
130 shouldBe(elBackground, 'invalidColor'); | 130 shouldBe(elBackground, 'invalidColor'); |
131 | 131 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
205 // -------------------------------- | 205 // -------------------------------- |
206 debug('Change required:'); | 206 debug('Change required:'); |
207 el = makeInvalid(); | 207 el = makeInvalid(); |
208 o1 = appendOption('', el); | 208 o1 = appendOption('', el); |
209 o2 = appendOption('X', el); | 209 o2 = appendOption('X', el); |
210 o1.selected = true; | 210 o1.selected = true; |
211 el.required = false; | 211 el.required = false; |
212 shouldBe(elBackground, 'validColor'); | 212 shouldBe(elBackground, 'validColor'); |
213 el.required = true; | 213 el.required = true; |
214 shouldBe(elBackground, 'invalidColor'); | 214 shouldBe(elBackground, 'invalidColor'); |
OLD | NEW |