Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/layout/inspector/tests/   (Firefox Browser Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 2 kB image not shown  

Quelle  test_isinheritableproperty.html

  Sprache: HTML
 

 products/Sources/formale Sprachen/C/Firefox/layout/inspector/tests/test_isinheritableproperty.html


<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=699592
-->

<head>
  <title>Test for InspectorUtils::isInheritedProperty</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
  <style>
    @property --css-registered-inherits {
      syntax: "*";
      inherits: true;
    }
    @property --css-registered-no-inherits {
      syntax: "*";
      inherits: false;
    }
  </style>
  <script>
    CSS.registerProperty({
      name: "--js-registered-inherits",
      syntax: "*",
      inherits: true,
    });
    CSS.registerProperty({
      name: "--js-registered-no-inherits",
      syntax: "*",
      inherits: false,
    });
  </script>
</head>
<body>
<pre id="test">
<script type="application/javascript">

function do_test() {
  const isInherited = (name) =>
    SpecialPowers.InspectorUtils.isInheritedProperty(document, name);

  is(isInherited("font-size"), true, "font-size is inherited.");
  is(isInherited("min-width"), false, "min-width is not inherited.");

  is(isInherited("font"), true, "shorthand font property is inherited.");

  is(isInherited("border"), false, "shorthand border property not inherited.");
  is(isInherited("garbage"), false, "Unknown property isn't inherited.");

  info("Checking isInheritedProperty result on custom properties");
  is(isInherited("--unregistered-var"),true,
    "Unregistered custom property is inherited."
  );
  is(
    isInherited("--css-registered-inherits"),
    true,
    "Returns true for @property that inherits"
  );
  is(
    isInherited("--css-registered-no-inherits"),
    false,
    "Returns false for @property that does not inherits"
  );
  is(
    isInherited("--js-registered-inherits"),
    true,
    "Returns true for property registered in JS that inherits"
  );
  is(
    isInherited("--js-registered-no-inherits"),
    false,
    "Returns false for property registered in JS that does not inherits"
  );

  SimpleTest.finish();
}

SimpleTest.waitForExplicitFinish();
addLoadEvent(do_test);


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

Messung V0.5 in Prozent
C=99 H=100 G=99

¤ Dauer der Verarbeitung: 0.15 Sekunden  (vorverarbeitet am  2026-06-06) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

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 und die Messung sind noch experimentell.