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

Unified 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: Tweaking the 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/editing/deleting/display-table.html
diff --git a/LayoutTests/editing/deleting/display-table.html b/LayoutTests/editing/deleting/display-table.html
new file mode 100644
index 0000000000000000000000000000000000000000..992be275c399802f2cfef16e78aa58833e863b89
--- /dev/null
+++ b/LayoutTests/editing/deleting/display-table.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+#tableDiv {
+ display: table;
+}
+</style>
+<script src="../../resources/js-test.js"></script>
+</head>
+<body>
+<div id="tableDiv" contenteditable="true"></div>
+<div id="log"></div>
+<script>
+function testIt(caretPosition, deleteCommand, expectedString)
leviw_travelin_and_unemployed 2013/11/26 01:39:43 Nit: runTest? Also a description of the test would
arpitab_ 2013/11/26 09:09:09 Done.
+{
+ var testDiv = document.getElementById('tableDiv');
+ testDiv.innerText = 'ABCD';
+
+ var selection = window.getSelection();
+ selection.collapse(testDiv, caretPosition);
+
+ document.execCommand(deleteCommand);
+ shouldBeEqualToString("document.getElementById('tableDiv').textContent", expectedString);
+}
+
+testIt(0, "forwardDelete", "BCD");
+testIt(1, "Delete", "ABC");
+
+if (window.testRunner)
+ document.getElementById('tableDiv').outerHTML = '';
+
+finishJSTest();
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/editing/deleting/display-table-expected.txt » ('j') | Source/core/editing/htmlediting.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698