| OLD | NEW |
| (Empty) |
| 1 var style = document.createElement('style'); | |
| 2 style.appendChild(document.createTextNode("input { color: green; }")); | |
| 3 style.appendChild(document.createTextNode("input:checked { color: red; }")); | |
| 4 document.documentElement.firstChild.appendChild(style); | |
| 5 | |
| 6 var input1 = document.createElement('input'); | |
| 7 input1.type = 'radio'; | |
| 8 document.body.appendChild(input1); | |
| 9 input1.checked = true; | |
| 10 input1.type = "text"; | |
| 11 | |
| 12 var view = document.defaultView; | |
| 13 shouldBeEqualToString("view.getComputedStyle(input1, '').getPropertyValue('color
')", "rgb(0, 128, 0)"); | |
| 14 shouldBeTrue("input1.checked"); | |
| 15 | |
| 16 // cleanup | |
| 17 document.body.removeChild(input1); | |
| OLD | NEW |