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

Unified Diff: third_party/WebKit/LayoutTests/editing/execCommand/crash-inserting-span.html

Issue 2135993003: Add null check to fix crash in blink::ComputedStyle::display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use of assert_selection Created 4 years, 5 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: third_party/WebKit/LayoutTests/editing/execCommand/crash-inserting-span.html
diff --git a/third_party/WebKit/LayoutTests/editing/execCommand/crash-inserting-span.html b/third_party/WebKit/LayoutTests/editing/execCommand/crash-inserting-span.html
new file mode 100644
index 0000000000000000000000000000000000000000..1fc3763448128b86d6060ff1238ba2230ba24c91
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/execCommand/crash-inserting-span.html
@@ -0,0 +1,19 @@
+<!doctype html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../assert_selection.js"></script>
+<div id="log"></div>
+<script>
+// This test case was added to reproduce the crash reported by ClusterFuzz.
yosin_UTC9 2016/07/14 01:08:52 We don't need to have this comment, we can use git
joone 2016/07/14 07:06:54 Done.
+// See http://crbug.com/626991
+test(() => {
+ assert_selection(
+ '<span><p>^test</p><p>foo<span>bar</span>foo<span>bar</span>.|</p></span>',
+ selection => {
+ selection.document.designMode = 'on';
yosin_UTC9 2016/07/14 01:08:52 Please enclose a sample with '<div contenteditable
joone 2016/07/14 07:06:54 Done.
+ selection.document.execCommand('CreateLink', false, 'foo');
yosin_UTC9 2016/07/14 01:08:52 Could you encode result of "createLink" command in
joone 2016/07/14 07:06:54 Done.
yosin_UTC9 2016/07/14 07:53:34 PS#5 still has "createLink", did you forget to upd
+ selection.document.execCommand('inserthtml', false, '<span style="color:green">green</span>');
+ },
+ '<span><p><a href="foo"><span style="color:green">green|</span></a></p></span>');
+}, 'Replace the selected tags with span tags');
+</script>

Powered by Google App Engine
This is Rietveld 408576698