tizen beta release
[profile/ivi/webkit-efl.git] / LayoutTests / fast / forms / datetimelocal / input-valueasdate-datetimelocal.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 .valueAsDate with &lt;input type=datetimelocal>.');
11
12 var input = document.createElement('input');
13 input.type = 'datetime-local';
14
15 function valueAsDateFor(stringValue) {
16     input.value = stringValue;
17     return input.valueAsDate;
18 }
19
20 shouldBe('valueAsDateFor("")', 'null');
21 shouldBe('valueAsDateFor("1969-12-31T12:34:56.789")', 'null');
22 shouldBe('valueAsDateFor("1970-01-01T00:00:00.000")', 'null');
23 shouldBe('valueAsDateFor("2009-12-22T11:32:11")', 'null');
24 </script>
25 <script src="../../js/resources/js-test-post.js"></script>
26 </body>
27 </html>