OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE> |
| 2 <html> |
| 3 <head> |
| 4 <script src="../resources/common.js"></script> |
| 5 <script src="../../../resources/js-test.js"></script> |
| 6 </head> |
| 7 <body> |
| 8 |
| 9 <input id="input" type="date" style="font-family:ahem; font-size:16px;"> |
| 10 <button id="js-btn-test" type="button"></button> |
| 11 |
| 12 <script> |
| 13 description('Tests, after clicking mouse on clearInputButton of date input type,
will release mouse capture in case of preventdefault.'); |
| 14 |
| 15 var input = document.getElementById('input'); |
| 16 input.value = '2345-07-19'; |
| 17 |
| 18 var btn = document.getElementById('js-btn-test'); |
| 19 var output = ''; |
| 20 |
| 21 btn.addEventListener('click', function () |
| 22 { |
| 23 output = 'Clicked'; |
| 24 }); |
| 25 |
| 26 document.addEventListener('mouseup', function (evt) |
| 27 { |
| 28 evt.preventDefault(); |
| 29 }); |
| 30 |
| 31 var clearButton = getElementByPseudoId(internals.oldestShadowRoot(input),'-webki
t-clear-button'); |
| 32 clickElement(clearButton); |
| 33 shouldBeEqualToString('input.value', ''); |
| 34 |
| 35 clickElement(btn); |
| 36 shouldBeEqualToString('output', 'Clicked'); |
| 37 </script> |
| 38 </body> |
| 39 </html> |
OLD | NEW |