JS Test Harness: Insert the stylesheet dynamically
[WebKit-https.git] / LayoutTests / fast / forms / week / week-input-type.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../js/resources/js-test-pre.js"></script>
5 </head>
6 <body>
7 <p id="description"></p>
8 <div id="console"></div>
9 <script>
10 description('Tests for writing and reading .type property of HTMLInputElement.');
11
12 var input = document.createElement('input');
13 document.body.appendChild(input);
14
15 function check(value, expected)
16 {
17     input.type = value;
18     if (input.type == expected)
19         testPassed('input.type for "' + value + '" is correctly "' + input.type + '".');
20     else
21         testFailed('input.type for "' + value + '" is incorrectly "' + input.type + '", should be "' + expected + '".');
22 }
23
24 check("week", "week");
25 check("WEEK", "week");
26 check(" week ", "text");
27
28 var successfullyParsed = true;
29 </script>
30 <script src="../../js/resources/js-test-post.js"></script>
31 </body>
32 </html>
33