Update web-platform-tests to revision d7afcb8708eac08a614d161d5622a48172daf7e3

This commit is contained in:
WPT Sync Bot 2019-05-15 10:40:54 -04:00 committed by Josh Matthews
parent 6f8bb4dd40
commit edff458e23
791 changed files with 17647 additions and 10322 deletions

View file

@ -17,13 +17,25 @@ invalid_names.forEach(function(name) {
assert_throws("INVALID_CHARACTER_ERR", function() {
document.createAttribute(name, "test");
});
}, "HTML document.createAttribute(" + format_value(name) + ")");
}, "HTML document.createAttribute(" + format_value(name) + ") should throw");
test(function() {
assert_throws("INVALID_CHARACTER_ERR", function() {
xml_document.createAttribute(name, "test");
});
}, "XML document.createAttribute(" + format_value(name) + ")");
}, "XML document.createAttribute(" + format_value(name) + ") should throw");
});
valid_names.forEach(name => {
test(() => {
let attr = document.createAttribute(name);
attr_is(attr, "", name.toLowerCase(), null, null, name.toLowerCase());
}, `HTML document.createAttribute(${format_value(name)})`);
test(() => {
let attr = xml_document.createAttribute(name);
attr_is(attr, "", name, null, null, name);
}, `XML document.createAttribute(${format_value(name)})`);
});
var tests = ["title", "TITLE", null, undefined];

View file

@ -1,3 +1,3 @@
var invalid_names = ["", "invalid^Name", "\\", "'", '"', "0", "0:a"] // XXX
var valid_names = ["x", ":", "a:0"]
var valid_names = ["x", "X", ":", "a:0"]
var invalid_qnames = [":a", "b:", "x:y:z"] // XXX