content/xml/document/test/test_bug343870.xhtml

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/content/xml/document/test/test_bug343870.xhtml	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,39 @@
     1.4 +<html xmlns="http://www.w3.org/1999/xhtml">
     1.5 +<!--
     1.6 +https://bugzilla.mozilla.org/show_bug.cgi?id=343870
     1.7 +-->
     1.8 +<head>
     1.9 +  <title>Test for Bug 343870</title>
    1.10 +  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>        
    1.11 +  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
    1.12 +</head>
    1.13 +<body>
    1.14 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=343870">Mozilla Bug 343870</a>
    1.15 +<p id="display"></p>
    1.16 +<div id="content" style="display: none">
    1.17 +
    1.18 +</div>
    1.19 +<pre id="test">
    1.20 +<script class="testbody" type="text/javascript">
    1.21 +<![CDATA[
    1.22 +
    1.23 +/** Test for Bug 343870 **/
    1.24 +function doTest() {
    1.25 +  var dataDoc = document.getElementById("d").contentDocument;
    1.26 +  is(dataDoc.getElementById("lf").firstChild.data, "\n");
    1.27 +  is(dataDoc.getElementById("cr").firstChild.data, "\n");
    1.28 +  is(dataDoc.getElementById("crlf").firstChild.data, "\n");
    1.29 +  is(dataDoc.getElementById("escapedcr").firstChild.data, "\r");
    1.30 +}
    1.31 +
    1.32 +SimpleTest.waitForExplicitFinish();
    1.33 +addLoadEvent(doTest);
    1.34 +addLoadEvent(SimpleTest.finish);
    1.35 +
    1.36 +]]>
    1.37 +</script>
    1.38 +</pre>
    1.39 +<iframe id="d" src="data:application/xml,%3C%3Fxml version%3D'1.0' encoding%3D'utf-8'%3F%3E%3Chtml xmlns%3D'http%3A//www.w3.org/1999/xhtml'%3E%3Cp id%3D'lf'%3E%0A%3C/p%3E%3Cp id%3D'cr'%3E%0D%3C/p%3E%3Cp id%3D'crlf'%3E%0D%0A%3C/p%3E%3Cp id%3D'escapedcr'%3E%26%2313;%3C/p%3E%3C/html%3E"></iframe>
    1.40 +</body>
    1.41 +</html>
    1.42 +

mercurial