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..d73f16ac571e05774d5413a0cbbf78ba422d346e |
--- /dev/null |
+++ b/LayoutTests/editing/selection/range-surroundContents-with-preceding-node.html |
@@ -0,0 +1,28 @@ |
+<!DOCTYPE html> |
+<html> |
+ <body> |
+ <script> |
+ window.onload = function(){ |
+ 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.
|
+ document.execCommand("SelectAll", false); |
+ var oRange = oSelection.getRangeAt(0); |
+ var aoElements = document.getElementsByTagName("*"); |
+ 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.
|
+ oRange.surroundContents(oParentElement); |
+ |
+ var descriptionNode = document.createElement("p"); |
+ descriptionNode.id = "description"; |
+ descriptionNode.innerHTML = "Test that there is no crash when surroundContents is called with a node preceding the current selection."; |
+ var buttonNode = document.getElementById("root"); |
+ buttonNode.insertBefore(descriptionNode, buttonNode.firstChild); |
+ 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.
|
+ }; |
+ </script> |
+ <button id="root"> |
+ <div></div> |
+ <div></div> |
+ <table></table> |
+ </button> |
+ <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.
|
+ </body> |
+</html> |