blob: 0e6ef3461116758fce45c4b0902fc25c1c1542aa [file]
<!DOCTYPE html>
<html>
<head>
<script src="../../../fast/js/resources/js-test-pre.js"></script>
</head>
<body onload="runBodyLoaded()">
<iframe id=iframe srcdoc="<input type=time id=test1><input type=time id=test2 value=02:02>"></iframe>
<script>
description('Checks reloading page resets input values');
window.jsTestIsAsync = true;
var iframe = document.getElementById('iframe');
var testInput1;
var testInput2;
function runBodyLoaded()
{
iframe.contentDocument.getElementById('test1').value = '12:34';
iframe.contentDocument.getElementById('test2').value = '03:03';
iframe.addEventListener("load", function () { parent.runOnIFrameLoad(); });
iframe.contentWindow.location.reload();
}
function runOnIFrameLoad()
{
testInput1 = iframe.contentDocument.getElementById('test1');
testInput2 = iframe.contentDocument.getElementById('test2');
shouldBeEqualToString('testInput1.value', '');
shouldBeEqualToString('testInput2.value', '02:02');
iframe.parentNode.removeChild(iframe);
finishJSTest();
}
</script>
<script src="../../../fast/js/resources/js-test-post.js"></script>
</body>
</html>