Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / calendar-picker / date-picker-choose-default-value-after-set-value.html
blobebcd55a44bb964c5c4ee078ec6cbd50e9edca001
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../../resources/js-test.js"></script>
5 <script src="../../forms/resources/picker-common.js"></script>
6 <script src="resources/calendar-picker-common.js"></script>
7 </head>
8 <body>
9 <p id="description"></p>
10 <div id="console"></div>
11 <input type="date" id="input" value="2000-01-02">
13 <script>
14 description('Test if change event fires when the user selects the default value after the value was changed by JS.');
16 var eventsCounter = {};
17 function recordEvent(event) {
18 if (eventsCounter[event.type] === undefined)
19 eventsCounter[event.type] = 0;
20 eventsCounter[event.type]++;
21 debug('==> "' + event.type + '" event was dispatched.');
24 var input = document.getElementById('input');
25 input.addEventListener('input', recordEvent, false);
26 input.addEventListener('change', recordEvent, false);
28 input.value = '2000-01-03';
30 shouldBeEqualToString('input.value', '2000-01-03');
31 shouldBeUndefined('eventsCounter.input');
32 shouldBeUndefined('eventsCounter.change');
34 openPicker(input, test1);
36 function test1() {
37 eventSender.keyDown('leftArrow');
38 removeCommitDelay();
39 eventSender.keyDown('\n');
40 shouldBeEqualToString('input.value', '2000-01-02');
42 shouldBe('eventsCounter.input', '1');
43 shouldBe('eventsCounter.change', '1');
45 finishJSTest();
47 </script>
48 </body>
49 </html>