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

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

Issue 1529523002: Import dom/ from web-platform-tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tweak W3CImportExpectations Created 5 years 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
(Empty)
1 function test_create(method, iface, nodeType, nodeName) {
2 ["\u000b", "a -- b", "a-", "-b", null, undefined].forEach(function(value) {
3 test(function() {
4 var c = document[method](value);
5 var expected = String(value);
6 assert_true(c instanceof iface);
7 assert_true(c instanceof CharacterData);
8 assert_true(c instanceof Node);
9 assert_equals(c.ownerDocument, document);
10 assert_equals(c.data, expected, "data");
11 assert_equals(c.nodeValue, expected, "nodeValue");
12 assert_equals(c.textContent, expected, "textContent");
13 assert_equals(c.length, expected.length);
14 assert_equals(c.nodeType, nodeType);
15 assert_equals(c.nodeName, nodeName);
16 assert_equals(c.hasChildNodes(), false);
17 assert_equals(c.childNodes.length, 0);
18 assert_equals(c.firstChild, null);
19 assert_equals(c.lastChild, null);
20 }, method + "(" + format_value(value) + ")");
21 });
22 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698