haikuwebkit/LayoutTests/fast/forms/month/month-input-type.html

31 lines
798 B
HTML

<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script>
description('Tests for writing and reading .type property of HTMLInputElement.');
var input = document.createElement('input');
document.body.appendChild(input);
function check(value, expected)
{
input.type = value;
if (input.type == expected)
testPassed('input.type for "' + value + '" is correctly "' + input.type + '".');
else
testFailed('input.type for "' + value + '" is incorrectly "' + input.type + '", should be "' + expected + '".');
}
check("month", "month");
check("MONTH", "month");
check(" month ", "text");
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>