mirror of
https://github.com/servo/servo.git
synced 2025-08-15 10:25:32 +01:00
Update web-platform-tests to revision 7da6acfd668e66adae5ab4e2d389810d3b1460be
This commit is contained in:
parent
50db64a20e
commit
bae87d193d
307 changed files with 35826 additions and 209 deletions
|
@ -7,20 +7,37 @@
|
|||
<script src=productions.js></script>
|
||||
<div id=log>
|
||||
<script>
|
||||
var xml_document;
|
||||
setup(function() {
|
||||
xml_document = document.implementation.createDocument(null, null, null);
|
||||
});
|
||||
|
||||
invalid_names.forEach(function(name) {
|
||||
test(function() {
|
||||
assert_throws("INVALID_CHARACTER_ERR", function() {
|
||||
document.createAttribute(name, "test");
|
||||
});
|
||||
}, "createAttribute(" + format_value(name) + ")");
|
||||
}, "HTML document.createAttribute(" + format_value(name) + ")");
|
||||
|
||||
test(function() {
|
||||
assert_throws("INVALID_CHARACTER_ERR", function() {
|
||||
xml_document.createAttribute(name, "test");
|
||||
});
|
||||
}, "XML document.createAttribute(" + format_value(name) + ")");
|
||||
});
|
||||
|
||||
var tests = ["title", "TITLE", null, undefined];
|
||||
tests.forEach(function(name) {
|
||||
test(function() {
|
||||
var attribute = document.createAttribute(name);
|
||||
attr_is(attribute, "", String(name).toLowerCase(), null, null, String(name).toLowerCase());
|
||||
assert_equals(attribute.ownerElement, null);
|
||||
}, "HTML document.createAttribute(" + format_value(name) + ")");
|
||||
|
||||
test(function() {
|
||||
var attribute = xml_document.createAttribute(name);
|
||||
attr_is(attribute, "", String(name), null, null, String(name));
|
||||
assert_equals(attribute.ownerElement, null);
|
||||
}, "createAttribute(" + format_value(name) + ")");
|
||||
}, "XML document.createAttribute(" + format_value(name) + ")");
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue