3 <script src=
"../../resources/js-test.js"></script>
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" multiple
><!-- This should show one warning. -->
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
;
20 debug('Invisible INPUT element should not show a format warning.');
21 invisibleInput2
.value
= ':)';
22 invisibleInput3
.value
= ':)';
25 debug('Visible INPUT element should show a format warning. We\'ll see three warnings.');
26 visibleInput
.setAttribute('value', 'Invalid attribute value'); // This shows a warning.
27 visibleInput
.type
= 'text';
28 visibleInput
.type
= 'email'; // This shows a warning again.
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.
35 document
.querySelector('#container').remove();