OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../js/resources/js-test-pre.js"></script> | 4 <script src="../../js/resources/js-test-pre.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <script> | 7 <script> |
8 description("Change multiple fields time input UI layout by value"); | 8 description("Change multiple fields time input UI layout by value"); |
9 var testInput = document.createElement("input"); | 9 var testInput = document.createElement("input"); |
10 testInput.setAttribute("type", "time"); | 10 testInput.setAttribute("type", "time"); |
11 testInput.setAttribute("step", "60"); | 11 testInput.setAttribute("step", "60"); |
12 testInput.setAttribute("value", "12:34:56"); | 12 testInput.setAttribute("value", "12:34:56"); |
13 document.body.appendChild(testInput); | 13 document.body.appendChild(testInput); |
14 var widthOfStep60 = testInput.offsetWidth; | 14 var widthOfStep60 = testInput.offsetWidth; |
15 | 15 |
16 testInput.value = "12:34:56.789"; | 16 testInput.value = "12:34:56.789"; |
17 var widthWithMillisecond = testInput.offsetWidth; | 17 var widthWithMillisecond = testInput.offsetWidth; |
18 shouldBeTrue('widthOfStep60 < widthWithMillisecond'); | 18 shouldBeTrue('widthOfStep60 < widthWithMillisecond'); |
19 | 19 |
20 testInput.value = "12:34:56"; | 20 testInput.value = "12:34:56"; |
21 var widthWithSecond = testInput.offsetWidth; | 21 var widthWithSecond = testInput.offsetWidth; |
22 shouldBeTrue('widthOfStep60 == widthWithSecond'); | 22 shouldBeTrue('widthOfStep60 == widthWithSecond'); |
23 | 23 |
24 document.body.removeChild(testInput); | 24 document.body.removeChild(testInput); |
25 </script> | 25 </script> |
26 <script src="../../js/resources/js-test-post.js"></script> | |
27 </body> | 26 </body> |
28 </html> | 27 </html> |
OLD | NEW |