JS Test Harness: Insert the stylesheet dynamically
[WebKit-https.git] / LayoutTests / fast / forms / datetime / datetime-input-visible-string.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Datetime Input Test</title>
5 <script src="../../js/resources/js-test-pre.js"></script>
6 </head>
7 <body>
8 <p>The user-visible values of week input fields should be localized if the platform has
9 a LocalizedDate implementation. Otherwise, they should be in the HTML5 formats.</p>
10
11     <form method="get" action="#">
12         <input type="datetime"><br>
13     </form>
14
15     <div id=console></div>
16     <script>
17     var input = document.getElementsByTagName("input")[0];
18     // Tue Apr 26 2011 18:56:20 GMT-0700 (PDT) which is Wed Apr 27 2011 01:56:20 GMT.
19     input.valueAsDate = new Date(1303869380391);
20     input.focus();
21     document.execCommand("SelectAll");
22     debug(input.type + ": value='" + input.value + "' visible='" + document.getSelection().toString() + "'");
23
24     document.body.removeChild(document.getElementsByTagName("form")[0]);
25     var successfullyParsed = true;
26     </script>
27 <script src="../../js/resources/js-test-post.js"></script>
28 </body>
29 </html>