Bug 1942639 - Propagate --filter argument from desktop_unittest.py to runreftest...
[gecko.git] / dom / xslt / tests / mochitest / test_bug667315.html
bloba54fa05f422faf6ccc850e74a2048c4fe1a87cfb
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=667315
5 -->
6 <head>
7 <title>Test for Bug 667315</title>
8 <script src="/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
10 </head>
11 <body>
12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=667315">Mozilla Bug 667315</a>
13 <p id="display"></p>
14 <div id="content" style="display: none">
16 </div>
17 <pre id="test">
18 <script type="application/javascript">
20 /** Test for Bug 667315 **/
22 var style =
23 '<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" ' +
24 'version="1.0">' +
25 '<xsl:variable name="var">' +
26 '<html><p>a</p></html>' +
27 '</xsl:variable>' +
28 '<xsl:template match="/">' +
29 '<xsl:copy-of select="$var" />' +
30 '</xsl:template>' +
31 '</xsl:stylesheet>';
32 var styleDoc = new DOMParser().parseFromString (style, "text/xml");
34 var data = '<root/>';
35 var originalDoc = new DOMParser().parseFromString(data, "text/xml");
37 var processor = new XSLTProcessor();
38 processor.importStylesheet(styleDoc);
40 var doc = processor.transformToDocument(originalDoc);
41 ok(doc instanceof HTMLDocument, "should have switched to html output method");
43 </script>
44 </pre>
45 </body>
46 </html>