2008-11-04 Anders Carlsson <andersca@apple.com>
[webkit/qt.git] / LayoutTests / fast / dom / XMLSerializer-doctype.html
blob5e6f202708aaaeb27ec3b42fdf5f46139305c576
1 <html>
2 <head>
3 <script>
4 function debug(str) {
5 li = document.createElement('li');
6 li.appendChild(document.createTextNode(str));
7 document.getElementById('console').appendChild(li);
10 function runTests() {
11 if (window.layoutTestController) {
12 layoutTestController.dumpAsText();
15 var docType = window.document.implementation.createDocumentType("aDocTypeName", "aPublicID", "aSystemID");
16 var doc = window.document.implementation.createDocument("", "", docType);
18 var serializer = new XMLSerializer();
20 var result = serializer.serializeToString(docType);
21 if (result == '<!DOCTYPE aDocTypeName PUBLIC "aPublicID" "aSystemID">')
22 debug('PASS: the DocumentType node has been successfully serialize to "' + result + '".');
23 else
24 debug('FAIL: the DocumentType node has not been successfully serialized.');
26 </script>
27 </head>
28 <body onload="runTests()">
29 This tests XMLSerializer.serializeToString() on a DocumentType node that has a document associated with it.
30 <ul id="console">
31 </ul>
32 </body>
33 </html>