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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/dom/nodes/Document-createComment-createTextNode.js

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 function test_create(method, iface, nodeType, nodeName) { 1 function test_create(method, iface, nodeType, nodeName) {
2 ["\u000b", "a -- b", "a-", "-b", null, undefined].forEach(function(value) { 2 ["\u000b", "a -- b", "a-", "-b", null, undefined].forEach(function(value) {
3 test(function() { 3 test(function() {
4 var c = document[method](value); 4 var c = document[method](value);
5 var expected = String(value); 5 var expected = String(value);
6 assert_true(c instanceof iface); 6 assert_true(c instanceof iface);
7 assert_true(c instanceof CharacterData); 7 assert_true(c instanceof CharacterData);
8 assert_true(c instanceof Node); 8 assert_true(c instanceof Node);
9 assert_equals(c.ownerDocument, document); 9 assert_equals(c.ownerDocument, document);
10 assert_equals(c.data, expected, "data"); 10 assert_equals(c.data, expected, "data");
11 assert_equals(c.nodeValue, expected, "nodeValue"); 11 assert_equals(c.nodeValue, expected, "nodeValue");
12 assert_equals(c.textContent, expected, "textContent"); 12 assert_equals(c.textContent, expected, "textContent");
13 assert_equals(c.length, expected.length); 13 assert_equals(c.length, expected.length);
14 assert_equals(c.nodeType, nodeType); 14 assert_equals(c.nodeType, nodeType);
15 assert_equals(c.nodeName, nodeName); 15 assert_equals(c.nodeName, nodeName);
16 assert_equals(c.hasChildNodes(), false); 16 assert_equals(c.hasChildNodes(), false);
17 assert_equals(c.childNodes.length, 0); 17 assert_equals(c.childNodes.length, 0);
18 assert_equals(c.firstChild, null); 18 assert_equals(c.firstChild, null);
19 assert_equals(c.lastChild, null); 19 assert_equals(c.lastChild, null);
20 }, method + "(" + format_value(value) + ")"); 20 }, method + "(" + format_value(value) + ")");
21 }); 21 });
22 } 22 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698