Title: [93331] trunk/LayoutTests
Revision
93331
Author
[email protected]
Date
2011-08-18 12:17:41 -0700 (Thu, 18 Aug 2011)

Log Message

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.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (93330 => 93331)


--- trunk/LayoutTests/ChangeLog	2011-08-18 19:10:23 UTC (rev 93330)
+++ trunk/LayoutTests/ChangeLog	2011-08-18 19:17:41 UTC (rev 93331)
@@ -1,3 +1,15 @@
+2011-08-18  Ryosuke Niwa  <[email protected]>
+
+        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  <[email protected]>
 
         [chromium] Draw the root/"non-composited content" in compositor side

Added: trunk/LayoutTests/editing/pasteboard/paste-delete-insertion-position-skip-paragraph-expected.txt (0 => 93331)


--- trunk/LayoutTests/editing/pasteboard/paste-delete-insertion-position-skip-paragraph-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/editing/pasteboard/paste-delete-insertion-position-skip-paragraph-expected.txt	2011-08-18 19:17:41 UTC (rev 93331)
@@ -0,0 +1,77 @@
+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"
+| "
+"

Added: trunk/LayoutTests/editing/pasteboard/paste-delete-insertion-position-skip-paragraph.html (0 => 93331)


--- trunk/LayoutTests/editing/pasteboard/paste-delete-insertion-position-skip-paragraph.html	                        (rev 0)
+++ trunk/LayoutTests/editing/pasteboard/paste-delete-insertion-position-skip-paragraph.html	2011-08-18 19:17:41 UTC (rev 93331)
@@ -0,0 +1,32 @@
+<!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=""
+<script src=""
+<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>
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to