3 <script src=
"../../resources/js-test.js"></script>
7 description("This test ensures that we can attach various DOMs to the document.");
13 "serialization": "'<Long/>'"
15 "markup": "<Long><b>15</b></Long>",
17 "serialization": "'<Long><b>15</b></Long>'"
19 "markup": "<Long id='1'>1</Long>",
21 "serialization": "'<Long id=\"1\">1</Long>'"
23 "markup": "<Long id='1'>15<b>1</b>16</Long>",
25 "serialization": "'<Long id=\"1\">15<b>1</b>16</Long>'"
29 for (var i
= 0; i
< cases
.length
; ++i
) {
30 var doc
= document
.implementation
.createDocument("", "", null);
31 var doc2
= (new DOMParser()).parseFromString(cases
[i
].markup
, "text/xml");
32 var u
= doc
.importNode(doc2
.childNodes
[0], true);
33 shouldBe("u.tagName", cases
[i
].tagName
);
35 shouldBe("(new XMLSerializer()).serializeToString(doc)", cases
[i
].serialization
);