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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/Range/surroundContents-1.html

Issue 2745443003: DOM Range: surroundContents() should not check if newParent is in ancestors beforehand. (Closed)
Patch Set: . Created 3 years, 9 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: third_party/WebKit/LayoutTests/fast/dom/Range/surroundContents-1.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Range/surroundContents-1.html b/third_party/WebKit/LayoutTests/fast/dom/Range/surroundContents-1.html
deleted file mode 100644
index d655ae9140120aea1475c3fdc5ae2dcc52f17cdd..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/fast/dom/Range/surroundContents-1.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<p>This tests for HIERARCHY_REQUEST_ERRs when calling Range::surroundContents.</p>
-<div id="select" style="border: 1px solid blue;">Hello world.</div>
-<div id="insert" style="border: 1px solid red;"></div>
-<ul id="console"></ul>
-<script>
-function log(str) {
- var li = document.createElement("li");
- li.appendChild(document.createTextNode(str));
- var console = document.getElementById("console");
- console.appendChild(li);
-}
-
-var range = document.createRange();
-var select = document.getElementById("select");
-var text = select.firstChild;
-
-var insert = document.getElementById("insert");
-
-range.setStart(text, 0);
-range.setEnd(text, text.length);
-
-try {
- range.surroundContents(select);
-} catch (e) {
- var error = "HierarchyRequestError: Failed to execute 'surroundContents' on 'Range': The node provided contains the insertion point; it may not be inserted into itself.";
- if (e != error)
- log ("Failure, expected: " + error + "Was " + e);
-}
-
-try {
- range.surroundContents(insert);
-} catch (e) {
- log ("Failure: " + error);
-}
-</script>

Powered by Google App Engine
This is Rietveld 408576698