Title: [121350] trunk/LayoutTests
Revision
121350
Author
shin...@chromium.org
Date
2012-06-27 10:48:23 -0700 (Wed, 27 Jun 2012)

Log Message

[Shadow] Triggers assertion in VisibleSelection::adjustSelectionToAvoidCrossingBoundaries()
https://bugs.webkit.org/show_bug.cgi?id=89918

Reviewed by Ryosuke Niwa.

This patch adds a testcase of selection from Shadow DOM to some elements outside of shadow host.
r121303, which is a patch for another issue, fixed this issue.

* editing/shadow/breaking-editing-boundaries-2-expected.txt: Added.
* editing/shadow/breaking-editing-boundaries-2.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (121349 => 121350)


--- trunk/LayoutTests/ChangeLog	2012-06-27 17:45:24 UTC (rev 121349)
+++ trunk/LayoutTests/ChangeLog	2012-06-27 17:48:23 UTC (rev 121350)
@@ -1,3 +1,16 @@
+2012-06-27  Shinya Kawanaka  <shin...@chromium.org>
+
+        [Shadow] Triggers assertion in VisibleSelection::adjustSelectionToAvoidCrossingBoundaries()
+        https://bugs.webkit.org/show_bug.cgi?id=89918
+
+        Reviewed by Ryosuke Niwa.
+
+        This patch adds a testcase of selection from Shadow DOM to some elements outside of shadow host.
+        r121303, which is a patch for another issue, fixed this issue.
+
+        * editing/shadow/breaking-editing-boundaries-2-expected.txt: Added.
+        * editing/shadow/breaking-editing-boundaries-2.html: Added.
+
 2012-06-27  Alexandru Chiculita  <ach...@adobe.com>
 
         Blur filter causes issues when scrolling

Added: trunk/LayoutTests/editing/shadow/breaking-editing-boundaries-2-expected.txt (0 => 121350)


--- trunk/LayoutTests/editing/shadow/breaking-editing-boundaries-2-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/editing/shadow/breaking-editing-boundaries-2-expected.txt	2012-06-27 17:48:23 UTC (rev 121350)
@@ -0,0 +1,5 @@
+When selecting from a child of ShadowRoot to an element outside of shadow host, a crash should not be caused.
+
+To test manually, select from 'before shadow' to 'after host'.
+
+PASS

Added: trunk/LayoutTests/editing/shadow/breaking-editing-boundaries-2.html (0 => 121350)


--- trunk/LayoutTests/editing/shadow/breaking-editing-boundaries-2.html	                        (rev 0)
+++ trunk/LayoutTests/editing/shadow/breaking-editing-boundaries-2.html	2012-06-27 17:48:23 UTC (rev 121350)
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script src=""
+
+<p>When selecting from a child of ShadowRoot to an element outside of shadow host, a crash should not be caused.</p>
+<p>To test manually, select from 'before shadow' to 'after host'.</p>
+
+<div id="container" contenteditable>
+    <div><p>before host</p></div>
+    <div id="host">host</div> 
+    <div id="destination">after host</div>
+</div>
+
+<script>
+if (window.layoutTestController)
+    layoutTestController.dumpAsText();
+
+var shadowRoot = new WebKitShadowRoot(host);
+var div = document.createElement('div');
+div.setAttribute('contenteditable', 'true');
+shadowRoot.appendChild(div);
+div.innerHTML = "<div id='source'>before shadow</div><shadow></shadow><div>after shadow</div>";
+
+var nestedShadowRoot = new WebKitShadowRoot(div);
+nestedShadowRoot.innerHTML = "<div contenteditable>before nested<shadow></shadow>after nested</div>";
+
+var source = shadowRoot.getElementById('source');
+var destination = document.getElementById('destination');
+
+if (window.eventSender) {
+    eventSender.mouseMoveTo(source.offsetLeft + 20, source.offsetTop + source.offsetHeight / 2);
+    eventSender.mouseDown();
+    eventSender.mouseMoveTo(destination.offsetLeft + 20, destination.offsetTop + destination.offsetHeight / 2);
+    eventSender.mouseUp();
+
+    container.innerHTML = "PASS";
+}
+</script>
+</body>
+</html>
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to