OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../../fast/js/resources/js-test-pre.js"></script> | 4 <script src="../../../fast/js/resources/js-test-pre.js"></script> |
5 <style> | 5 <style> |
6 :invalid { | 6 :invalid { |
7 background-color: #ff0000; | 7 background-color: #ff0000; |
8 } | 8 } |
9 </style> | 9 </style> |
10 </head> | 10 </head> |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 shouldBeTrue('number.validity.badInput'); | 52 shouldBeTrue('number.validity.badInput'); |
53 // Visible value is '-1a'. | 53 // Visible value is '-1a'. |
54 number.focus(); | 54 number.focus(); |
55 document.execCommand('SelectAll'); | 55 document.execCommand('SelectAll'); |
56 shouldBeEqualToString('document.getSelection().toString()', '-1a'); | 56 shouldBeEqualToString('document.getSelection().toString()', '-1a'); |
57 shouldBeEqualToString('number.value', ''); | 57 shouldBeEqualToString('number.value', ''); |
58 | 58 |
59 debug("The element losts a renderer. The element state should not be changed."); | 59 debug("The element losts a renderer. The element state should not be changed."); |
60 shouldBeTrue('number.style.display = "none"; number.validity.badInput'); | 60 shouldBeTrue('number.style.display = "none"; number.validity.badInput'); |
61 | 61 |
| 62 number.style.display = 'inline-block'; |
| 63 number.focus(); |
| 64 debug('A bad input should be cleared by value="".'); |
| 65 shouldBeEqualToString('number.value = ""; document.execCommand("SelectAll"); doc
ument.getSelection().toString()', ''); |
| 66 |
62 document.getElementById('parent').innerHTML = ''; | 67 document.getElementById('parent').innerHTML = ''; |
63 </script> | 68 </script> |
64 <script src="../../../fast/js/resources/js-test-post.js"></script> | 69 <script src="../../../fast/js/resources/js-test-post.js"></script> |
65 </body> | 70 </body> |
66 </html> | 71 </html> |
OLD | NEW |