blob: f9715d4371ac93f51e60b3d84456c82287980a33 [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 = 'week';
testInput.max = '9999-W52';
document.body.appendChild(testInput);
var widthOfEmptyValue = testInput.offsetWidth;
testInput.value = '10000-W01';
var widthOfOverflowValue = testInput.offsetWidth;
shouldBeTrue('widthOfEmptyValue < widthOfOverflowValue');
testInput.value = '2012-W10';
var widthOfValidValue = testInput.offsetWidth;
shouldBe('widthOfEmptyValue', 'widthOfValidValue');
testInput.remove();
</script>
</body>
</html>