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

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: Update 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
« no previous file with comments | « no previous file | LayoutTests/editing/execCommand/insert-ordered-list-crash-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..49a9159a5535f5441eca6a66dc5c7ff5b916beed
--- /dev/null
+++ b/LayoutTests/editing/execCommand/insert-ordered-list-crash.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Crash issue 344280</title>
+ <script src="../../resources/js-test.js"></script>
+</head>
+
+<body>
+ <script>
+ description('Should not crash if we load a test case from crbug.com/344280.');
+ window.jsTestIsAsync = true;
+
+ document.addEventListener("DOMContentLoaded", function () {
+ document.execCommand("SelectAll", false);
+ window.getSelection().deleteFromDocument();
+ }, true);
+
+ var count = 0;
+ document.addEventListener("DOMSubtreeModified", function () {
+ count++;
+ if (count < 3) {
+ var src = event.srcElement;
+ src.contentEditable = "true";
+ src.innerHTML = '<div></div>';
+ document.execCommand('InsertOrderedList', false, false);
+ } else if (count == 3) {
+ window.finishJSTest();
+ }
+ }, false);
+ </script>
+ <h5>
+ aa
+ <textarea></textarea>
+ </h5>
+ <dl>
+ aa
+ </dl>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/editing/execCommand/insert-ordered-list-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698