OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <body> | |
3 <script src="../../resources/js-test.js"></script> | |
4 <div id="container"> | |
5 <input type="email"> | |
6 <input type="email" style="visibility: hidden;"> | |
7 <input type="email" style="display: none;"> | |
8 <input type="email" value="parsing☺"><!-- This should show one warning. -
-> | |
9 <input value="value-before-type☺" type="email"><!-- This should show one
warning. --> | |
10 <input value="valid@example.com, invalid-in-multiple☺" type="email" multi
ple><!-- This should show one warning. --> | |
11 </div> | |
12 <script> | |
13 var inputs = document.querySelectorAll('input'); | |
14 var visibleInput = inputs[0]; | |
15 var invisibleInput2 = inputs[1]; | |
16 var invisibleInput3 = inputs[2]; | |
17 // Force layout. The warning message behavior depends on computed style. | |
18 visibleInput.offsetWidth; | |
19 | |
20 debug('Invisible INPUT element should not show a format warning.'); | |
21 invisibleInput2.value = ':)'; | |
22 invisibleInput3.value = ':)'; | |
23 debug(''); | |
24 | |
25 debug('Visible INPUT element should show a format warning. We\'ll see three warn
ings.'); | |
26 visibleInput.setAttribute('value', 'Invalid attribute value'); // This shows a w
arning. | |
27 visibleInput.type = 'text'; | |
28 visibleInput.type = 'email'; // This shows a warning again. | |
29 | |
30 visibleInput.offsetWidth; | |
31 visibleInput.value = 'Invalid IDL value'; // This shows a warning. | |
32 visibleInput.type = 'text'; | |
33 visibleInput.type = 'email'; // This doesn't show a warning. | |
34 | |
35 document.querySelector('#container').remove(); | |
36 </script> | |
37 </body> | |
OLD | NEW |