chromium/third_party/blink/web_tests/fast/forms/resources/multiple-fields-value-set-empty.js

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("ArrowUp"); getUserAgentShadowTextContent(input)', 'emptyText');
        shouldBe('input.value = ""; getUserAgentShadowTextContent(input)', 'emptyText');
        input.remove();
    }
}