blob: 47f5483320bed0b6bfe9406bbee762d8a2e0e602 [file] [log] [blame]
var input;
var emptyText;
function testSettingEmptyStringClearsSubFields(type) {
description('Check if input.value="" clears an input with partially-specified value.');
input = document.createElement('input');
input.type = type;
document.body.appendChild(input);
input.focus();
emptyText = getUserAgentShadowTextContent(input);
if (!window.eventSender)
debug('This test needs to be run on DRT/WTR.');
else {
debug('Empty text: ' + emptyText);
shouldNotBe('eventSender.keyDown("upArrow"); getUserAgentShadowTextContent(input)', 'emptyText');
shouldBe('input.value = ""; getUserAgentShadowTextContent(input)', 'emptyText');
input.remove();
}
}