4 <script src="../../js/resources/js-test-pre.js"></script>
7 <p id="description"></p>
8 <div id="console"></div>
10 description('Tests for writing and reading .type property of HTMLInputElement.');
12 var input = document.createElement('input');
13 document.body.appendChild(input);
15 function check(value, expected)
18 if (input.type == expected)
19 testPassed('input.type for "' + value + '" is correctly "' + input.type + '".');
21 testFailed('input.type for "' + value + '" is incorrectly "' + input.type + '", should be "' + expected + '".');
24 check("datetime-local", "datetime-local");
25 check("DATETIME-LOCAL", "datetime-local");
26 check(" datetime-local ", "text");
27 check("datetimelocal", "text");
28 check("datetime_local", "text");
30 <script src="../../js/resources/js-test-post.js"></script>