mirror of
https://github.com/servo/servo.git
synced 2025-08-29 17:18:23 +01:00
Update web-platform-tests to revision 87398b8448f699e3e324148795891658f2fa16dd
This commit is contained in:
parent
836463b9e0
commit
3fb5197361
72 changed files with 1293 additions and 348 deletions
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE HTML>
|
||||
<meta charset=utf-8>
|
||||
<html>
|
||||
<head>
|
||||
<title>domparsing Test: XMLSerializer.serializeToString</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>domparsing_XMLSerializer_serializeToString</h1>
|
||||
<script>
|
||||
function createXmlDoc(){
|
||||
var input = '<?xml version="1.0" encoding="UTF-8"?><root><child1>value1</child1></root>';
|
||||
var parser = new DOMParser();
|
||||
var doc = parser.parseFromString(input, 'text/xml');
|
||||
return doc;
|
||||
}
|
||||
test(function() {
|
||||
var serializer = new XMLSerializer ();
|
||||
var root = createXmlDoc().documentElement;
|
||||
var xmlString=serializer.serializeToString(root);
|
||||
assert_equals(xmlString, "<root><child1>value1</child1></root>");
|
||||
}, 'check XMLSerializer.serializeToString method could parsing xmldoc to string');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue