Commit 7272704f authored by rniwa@webkit.org's avatar rniwa@webkit.org

Add a test to ensure WebKit does not paste contents before

https://bugs.webkit.org/show_bug.cgi?id=66481

Reviewed by Alexey Proskuryakov.

Add a regression test since this bug has been fixed by r92695.

* editing/pasteboard/paste-delete-insertion-position-skip-paragraph-expected.txt: Added.
* editing/pasteboard/paste-delete-insertion-position-skip-paragraph.html: Added.


git-svn-id: svn://svn.chromium.org/blink/trunk@93331 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 7442ffad
2011-08-18 Ryosuke Niwa <rniwa@webkit.org>
Add a test to ensure WebKit does not paste contents before
https://bugs.webkit.org/show_bug.cgi?id=66481
Reviewed by Alexey Proskuryakov.
Add a regression test since this bug has been fixed by r92695.
* editing/pasteboard/paste-delete-insertion-position-skip-paragraph-expected.txt: Added.
* editing/pasteboard/paste-delete-insertion-position-skip-paragraph.html: Added.
2011-08-18 James Robinson <jamesr@chromium.org>
[chromium] Draw the root/"non-composited content" in compositor side
This test ensures WebKit does not skip paragraphs when determining the insertion position for paste.
You should see "hello world<caret> WebKit" below.
Initial markup:
| "
"
| <font>
| class="Apple-style-span"
| face="'courier new', monospace"
| <div>
| style="font-family: arial;"
| "
"
| <span>
| class="Apple-style-span"
| style="font-family: 'courier new', monospace;"
| "hello"
| "
"
| <div>
| style="font-family: arial; "
| <span>
| class="Apple-style-span"
| style="font-family: 'courier new', monospace;"
| " WebKit"
| "
"
After inserting " world":
| "
"
| <font>
| class="Apple-style-span"
| face="'courier new', monospace"
| <div>
| style="font-family: arial;"
| "
"
| <span>
| class="Apple-style-span"
| style="font-family: 'courier new', monospace;"
| "hello"
| "
"
| <div>
| style="font-family: arial; "
| <span>
| class="Apple-style-span"
| style="font-family: 'courier new', monospace;"
| " WebKit"
| "
"
After deleting line break before " WebKit":
| "
"
| <font>
| class="Apple-style-span"
| face="'courier new', monospace"
| <div>
| style="font-family: arial;"
| "
"
| <span>
| class="Apple-style-span"
| style="font-family: 'courier new', monospace;"
| "hello"
| "
"
| <div>
| style="font-family: arial; "
| <span>
| class="Apple-style-span"
| style="font-family: 'courier new', monospace;"
| " WebKit"
| "
"
<!DOCTYPE html>
<html>
<body style="background-color: #fee; font-family: 'courier new', monospace; font-size: 13px; word-wrap: break-word;" contenteditable>
<p id="description">This test ensures WebKit does not skip paragraphs when determining the insertion position for paste.<br>
You should see "hello world&lt;caret&gt; WebKit" below.</p>
<div id="test" contenteditable>
<font class="Apple-style-span" face="'courier new', monospace"><div style="font-family: arial;">
<span class="Apple-style-span" style="font-family: 'courier new', monospace;">hello</span></div>
<div style="font-family: arial; "><span class="Apple-style-span" style="font-family: 'courier new', monospace;">&nbsp;WebKit</span></div></font>
</div>
<script src="../editing.js"></script>
<script src="../../resources/dump-as-markup.js"></script>
<script>
Markup.description(document.getElementById('description').textContent);
moveSelectionForwardByLineBoundaryCommand();
Markup.dump('test', 'Initial markup');
insertHTMLCommand('<span class="Apple-style-span" style="background-color: #fee;">&nbsp;world</span>');
Markup.dump('test', 'After inserting " world"');
for (var i = 0; i < 5; i++) // Make sure we're at the very end.
moveSelectionForwardByLineCommand();
moveSelectionBackwardByLineBoundaryCommand();
deleteCommand();
Markup.dump('test', 'After deleting line break before " WebKit"');
</script>
</body>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment