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

Unified Diff: third_party/WebKit/LayoutTests/editing/selection/collapse-null.html

Issue 1498253002: Drop [LegacyInterfaceTypeChecking] for most of Selection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update tests Created 5 years 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
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>

Powered by Google App Engine
This is Rietveld 408576698