OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <style> | |
5 #tableDiv { | |
6 display: table; | |
7 } | |
8 </style> | |
9 <script src="../../resources/dump-as-markup.js"></script> | |
10 </head> | |
11 <body> | |
12 <div id="tableDiv" contenteditable="true">Try deleting characters at the beginni ng and at the end of this line.</div> | |
13 <script> | |
14 Markup.description("Testcase for bug http://crbug.com/107366: Can't delete first and last characters of a root editable element with display: table"); | |
15 | |
16 Markup.waitUntilDone(); | |
17 | |
18 var testDiv = document.getElementById('tableDiv'); | |
19 var selection = window.getSelection(); | |
20 | |
21 selection.collapse(testDiv, 0); | |
22 document.execCommand("forwardDelete"); | |
yosin_UTC9
2013/11/14 06:57:59
I think js-test.js is easier to write test and ver
arpitab_
2013/11/14 07:08:19
Understand. I will post another patch with the men
| |
23 Markup.dump(testDiv, "The following markup should show the 'T' character deleted from the start word 'Try'."); | |
24 | |
25 selection.collapse(testDiv, 1); | |
26 document.execCommand("Delete"); | |
27 Markup.dump(testDiv, "The following markup should show the '.' character deleted from the end of the line."); | |
28 | |
29 Markup.notifyDone(); | |
30 </script> | |
31 </body> | |
32 </html> | |
OLD | NEW |