blob: 470d05d6bb4b18995a053ed41d949b72e3f351cc [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<input type="email" id="test" placeholder="FAIL: placeholder should disappear">
<script>
description('This tests setting the editing value of an input.');
var input = document.getElementById('test');
input.onchange = function() {
testPassed("onchange event was fired.");
};
input.oninput = function() {
testPassed("oninput event was fired.");
};
input.focus();
if (window.internals) {
internals.setEditingValue(input, " foo ");
} else {
debug('This test requires window.internals object.');
}
shouldBe('input.value', '"foo"');
shouldBe('document.querySelector(":invalid")', 'input');
input.blur();
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>