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

Unified Diff: LayoutTests/editing/selection/range-surroundContents-with-preceding-node.html

Issue 25571006: Fix out-of-date offset in selection range code. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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/range-surroundContents-with-preceding-node-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/editing/selection/range-surroundContents-with-preceding-node.html
diff --git a/LayoutTests/editing/selection/range-surroundContents-with-preceding-node.html b/LayoutTests/editing/selection/range-surroundContents-with-preceding-node.html
new file mode 100644
index 0000000000000000000000000000000000000000..1c8088815c3b2a20d5fd00bc8ff4b05b3b52483b
--- /dev/null
+++ b/LayoutTests/editing/selection/range-surroundContents-with-preceding-node.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <script>
+ if (window.testRunner)
+ {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+ }
+
+ setTimeout(function(){
ojan 2013/10/02 17:56:34 Is this setTimeout really needed? Perhaps this cod
+ var oSelection=window.getSelection();
+ document.execCommand("SelectAll", false);
+ var oRange = oSelection.getRangeAt(0);
+ var aoElements = document.getElementsByTagName("*");
+ var oParentElement = aoElements[5];
+ oRange.surroundContents(oParentElement);
+
+ document.body.innerHTML = "Test should not assert when an element before the selection range is moved to the last element in the selection range via surroundContents.";
+
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }, 1);
+ </script>
+ <button>
+ <div></div>
+ <div></div>
+ <table></table>
+ </button>
+ </body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/editing/selection/range-surroundContents-with-preceding-node-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698