mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update web-platform-tests to revision 0d318188757a9c996e20b82db201fd04de5aa255
This commit is contained in:
parent
b2a5225831
commit
1a81b18b9f
12321 changed files with 544385 additions and 6 deletions
|
@ -0,0 +1,22 @@
|
|||
function test_create(method, iface, nodeType, nodeName) {
|
||||
["\u000b", "a -- b", "a-", "-b", null, undefined].forEach(function(value) {
|
||||
test(function() {
|
||||
var c = document[method](value);
|
||||
var expected = String(value);
|
||||
assert_true(c instanceof iface);
|
||||
assert_true(c instanceof CharacterData);
|
||||
assert_true(c instanceof Node);
|
||||
assert_equals(c.ownerDocument, document);
|
||||
assert_equals(c.data, expected, "data");
|
||||
assert_equals(c.nodeValue, expected, "nodeValue");
|
||||
assert_equals(c.textContent, expected, "textContent");
|
||||
assert_equals(c.length, expected.length);
|
||||
assert_equals(c.nodeType, nodeType);
|
||||
assert_equals(c.nodeName, nodeName);
|
||||
assert_equals(c.hasChildNodes(), false);
|
||||
assert_equals(c.childNodes.length, 0);
|
||||
assert_equals(c.firstChild, null);
|
||||
assert_equals(c.lastChild, null);
|
||||
}, method + "(" + format_value(value) + ")");
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue