Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: LayoutTests/editing/deleting/display-table.html

Issue 59963002: Unable to delete the first and the last characters of a contenteditable div with display: table. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Modifying testcase Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <style>
5 #tableDiv {
6 display: table;
7 }
8 </style>
9 <script src="../../resources/js-test.js"></script>
10 </head>
11 <body>
12 <div id="tableDiv" contenteditable="true"></div>
13 <script>
14 description("Testcase for bug http://crbug.com/107366: Can't delete first and la st characters of a root editable element with display: table");
15
16 function testIt(caretPosition, deleteCommand, expectedString)
17 {
18 var testDiv = document.getElementById('tableDiv');
19 testDiv.innerText = 'ABCD';
20
21 var selection = window.getSelection();
22 selection.collapse(testDiv, caretPosition);
23
24 document.execCommand(deleteCommand);
25 shouldBeEqualToString("document.getElementById('tableDiv').textContent", exp ectedString);
26 }
27
28 testIt(0, "forwardDelete", "BCD");
29 testIt(1, "Delete", "ABC");
30
31 finishJSTest();
32 </script>
33 </body>
34 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698