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

Side by Side 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: Test with description. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script>
5 window.onload = function(){
6 var oSelection=window.getSelection();
yosin_UTC9 2013/10/03 01:41:19 nit: indentation of JavaScript should be four spac
yosin_UTC9 2013/10/03 01:41:19 Could you populate Range object by script rather t
Stephen Chennney 2013/10/03 20:38:28 Done.
7 document.execCommand("SelectAll", false);
8 var oRange = oSelection.getRangeAt(0);
9 var aoElements = document.getElementsByTagName("*");
10 var oParentElement = aoElements[5];
ojan 2013/10/03 02:15:15 It would be easier to understand what this test is
Stephen Chennney 2013/10/03 20:38:28 Done.
11 oRange.surroundContents(oParentElement);
12
13 var descriptionNode = document.createElement("p");
14 descriptionNode.id = "description";
15 descriptionNode.innerHTML = "Test that there is no crash when surroundCo ntents is called with a node preceding the current selection.";
16 var buttonNode = document.getElementById("root");
17 buttonNode.insertBefore(descriptionNode, buttonNode.firstChild);
18 Markup.dump("root");
ojan 2013/10/03 02:15:15 Can you call Markup.dump before you insert the des
Stephen Chennney 2013/10/03 20:38:28 Switched to js-tests.
19 };
20 </script>
21 <button id="root">
22 <div></div>
23 <div></div>
24 <table></table>
25 </button>
26 <script src="../../resources/dump-as-markup.js"></script>
yosin_UTC9 2013/10/03 01:41:19 It is better to use js-test-pre.js rather than dum
Stephen Chennney 2013/10/03 20:38:28 Done.
27 </body>
28 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698