mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Update web-platform-tests to revision 548818eee08f7a6e31b9706b352b5d44b2f6d024
This commit is contained in:
parent
82fd8d1daf
commit
5e74467d68
112 changed files with 1704 additions and 536 deletions
|
@ -1,19 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
<meta name="author" title="Takayoshi Kochi" href="mailto:kochi@chromium.org">
|
||||
<meta name="assert" title="host-including inclusive ancestor should be checked for template content">
|
||||
<link rel="help" href="https://dom.spec.whatwg.org/#concept-tree-host-including-inclusive-ancestor">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id=log></div>
|
||||
<div id="parent">
|
||||
<template id="tmpl"><span>Happy Templating!</span></template>
|
||||
</div>
|
||||
</body>
|
||||
<script>
|
||||
test(() => {
|
||||
var parent = document.getElementById('parent');
|
||||
|
@ -53,12 +45,11 @@ test(() => {
|
|||
assert_not_equals(new_doc, tmpl_doc);
|
||||
|
||||
// Try moving tmpl.content to new_doc and check the results.
|
||||
var new_node = new_doc.adoptNode(tmpl.content);
|
||||
assert_equals(new_node.ownerDocument, new_doc);
|
||||
const tmplContentNodeDocument = tmpl.content.ownerDocument;
|
||||
const tmplContentAdoptResult = new_doc.adoptNode(tmpl.content);
|
||||
assert_equals(tmpl.content, tmplContentAdoptResult);
|
||||
assert_equals(tmpl.ownerDocument, document);
|
||||
assert_equals(tmpl.content.ownerDocument, new_doc);
|
||||
assert_not_equals(tmpl.content.ownerDocument, tmpl_doc);
|
||||
assert_not_equals(tmpl.content.ownerDocument, document);
|
||||
assert_equals(tmpl.content.ownerDocument, tmplContentNodeDocument);
|
||||
|
||||
// Hierarchy checks at various combinations.
|
||||
assert_throws('HierarchyRequestError', () => {
|
||||
|
@ -79,7 +70,7 @@ test(() => {
|
|||
assert_equals(tmpl.content.firstChild, span,
|
||||
'<span> should be kept until it is removed, even after ' +
|
||||
'adopted to another document.');
|
||||
new_doc.body.appendChild(new_node);
|
||||
new_doc.body.appendChild(tmpl.content);
|
||||
assert_equals(tmpl.content.firstChild, null,
|
||||
'<span> should be removed from template content.');
|
||||
assert_equals(tmpl_content_reference, tmpl.content,
|
||||
|
@ -88,4 +79,3 @@ test(() => {
|
|||
}, 'Template content should throw exception when its ancestor in ' +
|
||||
'a different document but connected via host is being append.');
|
||||
</script>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue