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

Unified Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/ranges/Range-intersectsNode.html

Issue 1988983002: Move the dom directory from web-platform-tests/ to wpt/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/imported/web-platform-tests/dom/ranges/Range-intersectsNode.html
diff --git a/third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/ranges/Range-intersectsNode.html b/third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/ranges/Range-intersectsNode.html
deleted file mode 100644
index 7745088635dbbdf2930fba9fdb3766d81a5afa0d..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/ranges/Range-intersectsNode.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<!doctype html>
-<title>Range.intersectsNode() tests</title>
-<link rel="author" title="Aryeh Gregor" href=ayg@aryeh.name>
-<meta name=timeout content=long>
-<div id=log></div>
-<script src=../../../../resources/testharness.js></script>
-<script src=../../../../resources/testharnessreport.js></script>
-<script src=../common.js></script>
-<script>
-"use strict";
-
-// Will be filled in on the first run for that range
-var testRangesCached = [];
-
-for (var i = 0; i < testNodes.length; i++) {
- var node = eval(testNodes[i]);
-
- for (var j = 0; j < testRanges.length; j++) {
- test(function() {
- if (testRangesCached[j] === undefined) {
- try {
- testRangesCached[j] = rangeFromEndpoints(eval(testRanges[i]));
- } catch(e) {
- testRangesCached[j] = null;
- }
- }
- assert_not_equals(testRangesCached[j], null,
- "Setting up the range failed");
-
- var range = testRangesCached[j].cloneRange();
-
- // "If node's root is different from the context object's root,
- // return false and terminate these steps."
- if (furthestAncestor(node) !== furthestAncestor(range.startContainer)) {
- assert_equals(range.intersectsNode(node), false,
- "Must return false if node and range have different roots");
- return;
- }
-
- // "Let parent be node's parent."
- var parent_ = node.parentNode;
-
- // "If parent is null, return true and terminate these steps."
- if (!parent_) {
- assert_equals(range.intersectsNode(node), true,
- "Must return true if node's parent is null");
- return;
- }
-
- // "Let offset be node's index."
- var offset = indexOf(node);
-
- // "If (parent, offset) is before end and (parent, offset + 1) is
- // after start, return true and terminate these steps."
- if (getPosition(parent_, offset, range.endContainer, range.endOffset) === "before"
- && getPosition(parent_, offset + 1, range.startContainer, range.startOffset) === "after") {
- assert_equals(range.intersectsNode(node), true,
- "Must return true if (parent, offset) is before range end and (parent, offset + 1) is after range start");
- return;
- }
-
- // "Return false."
- assert_equals(range.intersectsNode(node), false,
- "Must return false if (parent, offset) is not before range end or (parent, offset + 1) is not after range start");
- }, "Node " + i + " " + testNodes[i] + ", range " + j + " " + testRanges[j]);
- }
-}
-
-testDiv.style.display = "none";
-</script>

Powered by Google App Engine
This is Rietveld 408576698