blob: 4a8390938292e4e773b1cea72b2672cb0b67cc9a [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<script src="../../../resources/js-test.js"></script>
<script>
description('Change multiple fields week input UI layout by value');
var testInput = document.createElement('input');
testInput.type = 'month';
testInput.max = '9999-12';
document.body.appendChild(testInput);
var widthOfEmptyValue = testInput.offsetWidth;
testInput.value = '10000-12';
var widthOfOverflowValue = testInput.offsetWidth;
shouldBeTrue('widthOfEmptyValue < widthOfOverflowValue');
testInput.value = '2012-10';
var widthOfValidValue = testInput.offsetWidth;
shouldBe('widthOfEmptyValue', 'widthOfValidValue');
testInput.remove();
</script>
</body>
</html>