OLD | NEW |
1 var input; | 1 var input; |
2 var emptyText; | 2 var emptyText; |
3 | 3 |
4 function testSettingEmptyStringClearsSubFields(type) { | 4 function testSettingEmptyStringClearsSubFields(type) { |
5 description('Check if input.value="" clears an input with partially-specifie
d value.'); | 5 description('Check if input.value="" clears an input with partially-specifie
d value.'); |
6 | 6 |
7 input = document.createElement('input'); | 7 input = document.createElement('input'); |
8 input.type = type; | 8 input.type = type; |
9 document.body.appendChild(input); | 9 document.body.appendChild(input); |
10 input.focus(); | 10 input.focus(); |
11 emptyText = getUserAgentShadowTextContent(input); | 11 emptyText = getUserAgentShadowTextContent(input); |
12 if (!window.eventSender) | 12 if (!window.eventSender) |
13 debug('This test needs to be run on DRT/WTR.'); | 13 debug('This test needs to be run on DRT/WTR.'); |
14 else { | 14 else { |
15 debug('Empty text: ' + emptyText); | 15 debug('Empty text: ' + emptyText); |
16 shouldNotBe('eventSender.keyDown("upArrow"); getUserAgentShadowTextConte
nt(input)', 'emptyText'); | 16 shouldNotBe('eventSender.keyDown("upArrow"); getUserAgentShadowTextConte
nt(input)', 'emptyText'); |
17 shouldBe('input.value = ""; getUserAgentShadowTextContent(input)', 'empt
yText'); | 17 shouldBe('input.value = ""; getUserAgentShadowTextContent(input)', 'empt
yText'); |
18 input.remove(); | 18 input.remove(); |
19 } | 19 } |
20 } | 20 } |
OLD | NEW |