Index: third_party/WebKit/LayoutTests/editing/selection/collapse-null.html |
diff --git a/third_party/WebKit/LayoutTests/editing/selection/collapse-null.html b/third_party/WebKit/LayoutTests/editing/selection/collapse-null.html |
index 10aec6a013515dc0fd1e6533e966643ed5de9080..9f617af8b77d60515f45583c7f20caf640d7f085 100644 |
--- a/third_party/WebKit/LayoutTests/editing/selection/collapse-null.html |
+++ b/third_party/WebKit/LayoutTests/editing/selection/collapse-null.html |
@@ -5,18 +5,15 @@ |
<div id="div" contenteditable="true">hello</div> |
<script> |
-description("Ensure that collapse with null clears selection"); |
+description("Ensure that collapse or setPosition with null throws an exception"); |
var selection = getSelection(); |
selection.selectAllChildren(div); |
- selection.rangeCount |
- shouldBe("selection.rangeCount", "1"); |
- selection.collapse(null); |
- shouldBe("selection.rangeCount", "0"); |
- selection.collapse(div.firstChild, 2); |
- shouldBe("selection.rangeCount", "1"); |
- selection.collapse(null); |
- shouldBe("selection.rangeCount", "0"); |
+shouldBe("selection.rangeCount", "1"); |
+shouldThrow("selection.collapse(null)"); |
+shouldBe("selection.rangeCount", "1"); |
+shouldThrow("selection.setPosition(null)"); |
+shouldBe("selection.rangeCount", "1"); |
</script> |
</body> |