blob: 8457813bc1b8040b06c8c1c7961afa6cd0a0bc63 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../../resources/js-test-pre.js"></script>
<script>
description("Checks that setting input.value to null sets the input value to the empty string.");
var input = document.createElement("input");
evalAndLog("input.defaultValue = 'defaultValue'");
shouldBeEqualToString("input.value", "defaultValue");
// HTMLInputElement.value treats null as the empty String so this should set the value to "".
evalAndLog("input.value = null");
shouldBeEqualToString("input.value", "");
</script>
<script src="../../../resources/js-test-post.js"></script>