1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/xslt/tests/mochitest/test_bug427060.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,53 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<!-- 1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=427060 1.8 +--> 1.9 +<head> 1.10 + <title>Test for Bug 427060</title> 1.11 + <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.12 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 1.13 +</head> 1.14 +<body> 1.15 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=427060">Mozilla Bug 427060</a> 1.16 +<p id="display"></p> 1.17 +<div id="content" style="display: none"> 1.18 + 1.19 +</div> 1.20 +<pre id="test"> 1.21 +<script class="testbody" type="text/javascript"> 1.22 + 1.23 +/** Test for Bug 427060 **/ 1.24 + 1.25 +var xmldoc, xsltdoc; 1.26 +[ xmldoc, xsltdoc ] = [ new DOMParser().parseFromString(xml, "text/xml") for (xml of [ 1.27 + 1.28 + '<opml version="1.0"><body></body></opml>' , 1.29 + 1.30 + '<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">\n\ 1.31 + <xsl:template match="/opml">\n\ 1.32 + <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n\ 1.33 + <head>\n\ 1.34 + <base target="_blank"></base>\n\ 1.35 + </head>\n\ 1.36 + <body></body>\n\ 1.37 + </html>\n\ 1.38 + </xsl:template>\n\ 1.39 + </xsl:stylesheet>' 1.40 + 1.41 +]) ]; 1.42 + 1.43 +var processor = new XSLTProcessor; 1.44 +processor.importStylesheet(xsltdoc); 1.45 +try 1.46 +{ 1.47 + var result = processor.transformToDocument(xmldoc); 1.48 +} 1.49 +catch (e) 1.50 +{ 1.51 +} 1.52 +ok(result && result instanceof Document, "XSLT transform should have created a document"); 1.53 +</script> 1.54 +</pre> 1.55 +</body> 1.56 +</html>