3 <script src=
"../../../resources/js-test.js"></script>
6 <input type=
"date" style=
"visibility: hidden;">
7 <input type=
"date" style=
"display: none;">
8 <input type=
"date" value=
"parsing"><!-- This should show one warning. -->
11 var visibleInput
= document
.querySelectorAll('input')[0];
12 var invisibleInput2
= document
.querySelectorAll('input')[1];
13 var invisibleInput3
= document
.querySelectorAll('input')[2];
14 // Force layout. The warning message behavior depends on computed style.
15 visibleInput
.offsetWidth
;
17 debug('Invisible INPUT element should not show a format warning.');
18 invisibleInput2
.value
= ':)';
19 invisibleInput3
.value
= ':)';
22 debug('Visible INPUT element should show a format warning. We\'ll see three warnings.');
23 visibleInput
.setAttribute('value', 'Invalid attribute value'); // This shows a warning.
24 visibleInput
.type
= 'text';
25 visibleInput
.type
= 'date'; // This shows a warning again.
27 visibleInput
.offsetWidth
;
28 visibleInput
.value
= 'Invalid IDL value'; // This shows a warning.
29 visibleInput
.type
= 'text';
30 visibleInput
.type
= 'date'; // This doesn't show a warning.
32 document
.querySelector('#container').remove();