Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / date-multiple-fields / date-multiple-fields-clearbutton-visibility-after-restore.html
blob406d4c647fbb37e8fbabe6a822387083fa0914b6
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <input id="emptyOnFirstVisit">
5 <form action="data:text/html,&lt;script>history.back()&lt;/script>" id=form1>
6 <input type=date id=input1>
7 <input type=date id=input2>
8 <input type=date id=input3 value="2012-01-03">
9 </form>
11 <script>
12 // Restoring the form should update the clear button visibility.
13 testRunner.waitUntilDone();
14 function runTest()
16 var state = document.getElementById('emptyOnFirstVisit');
17 if (!state.value) {
18 // First visit.
19 setTimeout(function() {
20 state.value = 'visited';
21 document.getElementById('input2').value = "2001-02-03";
22 document.getElementById('input3').value = "2002-03-04";
23 document.getElementById('form1').submit();
24 }, 0);
25 } else {
26 testRunner.notifyDone();
30 window.onload = runTest;
31 </script>
32 </body>