mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Update web-platform-tests to revision 0d9238c8062f05a55898a0cb60dc0c353794d87a
This commit is contained in:
parent
c80fa33864
commit
7e8624d921
57 changed files with 5290 additions and 266 deletions
|
@ -0,0 +1,38 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>HTML Test: element.outerHTML to verify XML fragment serialization algorithm</title>
|
||||
<link rel="author" title="Intel" href="http://www.intel.com/">
|
||||
<link rel="help" href="https://w3c.github.io/DOM-Parsing/#dfn-concept-serialize-xml">
|
||||
<link rel="help" href="https://w3c.github.io/DOM-Parsing/#widl-Element-outerHTML">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="../html-element-list.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
test(function() {
|
||||
var doc = document.implementation.createDocument(null, "");
|
||||
assert_equals(doc.contentType, "application/xml");
|
||||
var html_ns = "http://www.w3.org/1999/xhtml";
|
||||
elements_with_end_tag.forEach(function(ele) {
|
||||
test(function() {
|
||||
var e = doc.createElementNS(html_ns, ele);
|
||||
assert_equals(e.outerHTML,
|
||||
`<${ele} xmlns="${html_ns}"></${ele}>`,
|
||||
ele + " node created." );
|
||||
}, "Node for " + ele);
|
||||
});
|
||||
elements_without_end_tag.forEach(function(ele) {
|
||||
test(function() {
|
||||
var e = doc.createElementNS(html_ns, ele);
|
||||
assert_equals(e.outerHTML,
|
||||
`<${ele} xmlns="${html_ns}" />`,
|
||||
ele + " node created." );
|
||||
}, "Node for " + ele);
|
||||
});
|
||||
}, document.title);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue