Chromium Code Reviews| 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> |