Bug 1942639 - Propagate --filter argument from desktop_unittest.py to runreftest...
[gecko.git] / dom / xslt / tests / mochitest / test_bug427060.html
blob0dac88b74b7e95d1d66bc1c0d3bdc618653fbf90
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=427060
5 -->
6 <head>
7 <title>Test for Bug 427060</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=427060">Mozilla Bug 427060</a>
13 <p id="display"></p>
14 <div id="content" style="display: none">
16 </div>
17 <pre id="test">
18 <script class="testbody" type="text/javascript">
20 /** Test for Bug 427060 **/
22 var xmldoc, xsltdoc;
24 xmldoc = new DOMParser().parseFromString('<opml version="1.0"><body></body></opml>', "text/xml");
25 xsltdoc = new DOMParser().parseFromString('<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">\n\
26 <xsl:template match="/opml">\n\
27 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n\
28 <head>\n\
29 <base target="_blank"></base>\n\
30 </head>\n\
31 <body></body>\n\
32 </html>\n\
33 </xsl:template>\n\
34 </xsl:stylesheet>', "text/xml");
36 var processor = new XSLTProcessor;
37 processor.importStylesheet(xsltdoc);
38 try
40 var result = processor.transformToDocument(xmldoc);
42 catch (e)
45 ok(result && result instanceof Document, "XSLT transform should have created a document");
46 </script>
47 </pre>
48 </body>
49 </html>