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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/traversal/TreeWalker-currentNode.html

Issue 1854003004: Import web-platform-tests@5a8700479d98852455bee6117558897867eb278a (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <!-- 3 <!--
4 Test adapted from https://mxr.mozilla.org/chromium/source/src/third_party/WebKit /LayoutTests/fast/dom/TreeWalker/resources/TreeWalker-currentNode.js 4 Test adapted from https://mxr.mozilla.org/chromium/source/src/third_party/WebKit /LayoutTests/fast/dom/TreeWalker/resources/TreeWalker-currentNode.js
5 --> 5 -->
6 <head> 6 <head>
7 <title>TreeWalker: currentNode</title> 7 <title>TreeWalker: currentNode</title>
8 <script src="../../../../resources/testharness.js"></script> 8 <script src="../../../../resources/testharness.js"></script>
9 <script src="../../../../resources/testharnessreport.js"></script> 9 <script src="../../../../resources/testharnessreport.js"></script>
10 <script src="traversal-support.js"></script> 10 <script src="traversal-support.js"></script>
11 <link rel="stylesheet" href="../../../../resources/testharness.css">
12 <div id=log></div> 11 <div id=log></div>
13 </head> 12 </head>
14 <body> 13 <body>
15 <div id='parent'> 14 <div id='parent'>
16 <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> labo re</b> et dolore magna</tt> aliqua.</p></div> 15 <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> labo re</b> et dolore magna</tt> aliqua.</p></div>
17 </div> 16 </div>
18 <p>Test TreeWalker currentNode functionality</p> 17 <p>Test TreeWalker currentNode functionality</p>
19 <script> 18 <script>
20 // var subTree = document.createElement('div'); 19 // var subTree = document.createElement('div');
21 // subTree.innerHTML = "<p>Lorem ipsum <span>dolor <b>sit</b> amet</span>, conse ctetur <i>adipisicing</i> elit, sed do eiusmod <tt>tempor <b><i>incididunt ut</i > labore</b> et dolore magna</tt> aliqua.</p>" 20 // subTree.innerHTML = "<p>Lorem ipsum <span>dolor <b>sit</b> amet</span>, conse ctetur <i>adipisicing</i> elit, sed do eiusmod <tt>tempor <b><i>incididunt ut</i > labore</b> et dolore magna</tt> aliqua.</p>"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 { 64 {
66 var w = document.createTreeWalker(subTree, NodeFilter.SHOW_ELEMENT, all); 65 var w = document.createTreeWalker(subTree, NodeFilter.SHOW_ELEMENT, all);
67 w.currentNode = subTree.previousSibling; 66 w.currentNode = subTree.previousSibling;
68 assert_equals(w.nextNode(), subTree); 67 assert_equals(w.nextNode(), subTree);
69 w.currentNode = document.getElementById("parent"); 68 w.currentNode = document.getElementById("parent");
70 assert_equals(w.firstChild(), subTree); 69 assert_equals(w.firstChild(), subTree);
71 }, "Test how we handle the case when the traversed to node is within the root, b ut the currentElement is not."); 70 }, "Test how we handle the case when the traversed to node is within the root, b ut the currentElement is not.");
72 </script> 71 </script>
73 </body> 72 </body>
74 </html> 73 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698