| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <body> | |
| 3 <script src="../../../resources/js-test.js"></script> | |
| 4 <style> | |
| 5 input, input[type="datetime-local"] { | |
| 6 padding: 0; | |
| 7 border: none; | |
| 8 display: inilne-block; | |
| 9 font-family: monospace; | |
| 10 } | |
| 11 </style> | |
| 12 <input type="email"> | |
| 13 <script> | |
| 14 description('Test if changing input type keeps author ShadowRoot content.'); | |
| 15 | |
| 16 var input1 = document.querySelector('input'); | |
| 17 var initialWidth = input1.offsetWidth; | |
| 18 shouldNotBe('initialWidth', '0'); | |
| 19 | |
| 20 var root = input1.createShadowRoot(); | |
| 21 root.innerHTML = '<span>a</span>'; | |
| 22 var widthWithShadow = input1.offsetWidth; | |
| 23 shouldNotBe('widthWithShadow', 'initialWidth'); | |
| 24 | |
| 25 shouldBe('input1.type = "hidden"; input1.offsetWidth', '0'); | |
| 26 shouldBe('input1.type = "datetime-local"; input1.offsetWidth', 'widthWithShadow'
); | |
| 27 shouldBeEqualToString('input1.type = "range"; input1.value', '50'); | |
| 28 input1.focus(); | |
| 29 shouldBeEqualToString('eventSender.keyDown("rightArrow"); input1.value', '50'); | |
| 30 </script> | |
| 31 </body> | |
| OLD | NEW |