test_bug343870.xhtml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <html xmlns="http://www.w3.org/1999/xhtml">
  2. <!--
  3. https://bugzilla.mozilla.org/show_bug.cgi?id=343870
  4. -->
  5. <head>
  6. <title>Test for Bug 343870</title>
  7. <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  8. <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
  9. </head>
  10. <body>
  11. <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=343870">Mozilla Bug 343870</a>
  12. <p id="display"></p>
  13. <div id="content" style="display: none">
  14. </div>
  15. <pre id="test">
  16. <script class="testbody" type="text/javascript">
  17. <![CDATA[
  18. /** Test for Bug 343870 **/
  19. function doTest() {
  20. var dataDoc = document.getElementById("d").contentDocument;
  21. is(dataDoc.getElementById("lf").firstChild.data, "\n");
  22. is(dataDoc.getElementById("cr").firstChild.data, "\n");
  23. is(dataDoc.getElementById("crlf").firstChild.data, "\n");
  24. is(dataDoc.getElementById("escapedcr").firstChild.data, "\r");
  25. }
  26. SimpleTest.waitForExplicitFinish();
  27. addLoadEvent(doTest);
  28. addLoadEvent(SimpleTest.finish);
  29. ]]>
  30. </script>
  31. </pre>
  32. <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>
  33. </body>
  34. </html>