blob: f0b40221be0ac49ecc1810825b22526fe92819dc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<!DOCTYPE html>
<html>
<body>
<script src="../../js/resources/js-test-pre.js"></script>
<script>
description('Change multiple fields date input UI layout by value');
var testInput = document.createElement('input');
testInput.type = 'date';
testInput.max = '9999-12-31';
document.body.appendChild(testInput);
var widthOfEmptyValue = testInput.offsetWidth;
testInput.value = '10000-01-01';
var widthOfOverflowValue = testInput.offsetWidth;
shouldBeTrue('widthOfEmptyValue < widthOfOverflowValue');
testInput.value = '2012-10-05';
var widthOfValidValue = testInput.offsetWidth;
shouldBe('widthOfEmptyValue', 'widthOfValidValue');
document.body.removeChild(testInput);
</script>
</body>
</html>
|