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

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: Fixing the nits Created 7 years 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
« no previous file with comments | « no previous file | LayoutTests/editing/deleting/display-table-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <div id="log"></div>
14 <script>
15 function runTest(caretPosition, deleteCommand, expectedString)
16 {
17 var testDiv = document.getElementById('tableDiv');
18 testDiv.innerText = 'ABCD';
19
20 var selection = window.getSelection();
21 selection.collapse(testDiv, caretPosition);
22
23 document.execCommand(deleteCommand);
24 shouldBeEqualToString("document.getElementById('tableDiv').textContent", exp ectedString);
25 }
26
27 description("This test verifies that we are able to successfully delete the firs t and the last characters of a contenteditable div with display: table.");
28
29 runTest(0, "forwardDelete", "BCD");
30 runTest(1, "Delete", "ABC");
31
32 if (window.testRunner)
33 document.getElementById('tableDiv').outerHTML = '';
34
35 finishJSTest();
36 </script>
37 </body>
38 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/editing/deleting/display-table-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698