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

Unified Diff: LayoutTests/editing/execCommand/insert-ordered-list-crash.html

Issue 181283002: Fixing a crash in InsertListCommand. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/editing/execCommand/insert-ordered-list-crash.html
diff --git a/LayoutTests/editing/execCommand/insert-ordered-list-crash.html b/LayoutTests/editing/execCommand/insert-ordered-list-crash.html
new file mode 100644
index 0000000000000000000000000000000000000000..a8f9a61e2126c7b00c6179deccb7221d3390682d
--- /dev/null
+++ b/LayoutTests/editing/execCommand/insert-ordered-list-crash.html
@@ -0,0 +1,29 @@
+
+<body>
+ <h5>
+ aa
+ <textarea></textarea>
+ </h5>
+ <dl>
+ aa
+ </dl>
+</body>
+
+<script>
Yuta Kitamura 2014/02/26 10:41:16 Technically, <script> should not appear after <bod
yoichio 2014/02/27 04:00:03 Done.
+ document.addEventListener("DOMContentLoaded", function () {
Yuta Kitamura 2014/02/26 10:41:16 You need to tell the layout test harness that this
yoichio 2014/02/27 04:00:03 Done.
+ var oSelection = window.getSelection();
Yuta Kitamura 2014/02/26 10:41:16 nit: "oSelection" is awkward naming convention and
yoichio 2014/02/27 04:00:03 Done.
+ document.execCommand("SelectAll", false);
+ oSelection.deleteFromDocument();
+ }, true);
+
+ var count = 0;
+ document.addEventListener("DOMSubtreeModified", function () {
+ count++;
+ if (count < 3) {
+ var oElement = event.srcElement;
+ oElement.contentEditable = "true";
+ oElement.innerHTML = '<div></div>';
+ document.execCommand('InsertOrderedList', false, false);
+ }
+ }, false);
+</script>
« no previous file with comments | « no previous file | LayoutTests/editing/execCommand/insert-ordered-list-crash-expected.txt » ('j') | Source/core/dom/Range.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698