chromium/third_party/blink/web_tests/fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-reset-value-after-reloads.html

<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/js-test.js"></script>
</head>
<body onload="runBodyLoaded()">
<iframe id=iframe srcdoc="<input type=datetime-local id='test1'><input type='datetime-local' id='test2' value='1234-05-06T07:08'>"></iframe>
<script>
description('Checks reloading page resets input values');
window.jsTestIsAsync = true;

var iframe = document.getElementById('iframe');
var testInput1;
var testInput2;

function runBodyLoaded()
{
    testInput1 = iframe.contentDocument.getElementById('test1');
    testInput2 = iframe.contentDocument.getElementById('test2');
    debug('Initial values:');
    shouldBeEqualToString('testInput1.value', '');
    shouldBeEqualToString('testInput2.value', '1234-05-06T07:08');
    testInput1.value = '2012-10-01T06:00';
    testInput2.value = '2012-11-01T18:00';
    iframe.addEventListener('load', parent.runOnIFrameLoad);
    iframe.contentWindow.location.reload();
}

function runOnIFrameLoad()
{
    testInput1 = iframe.contentDocument.getElementById('test1');
    testInput2 = iframe.contentDocument.getElementById('test2');
    debug('Reloaded values:');
    shouldBeEqualToString('testInput1.value', '');
    shouldBeEqualToString('testInput2.value', '1234-05-06T07:08');
    iframe.parentNode.removeChild(iframe);
    finishJSTest();
}
</script>
</body>
</html>