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

Unified Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/traversal/TreeWalker-currentNode.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/traversal/TreeWalker-currentNode.html
diff --git a/third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/traversal/TreeWalker-currentNode.html b/third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/traversal/TreeWalker-currentNode.html
deleted file mode 100644
index ed52a2eabe954c5626b0dd4a23e0649320b1032d..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/traversal/TreeWalker-currentNode.html
+++ /dev/null
@@ -1,73 +0,0 @@
-<!DOCTYPE html>
-<html>
-<!--
-Test adapted from https://mxr.mozilla.org/chromium/source/src/third_party/WebKit/LayoutTests/fast/dom/TreeWalker/resources/TreeWalker-currentNode.js
- -->
-<head>
-<title>TreeWalker: currentNode</title>
-<script src="../../../../resources/testharness.js"></script>
-<script src="../../../../resources/testharnessreport.js"></script>
-<script src="traversal-support.js"></script>
-<div id=log></div>
-</head>
-<body>
-<div id='parent'>
-<div id='subTree'><p>Lorem ipsum <span>dolor <b>sit</b> amet</span>, consectetur <i>adipisicing</i> elit, sed do eiusmod <tt>tempor <b><i>incididunt ut</i> labore</b> et dolore magna</tt> aliqua.</p></div>
-</div>
-<p>Test TreeWalker currentNode functionality</p>
-<script>
-// var subTree = document.createElement('div');
-// subTree.innerHTML = "<p>Lorem ipsum <span>dolor <b>sit</b> amet</span>, consectetur <i>adipisicing</i> elit, sed do eiusmod <tt>tempor <b><i>incididunt ut</i> labore</b> et dolore magna</tt> aliqua.</p>"
-// document.body.appendChild(subTree);
-var subTree = document.getElementById("subTree");
-
-var all = function(node) { return true; }
-
-test(function()
-{
- var w = document.createTreeWalker(subTree, NodeFilter.SHOW_ELEMENT, all);
- assert_node(w.currentNode, { type: Element, id: 'subTree' });
- assert_equals(w.parentNode(), null);
- assert_node(w.currentNode, { type: Element, id: 'subTree' });
-}, "Test that TreeWalker.parent() doesn't set the currentNode to a node not under the root.");
-
-test(function()
-{
- var w = document.createTreeWalker(subTree,
- NodeFilter.SHOW_ELEMENT
- | NodeFilter.SHOW_COMMENT,
- all);
- w.currentNode = document.documentElement;
- assert_equals(w.parentNode(), null);
- assert_equals(w.currentNode, document.documentElement);
- w.currentNode = document.documentElement;
- assert_equals(w.nextNode(), document.documentElement.firstChild);
- assert_equals(w.currentNode, document.documentElement.firstChild);
- w.currentNode = document.documentElement;
- assert_equals(w.previousNode(), null);
- assert_equals(w.currentNode, document.documentElement);
- w.currentNode = document.documentElement;
- assert_equals(w.firstChild(), document.documentElement.firstChild);
- assert_equals(w.currentNode, document.documentElement.firstChild);
- w.currentNode = document.documentElement;
- assert_equals(w.lastChild(), document.documentElement.lastChild);
- assert_equals(w.currentNode, document.documentElement.lastChild);
- w.currentNode = document.documentElement;
- assert_equals(w.nextSibling(), null);
- assert_equals(w.currentNode, document.documentElement);
- w.currentNode = document.documentElement;
- assert_equals(w.previousSibling(), null);
- assert_equals(w.currentNode, document.documentElement);
-}, "Test that we handle setting the currentNode to arbitrary nodes not under the root element.");
-
-test(function()
-{
- var w = document.createTreeWalker(subTree, NodeFilter.SHOW_ELEMENT, all);
- w.currentNode = subTree.previousSibling;
- assert_equals(w.nextNode(), subTree);
- w.currentNode = document.getElementById("parent");
- assert_equals(w.firstChild(), subTree);
-}, "Test how we handle the case when the traversed to node is within the root, but the currentElement is not.");
-</script>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698