Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / deleting / display-table.html
blobf7b138621be011e091380fc01d91ca5293151a96
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <style>
5 #tableDiv {
6 display: table;
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)
17 var testDiv = document.getElementById('tableDiv');
18 testDiv.innerText = 'ABCD';
20 var selection = window.getSelection();
21 selection.collapse(testDiv, caretPosition);
23 document.execCommand(deleteCommand);
24 shouldBeEqualToString("document.getElementById('tableDiv').textContent", expectedString);
27 description("This test verifies that we are able to successfully delete the first and the last characters of a contenteditable div with display: table.");
29 runTest(0, "forwardDelete", "BCD");
30 runTest(1, "Delete", "ABC");
32 if (window.testRunner)
33 document.getElementById('tableDiv').outerHTML = '';
35 finishJSTest();
36 </script>
37 </body>
38 </html>