| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../js/resources/js-test-pre.js"></script> | 4 <script src="../../js/resources/js-test-pre.js"></script> |
| 5 <script src="../resources/common.js"></script> | 5 <script src="../resources/common.js"></script> |
| 6 </head> | 6 </head> |
| 7 <body> | 7 <body> |
| 8 Please run this test within DumpRenderTree. | 8 Please run this test within DumpRenderTree. |
| 9 <script> | 9 <script> |
| 10 function keyDown(key, modifiers) | 10 function keyDown(key, modifiers) |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 var sample = document.createElement("span"); | 22 var sample = document.createElement("span"); |
| 23 sample.style.backgroundColor = "highlight"; | 23 sample.style.backgroundColor = "highlight"; |
| 24 sample.style.color = "highlighttext"; | 24 sample.style.color = "highlighttext"; |
| 25 document.body.appendChild(sample); | 25 document.body.appendChild(sample); |
| 26 var sampleStyle = getComputedStyle(sample); | 26 var sampleStyle = getComputedStyle(sample); |
| 27 var highlighttext = sampleStyle.color; | 27 var highlighttext = sampleStyle.color; |
| 28 var highlight = sampleStyle.backgroundColor; | 28 var highlight = sampleStyle.backgroundColor; |
| 29 | 29 |
| 30 testInput.focus(); | 30 testInput.focus(); |
| 31 var shadowRoot = internals.oldestShadowRoot(testInput); | 31 var shadowRoot = internals.oldestShadowRoot(testInput); |
| 32 var fields = getElementByPseudoId(shadowRoot, "-webkit-datetime-edit").childNode
s; | 32 var fields = getElementByPseudoId(shadowRoot, "-webkit-datetime-edit-fields-wrap
per").childNodes; |
| 33 for (var index = 0; index < fields.length; ++index) { | 33 for (var index = 0; index < fields.length; ++index) { |
| 34 var field = fields[index]; | 34 var field = fields[index]; |
| 35 if (field.nodeType != 1) | 35 if (field.nodeType != 1) |
| 36 continue; | 36 continue; |
| 37 var id = internals.shadowPseudoId(field); | 37 var id = internals.shadowPseudoId(field); |
| 38 if (id.indexOf('-field') < 0) | 38 if (id.indexOf('-field') < 0) |
| 39 continue; | 39 continue; |
| 40 var style = getComputedStyle(field); | 40 var style = getComputedStyle(field); |
| 41 shouldBe('"' + id + '"; style.backgroundColor', 'highlight'); | 41 shouldBe('"' + id + '"; style.backgroundColor', 'highlight'); |
| 42 shouldBe('"' + id + '"; style.color', 'highlighttext'); | 42 shouldBe('"' + id + '"; style.color', 'highlighttext'); |
| 43 keyDown('rightArrow'); | 43 keyDown('rightArrow'); |
| 44 } | 44 } |
| 45 debug(''); | 45 debug(''); |
| 46 testInput.parentElement.removeChild(testInput); | 46 testInput.parentElement.removeChild(testInput); |
| 47 sample.parentElement.removeChild(sample); | 47 sample.parentElement.removeChild(sample); |
| 48 </script> | 48 </script> |
| 49 <script src="../../js/resources/js-test-post.js"></script> | 49 <script src="../../js/resources/js-test-post.js"></script> |
| 50 </body> | 50 </body> |
| 51 </html> | 51 </html> |
| OLD | NEW |