dom/xslt/tests/mochitest/test_bug453441.html
author Sandor Molnar <smolnar@mozilla.com>
Wed, 16 Jul 2025 08:01:46 +0300 (6 hours ago)
changeset 796723 8b0d004a4d3f03394d1e7072f95d95a65415a0dc
parent 469641 ba6f655fd68963530c866d0d4a48c3db3d307777
permissions -rw-r--r--
Revert "Bug 1976137: apply code formatting via Lando" for causing build bustages @ Platform.cpp This reverts commit a2bbd0d672396015e05d323e236619a39b34570a. Revert "Bug 1976137 part 4: Remove DocAccessibleChild overrides of SendCaretMoveEvent and SendFocusEvent. r=eeejay" This reverts commit 102a35ed28b8cc8f3ed069ba46e8e1949a6348bf. Revert "Bug 1976137 part 3: Remove aCaretRect argument from PlatformCaretMoveEvent and PlatformFocusEvent. r=eeejay" This reverts commit b46aa6464fceaab0d48edada247983c6879e0c74. Revert "Bug 1976137 part 2: Move UpdateSystemCaretFor to Platform.cpp. r=eeejay" This reverts commit 21f1cfda868038cb85a01c45512699f4812b9045. Revert "Bug 1976137 part 1: Unify Windows AccessibleWrap::UpdateSystemCaretFor. r=eeejay" This reverts commit 05970d567b067b63a45659f56dd77d9190e5e7f7.
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=453441
-->
<head>
  <title>Test for Bug 453441</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=453441">Mozilla Bug 453441</a>
<p id="display"></p>
<div id="content" style="display: none">
  
</div>
<pre id="test">
<script class="testbody" type="text/javascript">

/** Test for Bug 453441 **/

function tryImportStylesheet(xml, valid)
{
  var processor = new XSLTProcessor;

  var xsltdoc = new DOMParser().parseFromString(xml, "text/xml");
  try
  {
    processor.importStylesheet(xsltdoc);
    ok(valid, "should be able to parse this XSLT stylesheet");
  }
  catch (e)
  {
    ok(!valid, "should not be able to parse this XSLT stylesheet");
  }
}

tryImportStylesheet(
  '<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">\n\
  <xsl:template match="/">\n\
    <html xmlns="http://www.w3.org/1999/xhtml" xsl:version="1.0" />\n\
  </xsl:template>\n\
  </xsl:stylesheet>'
, true);

tryImportStylesheet(
  '<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" />'
, false);

tryImportStylesheet(
  '<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" />'
, false);

</script>
</pre>
</body>
</html>