Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / xsl / transformToFragment-XML-declaration.html
blob8992c20290b2874de111ba5bb2722c8157365087
1 <body>
2 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=10419">bug 10419</a>:
3 XSLTProcessor transformToFragment fails because of an XML declaration.</p>
5 <script>
7 if (window.testRunner)
8 testRunner.dumpAsText();
10 try {
11 var xml = (new DOMParser()).parseFromString('<doc/>', 'application/xml');
12 var xsl = (new DOMParser()).parseFromString(
13 '<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">' +
14 '<xsl:output method="xml" omit-xml-declaration="no"/>' +
15 ' <xsl:template match="doc"><p>1</p><p>2</p></xsl:template>' +
16 '</xsl:stylesheet>',
17 'application/xml');
19 var p = new XSLTProcessor;
20 p.importStylesheet(xsl);
22 var ownerDocument = document.implementation.createDocument("", "doc", null);
23 var f = p.transformToFragment(xml, ownerDocument);
24 var result = (new XMLSerializer()).serializeToString(f);
25 result = result.substr(0, 16); // remove the trailing newline, if present
27 if (result == "<p>1</p><p>2</p>")
28 document.write('SUCCESS');
29 else
30 document.write('<xmp>FAILURE: "' + result + '"</xmp>');
32 } catch (ex) {
33 document.write('FAILURE: ' + ex);
36 </script>
37 </body>