Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(456)

Unified Diff: LayoutTests/editing/selection/move-node-in-selection-crash.html

Issue 452293004: Fix crash when node is moved in a selection (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update test expectation Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/editing/selection/move-node-in-selection-crash-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/editing/selection/move-node-in-selection-crash.html
diff --git a/LayoutTests/editing/selection/move-node-in-selection-crash.html b/LayoutTests/editing/selection/move-node-in-selection-crash.html
new file mode 100644
index 0000000000000000000000000000000000000000..6cbdc8f583318498613706c4b60d3fed4c658540
--- /dev/null
+++ b/LayoutTests/editing/selection/move-node-in-selection-crash.html
@@ -0,0 +1,29 @@
+<style>
+p { position: fixed; height: 1px; }
+hgroup { position: fixed; padding-bottom: 1px; padding-left: 100%; -webkit-column-span: all; }
+sup { display: -webkit-box; }
+</style>
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+
+window.onload = function() {
+ document.documentElement.appendChild(document.createElement('span'));
+ var grandparent = document.createElement('p');
+ document.documentElement.appendChild(grandparent);
+ document.execCommand('SelectAll', '');
+
+ grandparent.appendChild(document.createElement('hgroup'));
+ var oldParent = document.createElement('span');
+ grandparent.appendChild(oldParent);
+ var childToMove = document.createElement('sup');
+ oldParent.appendChild(childToMove);
+
+ document.body.offsetHeight;
+
+ // Move childToMove under the orphaned parent.
+ var orphanedParent = document.createElement('div');
+ orphanedParent.appendChild(childToMove);
+};
+</script>
+This is modified from a cluster-fuzz test case. Passes if no crash.
« no previous file with comments | « no previous file | LayoutTests/editing/selection/move-node-in-selection-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698