4 <script src=
"../../../resources/js-test.js"></script>
6 <body onload=
"runBodyLoaded()">
7 <iframe id=iframe
srcdoc=
"<input type=datetime-local id='test1'><input type='datetime-local' id='test2' value='1234-05-06T07:08'>"></iframe>
9 description('Checks reloading page resets input values');
10 window
.jsTestIsAsync
= true;
12 var iframe
= document
.getElementById('iframe');
16 function runBodyLoaded()
18 testInput1
= iframe
.contentDocument
.getElementById('test1');
19 testInput2
= iframe
.contentDocument
.getElementById('test2');
20 debug('Initial values:');
21 shouldBeEqualToString('testInput1.value', '');
22 shouldBeEqualToString('testInput2.value', '1234-05-06T07:08');
23 testInput1
.value
= '2012-10-01T06:00';
24 testInput2
.value
= '2012-11-01T18:00';
25 iframe
.addEventListener('load', parent
.runOnIFrameLoad
);
26 iframe
.contentWindow
.location
.reload();
29 function runOnIFrameLoad()
31 testInput1
= iframe
.contentDocument
.getElementById('test1');
32 testInput2
= iframe
.contentDocument
.getElementById('test2');
33 debug('Reloaded values:');
34 shouldBeEqualToString('testInput1.value', '');
35 shouldBeEqualToString('testInput2.value', '1234-05-06T07:08');
36 iframe
.parentNode
.removeChild(iframe
);