Upstream version 10.38.220.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / forms / calendar-picker / datetimelocal-change-type-on-input-crash.html
1 <!DOCTYPE html>
2 <script src=../../../resources/js-test.js>></script>
3 <script src=../../forms/resources/picker-common.js>></script>
4 <input type=datetime-local id=datetimelocal1>
5 <script>
6 description('Check if changing type on input event handler doesn\'t crash. This requires ASAN build.');
7 function handleInput(event) {
8     this.removeAttribute('type');
9     setTimeout(function() {
10         testPassed('if not crash');
11         finishJSTest();
12     }, 0);
13 }
14
15 datetimelocal1.addEventListener('input', handleInput, false);
16 openPicker(datetimelocal1, test1);
17
18 function test1() {
19     eventSender.keyDown('leftArrow');
20     eventSender.keyDown('\n');
21     waitUntilClosing(test1AfterClosing);
22 }
23
24 function test1AfterClosing() {
25     datetimelocal1.value = '2013-01-21T17:49';
26 }
27 </script>