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

Unified Diff: LayoutTests/fast/dom/Range/range-detached-exceptions.html

Issue 252783002: Make Range.detach() a no-op (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/dom/Range/range-detached-exceptions.html
diff --git a/LayoutTests/fast/dom/Range/range-detached-exceptions.html b/LayoutTests/fast/dom/Range/range-detached-exceptions.html
deleted file mode 100644
index 1847838bec0db3266f06d45089b713bc104d8c07..0000000000000000000000000000000000000000
--- a/LayoutTests/fast/dom/Range/range-detached-exceptions.html
+++ /dev/null
@@ -1,52 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <script src="../../../resources/js-test.js"></script>
-</head>
-<body>
- <!-- hidden area to create the ranges being tested -->
- <div style="visibility: hidden">
- <div id=a1>a1
- <div id=b1>b1</div>
- </div>
- </div>
-
- <script>
- function execute(method) {
- return '"InvalidStateError: Failed to execute \'' + method + '\' on \'Range\': The range has no container. Perhaps \'detach()\' has been invoked on this object?"';
- }
- function read(property) {
- return '"InvalidStateError: Failed to read the \'' + property + '\' property from \'Range\': The range has no container. Perhaps \'detach()\' has been invoked on this object?"';
- }
-
- description("A variety of Range methods should throw if called on a detached range.");
- var range = document.createRange();
- range.selectNode(document.getElementById("a1"));
- range.detach();
-
- shouldThrow("range.cloneContents()", execute("cloneContents"));
- shouldThrow("range.cloneRange()", execute("cloneRange"));
- shouldThrow("range.collapsed", read("collapsed"));
- shouldThrow("range.commonAncestorContainer", read("commonAncestorContainer"));
- shouldThrow("range.compareBoundaryPoints(Range.START_TO_END, range)", execute("compareBoundaryPoints"));
- shouldThrow("range.comparePoint(document.getElementById('b1'), 1)", execute("comparePoint"));
- shouldThrow("range.createContextualFragment('p')", execute("createContextualFragment"));
- shouldThrow("range.deleteContents()", execute("deleteContents"));
- shouldThrow("range.detach()", execute("detach"));
- shouldThrow("range.endContainer", read("endContainer"));
- shouldThrow("range.endOffset", read("endOffset"));
- shouldThrow("range.extractContents()", execute("extractContents"));
- shouldThrow("range.insertNode(document.getElementById('b1'))", execute("insertNode"));
- shouldThrow("range.intersectsNode(document.getElementById('b1'))", execute("intersectsNode"));
- shouldThrow("range.isPointInRange(document.getElementById('b1'), 0)", execute("isPointInRange"));
- shouldThrow("range.selectNode(document.getElementById('b1'))", execute("selectNode"));
- shouldThrow("range.selectNodeContents(document.getElementById('b1'))", execute("selectNodeContents"));
- shouldThrow("range.setEnd(document.getElementById('b1'), 0)", execute("setEnd"));
- shouldThrow("range.setStart(document.getElementById('b1'), 0)", execute("setStart"));
- shouldThrow("range.startContainer", read("startContainer"));
- shouldThrow("range.startOffset", read("startOffset"));
- shouldThrow("range.surroundContents(document.getElementById('b1'))", execute("surroundContents"));
- shouldThrow("range.toString()", execute("toString"));
- </script>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698