OLD | NEW |
1 <html> | 1 <!doctype html> |
2 <head> | 2 <script src="../../resources/testharness.js"></script> |
| 3 <script src="../../resources/testharnessreport.js"></script> |
| 4 <script src="../assert_selection.js"></script> |
| 5 <input id="sample" value="foo bar"> |
3 <script> | 6 <script> |
4 if (window.testRunner) | 7 test(() => { |
5 testRunner.dumpEditingCallbacks(); | 8 var sample = document.getElementById('sample'); |
| 9 sample.focus(); |
| 10 document.execCommand('selectAll'); |
| 11 document.execCommand('delete'); |
| 12 assert_equals(sample.value, ''); |
| 13 }, 'document.execCommand works with INPUT'); |
6 </script> | 14 </script> |
7 | |
8 <script> | |
9 if (window.testRunner) { | |
10 testRunner.waitUntilDone(); | |
11 testRunner.dumpAsText(); | |
12 } | |
13 </script> | |
14 <script src="../editing.js"></script> | |
15 </head> | |
16 <body> | |
17 <div>Bug 9358: REGRESSION: Assertion failure in HTMLInputElement::setValueFromRe
nderer (value == constrainValue(value)) when deleting all text</div> | |
18 <div><a href="https://bugs.webkit.org/show_bug.cgi?id=9358">https://bugs.webkit.
org/show_bug.cgi?id=9358</a></div> | |
19 <div><br></div> | |
20 <form> | |
21 Assertion fails when all characters are deleted: <input type="text" id="t" value
="X"> | |
22 </form> | |
23 <script> | |
24 document.getElementById("t").focus(); | |
25 document.execCommand("SelectAll"); | |
26 document.execCommand("Delete"); | |
27 </script> | |
28 <div>SUCCESS if the test didn't crash and you see this message.</div> | |
29 <script> | |
30 if (window.testRunner) { | |
31 testRunner.notifyDone() | |
32 } | |
33 </script> | |
34 <body> | |
35 </html> | |
OLD | NEW |