mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Update web-platform-tests to revision 66c4613f823c4384c78ada77346eda17bb128947
This commit is contained in:
parent
183772583f
commit
a91433f0c8
234 changed files with 4368 additions and 967 deletions
|
@ -32,8 +32,11 @@ test(function() {
|
|||
|
||||
assert_equals(template.ownerDocument, doc.body.ownerDocument,
|
||||
'Wrong template node owner document');
|
||||
assert_equals(template.content.ownerDocument, doc,
|
||||
'Wrong template content owner document');
|
||||
var ownerDoc = template.content.ownerDocument;
|
||||
assert_not_equals(ownerDoc, doc, 'Wrong template content owner document');
|
||||
assert_not_equals(ownerDoc, document, 'Wrong template content owner document');
|
||||
assert_equals(ownerDoc.defaultView, null,
|
||||
'Template content owner document should not have a browsing context');
|
||||
|
||||
}, 'Parsing XHTML: Node\'s node document must be set to that of the element '
|
||||
+ 'to which it will be appended. Test empty template');
|
||||
|
|
|
@ -22,6 +22,13 @@ function templateIsAChild(element) {
|
|||
'Template element should be a descendant of the ' + element.tagName + ' element');
|
||||
}
|
||||
|
||||
function templateIsDisallowedAsAChild(element) {
|
||||
element.innerHTML = '<template>some text</template>';
|
||||
|
||||
assert_equals(element.querySelector('template'), null,
|
||||
'Template element should not be allowed as a descendant of the ' + element.tagName + ' element');
|
||||
}
|
||||
|
||||
function templateIsAnIndirectChild(element) {
|
||||
element.innerHTML = '<div><template>some text</template></div>';
|
||||
|
||||
|
@ -29,6 +36,13 @@ function templateIsAnIndirectChild(element) {
|
|||
'Template element should be a descendant of the ' + element.tagName + ' element');
|
||||
}
|
||||
|
||||
function templateIsDisallowedAsAnIndirectChild(element) {
|
||||
element.innerHTML = '<div><template>some text</template></div>';
|
||||
|
||||
assert_equals(element.querySelector('template'), null,
|
||||
'Template element should not be allowed as indirect descendant of the ' + element.tagName + ' element');
|
||||
}
|
||||
|
||||
function templateIsAnAppendedChild(doc, element) {
|
||||
var template = doc.createElement('template');
|
||||
|
||||
|
@ -58,13 +72,16 @@ var parameters = [['Template element as a descendant of the BODY element. ' +
|
|||
['Template element as a descendant of the HEAD element. ' +
|
||||
'Template element is created by innerHTML',
|
||||
doc.head],
|
||||
['Template element as a descendant of the FRAMESET element. ' +
|
||||
'Template element is created by innerHTML',
|
||||
frameset]
|
||||
];
|
||||
generate_tests(templateIsAChild, parameters,
|
||||
'Template element as a descendant of the HEAD, BODY and FRAMESET elements');
|
||||
'Template element as a descendant of the HEAD and BODY elements');
|
||||
|
||||
parameters = [['Template element as a descendant of the FRAMESET element. ' +
|
||||
'Template element is created by innerHTML',
|
||||
frameset],
|
||||
];
|
||||
generate_tests(templateIsDisallowedAsAChild, parameters,
|
||||
'Template element should be disallowed as a descendant of the FRAMESET elements');
|
||||
|
||||
|
||||
parameters = [['Template element as an indirect descendant of the BODY element. ' +
|
||||
|
@ -73,13 +90,17 @@ parameters = [['Template element as an indirect descendant of the BODY element.
|
|||
['Template element as an indirect descendant of the HEAD element. ' +
|
||||
'Template element is created by innerHTML',
|
||||
doc.head],
|
||||
['Template element as an indirect descendant of the FRAMESET element. ' +
|
||||
'Template element is created by innerHTML',
|
||||
frameset]
|
||||
];
|
||||
generate_tests(templateIsAnIndirectChild, parameters,
|
||||
'Template element as an indirect descendant of the HEAD, BODY and FRAMESET elements');
|
||||
|
||||
parameters = [['Template element as a descendant of the FRAMESET element. ' +
|
||||
'Template element is created by innerHTML',
|
||||
frameset],
|
||||
];
|
||||
generate_tests(templateIsDisallowedAsAnIndirectChild, parameters,
|
||||
'Template element should be disallowed as an indirect descendant of the FRAMESET elements');
|
||||
|
||||
|
||||
|
||||
parameters = [['Template element as a descendant of the BODY element. ' +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue