Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/parser/htmlparser/tests/mochitest/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 2 kB image not shown  

SSL test_compatmode.html   Sprache: HTML

 
 products/Sources/formale Sprachen/C/Firefox/parser/htmlparser/tests/mochitest/test_compatmode.html


<!DOCTYPE HTML>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Mochitest for DOCTYPE parsing</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=363883">Mozilla Bug 363883</a>

<p id="display"></p>
<div id="content" style="display: none">

</div>

<pre id="test">
<script class="testbody" type="text/javascript">

var doctypes = [
/* from bug 363883 */
"BackCompat""",
"BackCompat""",
"BackCompat""",
"BackCompat""",
"CSS1Compat""",
"BackCompat""",
"CSS1Compat""",
"BackCompat""",
"BackCompat""",
"BackCompat""",
"BackCompat""",
"BackCompat""",
"BackCompat""",
"BackCompat""",
"BackCompat"'',
"BackCompat"'',
"BackCompat"'',
"BackCompat""",
"BackCompat"'',
"BackCompat"'',
"CSS1Compat"'',
"BackCompat"'',
"BackCompat"'',
"BackCompat"'',
"BackCompat"'',
"BackCompat"'',
"BackCompat"'',
/* end from bug 363883 */
// from bug 502600
"BackCompat"'',
];

window.addEventListener("message", verifyResult);

function verifyResult(event) {
  let i = event.data.index;
  let curFrame = document.getElementById("test" + i);
  let mode = SpecialPowers.wrap(curFrame).contentDocument.compatMode;
  is(mode, doctypes[i], doctypes[i + 1]);
  if (i == doctypes.length - 2) {
    window.removeEventListener("message", verifyResult);
    SimpleTest.finish();
  }
}

// //
// Insert a hidden iframe into the document, with the src
// containing the test doctype.  The iframe's onload
// function is set to call the test's verification step.
//
function insert_iframe(index, doctype) {
  var elm = document.createElement("iframe");
  elm.setAttribute("id""test" + index);
  elm.setAttribute("src""data:text/html," + doctype +
    '');
  elm.setAttribute("style""display:none");
  document.getElementsByTagName("body")[0].appendChild(elm);
}

// //
// Iterate over the tests
//
function doTest() {
  for (var i = 0; i < doctypes.length; i += 2) {
    insert_iframe(i, doctypes[i + 1]);
  }
}

// //
// Run the compatbility mode tests.
//
SimpleTest.waitForExplicitFinish();
doTest();

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

93%


¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.