| <!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> |