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

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

Issue 2757553002: Editing: Content of display:table elements should be editable. (Closed)
Patch Set: . Created 3 years, 9 months 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <style> 4 <style>
5 #tableDiv { 5 #tableDiv {
6 display: table; 6 display: table;
7 } 7 }
8 </style> 8 </style>
9 <script src="../../resources/testharness.js"></script> 9 <script src="../../resources/testharness.js"></script>
10 <script src="../../resources/testharnessreport.js"></script> 10 <script src="../../resources/testharnessreport.js"></script>
11 </head> 11 </head>
12 <body> 12 <body>
13 <div id="tableDiv" contenteditable="true"></div> 13 <div id="tableDiv" contenteditable="true"></div>
14 <div id="log"></div> 14 <div id="log"></div>
15 <script> 15 <script>
16 function runTest(caretPosition, deleteCommand, expectedString) 16 function runTest(caretPosition, deleteCommand, expectedString)
17 { 17 {
18 var testDiv = document.getElementById('tableDiv'); 18 var testDiv = document.getElementById('tableDiv');
19 testDiv.innerText = 'ABCD'; 19 testDiv.innerText = 'ABCD';
20 20
21 var selection = window.getSelection(); 21 var selection = window.getSelection();
22 selection.collapse(testDiv, caretPosition); 22 selection.collapse(testDiv, caretPosition);
23 23
24 document.execCommand(deleteCommand); 24 document.execCommand(deleteCommand);
25 assert_equals(document.getElementById('tableDiv').textContent, expectedStrin g); 25 assert_equals(document.getElementById('tableDiv').textContent, expectedStrin g);
26 } 26 }
27 27
28 test(function () { 28 test(function () {
29 runTest(0, "forwardDelete", "ABCD"); 29 runTest(0, "forwardDelete", "BCD");
30 runTest(1, "Delete", "ABCD"); 30 }, "This test verifies that ForwardDelete command is able to successfully delete the first and the last characters of a contenteditable div with display: table. ");
31 }, "This test verifies that we are able to successfully delete the first and the last characters of a contenteditable div with display: table."); 31
tkent 2017/03/16 08:16:22 The test was very inconsistent. The description s
32 test(function () {
33 runTest(1, "Delete", "ABC");
34 }, "This test verifies that Delete command is able to successfully delete the fi rst and the last characters of a contenteditable div with display: table.");
32 </script> 35 </script>
33 </body> 36 </body>
34 </html> 37 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698