Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(450)

Side by Side Diff: LayoutTests/imported/web-platform-tests/html/semantics/forms/the-input-element/datetime.html

Issue 1144143009: W3C Test: Import web-platform-tests/html/semantics (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Date & Time Inputs</title>
5 <meta name=viewport content="width=device-width, maximum-scale=1.0, user-sca lable=no" />
6 <link rel="author" title="Fabrice Clari" href="mailto:f.clari@inno-group.com ">
7 <link rel="author" title="Dimitri Bocquet" href="mailto:Dimitri.Bocquet@mosq uito-fp7.eu">
8 <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-input-ele ment">
9 <script src="../../../../../../resources/testharness.js"></script>
10 <script src="../../../../../../resources/testharnessreport.js"></script>
11 </head>
12 <body>
13
14 <h1>Date & Time Inputs</h1>
15 <div style="display: none">
16 <input type="date" value="2011-12-01" min="2011-12-01" max="2011-12-31" step="5" />
17 <input type="time" value= "12:00" min="11:30" max="14:00" step="600" />
18 <input type="datetime" value="2011-12-01T12:00Z" min="2011-12-01T12:00Z" max="2011-12-31T22:00Z" step="7200" />
19 <input type="month" value="2011-01" min="2011-01" max="2011-12" step="2" />
20 <input type="week" value="2011-W40" min="2011-W20" max="2011-W50" step=" 2" />
21 </div>
22
23 <div id="log">
24 </div>
25
26 <script type="text/javascript">
27 test(function() {assert_equals(document.getElementsByTagName("input")[0].typ e, "date")}, "date type support on input element", {
28 "help" : "https://html.spec.whatwg.org/multipage/#dom-input-type" });
29 test(function() {assert_equals(document.getElementsByTagName("input")[0].val ue, "2011-12-01")}, "[date] The value must be a valid global date and time strin g", {
30 "help" : "https://html.spec.whatwg.org/multipage/#dom-input-value" });
31 test(function() {assert_equals(document.getElementsByTagName("input")[0].min , "2011-12-01")}, "[date] The min attribute must have a value that is a valid gl obal date and time string", {
32 "help" : "https://html.spec.whatwg.org/multipage/#dom-input-min" });
33 test(function() {assert_equals(document.getElementsByTagName("input")[0].max , "2011-12-31")}, "[date] The max attribute must have a value that is a valid gl obal date and time string", {
34 "help" : "https://html.spec.whatwg.org/multipage/#dom-input-max" });
35 test(function() {assert_equals(document.getElementsByTagName("input")[0].ste p, "5")}, "[date] The step attribute must be expressed in seconds", {
36 "help" : "https://html.spec.whatwg.org/multipage/#dom-input-step" });
37 test(function() {assert_true(typeof(document.getElementsByTagName("input")[0 ].stepUp) == "function")}, "[date] stepUp method support on input 'date' element ", {
38 "help" : "https://html.spec.whatwg.org/multipage/#dom-input-stepup" });
39 test(function() {assert_true(typeof(document.getElementsByTagName("input")[0 ].stepDown) == "function")}, "[date] stepDown method support on input 'date' ele ment", {
40 "help" : "https://html.spec.whatwg.org/multipage/#dom-input-stepdown" });
41
42 test(function() {assert_equals(document.getElementsByTagName("input")[1].typ e, "time")}, "[time] time type support on input element", {
43 "help" : "https://html.spec.whatwg.org/multipage/#dom-input-type" });
44 test(function() {assert_equals(document.getElementsByTagName("input")[1].val ue, "12:00")}, "[time] The value must be a valid global date and time string", {
45 "help" : "https://html.spec.whatwg.org/multipage/#dom-input-value" });
46 test(function() {assert_equals(document.getElementsByTagName("input")[1].min , "11:30")}, "[time] The min attribute must have a value that is a valid global date and time string", {
47 "help" : "https://html.spec.whatwg.org/multipage/#dom-input-min" });
48 test(function() {assert_equals(document.getElementsByTagName("input")[1].max , "14:00")}, "[time] The max attribute must have a value that is a valid global date and time string", {
49 "help" : "https://html.spec.whatwg.org/multipage/#dom-input-max" });
50 test(function() {assert_equals(document.getElementsByTagName("input")[1].ste p, "600")}, "[time] The step attribute must be expressed in seconds", {
51 "help" : "https://html.spec.whatwg.org/multipage/#dom-input-step" });
52 test(function() {assert_true(typeof(document.getElementsByTagName("input")[1 ].stepUp) == "function")}, "[time] stepUp method support on input 'time' element ", {
53 "help" : "https://html.spec.whatwg.org/multipage/#dom-input-stepup" });
54 test(function() {assert_true(typeof(document.getElementsByTagName("input")[1 ].stepDown) == "function")}, "[time] stepDown method support on input 'time' ele ment", {
55 "help" : "https://html.spec.whatwg.org/multipage/#dom-input-stepdown" });
56
57 test(function() {assert_equals(document.getElementsByTagName("input")[2].typ e, "datetime")}, "datetime type support on input element", {
58 "help" : "https://html.spec.whatwg.org/multipage/#dom-input-type" });
59 test(function() {assert_equals(document.getElementsByTagName("input")[2].val ue, "2011-12-01T12:00Z")}, "[datetime] The must be a valid global date and time string", {
60 "help" : "https://html.spec.whatwg.org/multipage/#dom-input-value" });
61 test(function() {assert_equals(document.getElementsByTagName("input")[2].min , "2011-12-01T12:00Z")}, "[datetime] The min attribute must have a value that is a valid global date and time string", {
62 "help" : "https://html.spec.whatwg.org/multipage/#dom-input-min" });
63 test(function() {assert_equals(document.getElementsByTagName("input")[2].max , "2011-12-31T22:00Z")}, "[datetime] The max attribute must have a value that is a valid global date and time string", {
64 "help" : "https://html.spec.whatwg.org/multipage/#dom-input-max" });
65 test(function() {assert_equals(document.getElementsByTagName("input")[2].ste p, "7200")}, "[datetime] The step attribute must be expressed in seconds", {
66 "help" : "https://html.spec.whatwg.org/multipage/#dom-input-step" });
67 test(function() {assert_true(typeof(document.getElementsByTagName("input")[2 ].stepUp) == "function")}, "[datetime] stepUp method support on input 'datetime' element", {
68 "help" : "https://html.spec.whatwg.org/multipage/#dom-input-stepup" });
69 test(function() {assert_true(typeof(document.getElementsByTagName("input")[2 ].stepDown) == "function")}, "[datetime] stepDown method support on input 'datet ime' element", {
70 "help" : "https://html.spec.whatwg.org/multipage/#dom-input-stepdown" });
71
72 test(function() {assert_equals(document.getElementsByTagName("input")[3].typ e, "month")}, "month type support on input element", {
73 "help" : "https://html.spec.whatwg.org/multipage/#dom-input-type" });
74 test(function() {assert_equals(document.getElementsByTagName("input")[3].val ue, "2011-01")}, "[month] The value must be a value that is a valid global date and time string", {
75 "help" : "https://html.spec.whatwg.org/multipage/#dom-input-value" });
76 test(function() {assert_equals(document.getElementsByTagName("input")[3].min , "2011-01")}, "[month] The min attribute must have a value that is a valid glob al date and time string", {
77 "help" : "https://html.spec.whatwg.org/multipage/#dom-input-min" });
78 test(function() {assert_equals(document.getElementsByTagName("input")[3].max , "2011-12")}, "[month] The max attribute must have a value that is a valid glob al date and time string", {
79 "help" : "https://html.spec.whatwg.org/multipage/#dom-input-max" });
80 test(function() {assert_equals(document.getElementsByTagName("input")[3].ste p, "2")}, "[month] The step attribute must be expressed in seconds", {
81 "help" : "https://html.spec.whatwg.org/multipage/#dom-input-step" });
82 test(function() {assert_true(typeof(document.getElementsByTagName("input")[3 ].stepUp) == "function")}, "[month] stepUp method support on input 'month' eleme nt", {
83 "help" : "https://html.spec.whatwg.org/multipage/#dom-input-stepup" });
84 test(function() {assert_true(typeof(document.getElementsByTagName("input")[3 ].stepDown) == "function")}, "[month] stepDown method support on input 'month' e lement", {
85 "help" : "https://html.spec.whatwg.org/multipage/#dom-input-stepdown" });
86
87 test(function() {assert_equals(document.getElementsByTagName("input")[4].typ e, "week")}, "week type support on input element", {
88 "help" : "https://html.spec.whatwg.org/multipage/#dom-input-type" });
89 test(function() {assert_equals(document.getElementsByTagName("input")[4].val ue, "2011-W40")}, "[week] The value must be a value that is a valid global date and time string", {
90 "help" : "https://html.spec.whatwg.org/multipage/#dom-input-value" });
91 test(function() {assert_equals(document.getElementsByTagName("input")[4].min , "2011-W20")}, "[week] The min attribute must have a value that is a valid glob al date and time string", {
92 "help" : "https://html.spec.whatwg.org/multipage/#dom-input-min" });
93 test(function() {assert_equals(document.getElementsByTagName("input")[4].max , "2011-W50")}, "[week] The max attribute must have a value that is a valid glob al date and time string", {
94 "help" : "https://html.spec.whatwg.org/multipage/#dom-input-max" });
95 test(function() {assert_equals(document.getElementsByTagName("input")[4].ste p, "2")}, "[week] The step attribute must be expressed in seconds", {
96 "help" : "https://html.spec.whatwg.org/multipage/#dom-input-step" });
97 test(function() {assert_true(typeof(document.getElementsByTagName("input")[4 ].stepUp) == "function")}, "[week] stepUp method support on input 'week' element ", {
98 "help" : "https://html.spec.whatwg.org/multipage/#dom-input-stepup" });
99 test(function() {assert_true(typeof(document.getElementsByTagName("input")[4 ].stepDown) == "function")}, "[week] stepDown method support on input 'week' ele ment", {
100 "help" : "https://html.spec.whatwg.org/multipage/#dom-input-stepdown" });
101
102 </script>
103
104 </body>
105
106 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698