1<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2<html>
3<head>
4<script src="../../fast/js/resources/js-test-pre.js"></script>
5</head>
6<body>
7<p id="description"></p>
8<div id="console"></div>
9
10<input type="email" id="test" placeholder="FAIL: placeholder should disappear">
11
12<script>
13description('This tests setting the editing value of an input.');
14
15var input = document.getElementById('test');
16input.onchange = function() {
17 testPassed("onchange event was fired.");
18};
19input.oninput = function() {
20 testPassed("oninput event was fired.");
21};
22
23input.focus();
24if (window.internals)
25 internals.setEditingValue(input, " foo ");
26shouldBe('input.value', '"foo"');
27shouldBe('document.querySelector(":invalid")', 'input');
28input.blur();
29
30</script>
31
32<script src="../../fast/js/resources/js-test-post.js"></script>
33</body>
34</html>