| Index: third_party/WebKit/LayoutTests/editing/execCommand/insert_paragraph/insert_paragraph_pre_crash.html
|
| diff --git a/third_party/WebKit/LayoutTests/editing/execCommand/insert_paragraph/insert_paragraph_pre_crash.html b/third_party/WebKit/LayoutTests/editing/execCommand/insert_paragraph/insert_paragraph_pre_crash.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..c3517c4a54ec392bab64660c68aba91a192dd75e
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/editing/execCommand/insert_paragraph/insert_paragraph_pre_crash.html
|
| @@ -0,0 +1,15 @@
|
| +<!doctype html>
|
| +<script src="../../../resources/testharness.js"></script>
|
| +<script src="../../../resources/testharnessreport.js"></script>
|
| +<div contenteditable id="sample"><span style="white-space:pre"> </span><span id="test">z</span></div>
|
| +<div id="log"></div>
|
| +<script>
|
| +test(function() {
|
| + var selection = window.getSelection();
|
| + selection.collapse(document.getElementById('test'), 0);
|
| + document.execCommand('InsertParagraph');
|
| + // Make sure we don't replace a whitespace in "whitespace:pre" to " "
|
| + // and having DIV around "test".
|
| + assert_equals(document.getElementById('sample').innerHTML, '<span style="white-space:pre"> </span><div><span id="test">z</span></div>');
|
| +}, 'InsertParagraph should not crash with whitespace:pre');
|
| +</script>
|
|
|