Chromium Code Reviews| 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> |