OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../../resources/js-test.js"></script> | 3 <script src="../../resources/js-test.js"></script> |
4 </head> | 4 </head> |
5 <body> | 5 <body> |
6 <input id="input" type='date' /> | 6 <input id="input" type='date' /> |
7 <script> | 7 <script> |
8 description("This tests that changing an input element's type or speech attribut
e does not cause focusout event."); | 8 description("This tests that changing an input element's type or speech attribut
e does not cause focusout event."); |
9 | 9 |
10 focusoutCalled = false; | 10 focusoutCalled = false; |
11 | 11 |
12 input.addEventListener('focusout', function() { | 12 input.addEventListener('focusout', function() { |
13 focusoutCalled = true; | 13 focusoutCalled = true; |
14 }); | 14 }); |
15 input.focus(); | 15 input.focus(); |
16 input.setAttribute('x-webkit-speech'); | 16 input.setAttribute('x-webkit-speech', ''); |
17 shouldBeFalse('focusoutCalled'); | 17 shouldBeFalse('focusoutCalled'); |
18 input.type = 'month'; | 18 input.type = 'month'; |
19 shouldBeFalse('focusoutCalled'); | 19 shouldBeFalse('focusoutCalled'); |
20 input.type = 'week'; | 20 input.type = 'week'; |
21 shouldBeFalse('focusoutCalled'); | 21 shouldBeFalse('focusoutCalled'); |
22 input.type = 'time'; | 22 input.type = 'time'; |
23 shouldBeFalse('focusoutCalled'); | 23 shouldBeFalse('focusoutCalled'); |
24 input.type = 'datetime-local'; | 24 input.type = 'datetime-local'; |
25 shouldBeFalse('focusoutCalled'); | 25 shouldBeFalse('focusoutCalled'); |
26 input.type = 'text'; | 26 input.type = 'text'; |
27 shouldBeFalse('focusoutCalled'); | 27 shouldBeFalse('focusoutCalled'); |
28 | 28 |
29 </script> | 29 </script> |
30 </body> | 30 </body> |
31 </html> | 31 </html> |
OLD | NEW |