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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/dom/nodes/Node-insertBefore.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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Node.insertBefore</title> 2 <title>Node.insertBefore</title>
3 <script src="../../../../resources/testharness.js"></script> 3 <script src="../../../../resources/testharness.js"></script>
4 <script src="../../../../resources/testharnessreport.js"></script> 4 <script src="../../../../resources/testharnessreport.js"></script>
5 <div id="log"></div> 5 <div id="log"></div>
6 <script> 6 <script>
7 function testLeafNode(nodeName, createNodeFunction) { 7 function testLeafNode(nodeName, createNodeFunction) {
8 test(function() { 8 test(function() {
9 var node = createNodeFunction(); 9 var node = createNodeFunction();
10 assert_throws(new TypeError(), function() { node.insertBefore(null, null) }) 10 assert_throws(new TypeError(), function() { node.insertBefore(null, null) })
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 var c = document.createElement("div"); 297 var c = document.createElement("div");
298 a.appendChild(b); 298 a.appendChild(b);
299 a.appendChild(c); 299 a.appendChild(c);
300 assert_array_equals(a.childNodes, [b, c]); 300 assert_array_equals(a.childNodes, [b, c]);
301 assert_equals(a.insertBefore(b, b), b); 301 assert_equals(a.insertBefore(b, b), b);
302 assert_array_equals(a.childNodes, [b, c]); 302 assert_array_equals(a.childNodes, [b, c]);
303 assert_equals(a.insertBefore(c, c), c); 303 assert_equals(a.insertBefore(c, c), c);
304 assert_array_equals(a.childNodes, [b, c]); 304 assert_array_equals(a.childNodes, [b, c]);
305 }, "Inserting a node before itself should not move the node"); 305 }, "Inserting a node before itself should not move the node");
306 </script> 306 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698