Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / time / time-pseudo-classes.html
blob06cc4d928a10f3ba88cb0951944c79a873e594f9
1 <!DOCTYPE html>
2 <body>
3 <script src="../../../resources/js-test.js"></script>
4 <script src="../resources/common-pseudo-classes.js"></script>
6 <div id="container">
7 <input type="time" value="12:34:00" id="enabled">
8 <input type="time" value="12:34:00" id="disabled" disabled>
9 <input type="time" value="12:34:00" min="11:00:00" step="3600" id="invalid">
10 <input type="time" value="12:34:00" min="12:00:00" max="13:00:00" id="inrange">
11 <input type="time" value="ABC" min="12:00:00" max="13:00:00" id="badvalue">
12 <input type="time" value="12:34:00" min="13:00:00" max="14:00:00" id="outofrange">
13 <input type="time" value="12:34:56" readonly id="readonly">
14 <input type="time" value="12:34:56" required id="required">
15 </div>
17 <script>
18 description('Test if an input field matches to various pseudo classes');
19 var container = document.getElementById('container');
20 shouldBeTrue('matchedNodesContainId(container, ":enabled", "enabled")');
21 shouldBeTrue('matchedNodesContainId(container, ":valid", "enabled")');
22 shouldBeTrue('matchedNodesContainId(container, ":optional", "enabled")');
23 shouldBeTrue('matchedNodesContainId(container, ":read-write", "enabled")');
24 shouldBeTrue('matchedNodesContainId(container, ":disabled", "disabled")');
25 shouldBeTrue('matchedNodesContainId(container, ":invalid", "invalid")');
26 shouldBeTrue('matchedNodesContainId(container, ":in-range", "inrange")');
27 shouldBeTrue('matchedNodesContainId(container, ":in-range", "badvalue")');
28 shouldBeTrue('matchedNodesContainId(container, ":out-of-range", "outofrange")');
29 shouldBeTrue('matchedNodesContainId(container, ":read-only", "readonly")');
30 shouldBeTrue('matchedNodesContainId(container, ":required", "required")');
31 // Make the id=outofrange element in-range state.
32 document.getElementById('outofrange').value = '13:34:00';
33 shouldBeFalse('matchedNodesContainId(container, ":out-of-range", "outofrange")');
34 shouldBeTrue('matchedNodesContainId(container, ":in-range", "outofrange")');
35 // Make the id=inrange element out-of-range state.
36 document.getElementById('inrange').value = '13:34:00';
37 shouldBeFalse('matchedNodesContainId(container, ":in-range", "inrange")');
38 shouldBeTrue('matchedNodesContainId(container, ":out-of-range", "inrange")');
39 container.remove();
40 </script>
41 </body>