OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <body> | 2 <body> |
3 <script src="../../js/resources/js-test-pre.js"></script> | 3 <script src="../../../resources/js-test.js"></script> |
4 <script src="../resources/common.js"></script> | 4 <script src="../resources/common.js"></script> |
5 <script src="../resources/multiple-fields-value-set-empty.js"></script> | 5 <script src="../resources/multiple-fields-value-set-empty.js"></script> |
6 <script> | 6 <script> |
7 testSettingEmptyStringClearsSubFields('time'); | 7 testSettingEmptyStringClearsSubFields('time'); |
8 | 8 |
9 debug(''); | 9 debug(''); |
10 input = document.createElement('input'); | 10 input = document.createElement('input'); |
11 input.type = 'time'; | 11 input.type = 'time'; |
12 input.min = '11:23:45'; | 12 input.min = '11:23:45'; |
13 input.step = '60'; | 13 input.step = '60'; |
14 // Because the step value is 60 seconds, the seconds fields is read-only. | 14 // Because the step value is 60 seconds, the seconds fields is read-only. |
15 document.body.appendChild(input); | 15 document.body.appendChild(input); |
16 debug('Initial text: ' + getUserAgentShadowTextContent(input)); | 16 debug('Initial text: ' + getUserAgentShadowTextContent(input)); |
17 debug('Empty value should not clear read-only fields.'); | 17 debug('Empty value should not clear read-only fields.'); |
18 shouldBeEqualToString('input.value = ""; getUserAgentShadowTextContent(input)',
'--:--:45 --'); | 18 shouldBeEqualToString('input.value = ""; getUserAgentShadowTextContent(input)',
'--:--:45 --'); |
19 | 19 |
20 debug('Empty value should clear only editable fields.'); | 20 debug('Empty value should clear only editable fields.'); |
21 input.focus(); | 21 input.focus(); |
22 shouldBeEqualToString('eventSender.keyDown("upArrow"); getUserAgentShadowTextCon
tent(input)', '01:--:45 --'); | 22 shouldBeEqualToString('eventSender.keyDown("upArrow"); getUserAgentShadowTextCon
tent(input)', '01:--:45 --'); |
23 shouldBeEqualToString('input.value = ""; getUserAgentShadowTextContent(input)',
'--:--:45 --'); | 23 shouldBeEqualToString('input.value = ""; getUserAgentShadowTextContent(input)',
'--:--:45 --'); |
24 | 24 |
25 </script> | 25 </script> |
26 </body> | 26 </body> |
OLD | NEW |