Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


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
C=99 H=100 G=99

¤ Dauer der Verarbeitung: 0.12 Sekunden  (vorverarbeitet)  ¤

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






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge