Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quelle  test_getRelativeRuleLine.html

  Sprache: HTML
 

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


<!DOCTYPE HTML>
<html>
<head>
  <meta charset="utf-8">
  <title>Test InspectorUtils::getRelativeRuleLine</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" href="/tests/SimpleTest/test.css"/>
  <style>
    @supports (not (whatever: 72 zq)) {
      #test {
        background-color: #f0c;
      }
    }

    #test {
      color: #f0c;
    }
  </style>
  <style>#test { color: red; }</style>
  <style>
     @invalidatkeyword {
     }

     #test {
       color: blue;
     }
  </style>
  <style>#test { color: red; }</style><!-- This tests stylesheet caching -->
  <style>
    #test {
      color: tomato;

      &:where(*) {
        color: gold;

        &:not(.foo) {
          color: plum;
        }

        color: salmon;
      }

      color: blanchedalmond;
      color: snow;

      & > span {
        color: cornflowerblue;
      }

      color: seagreen;
    }
  </style><!-- This tests nesting -->
  <script>
  const InspectorUtils = SpecialPowers.InspectorUtils;

  let tests = [
    { sheetNo: 0, ruleNo: 0, lineNo: 1, columnNo: 1 },
    { sheetNo: 1, ruleNo: 0, lineNo: 2, columnNo: 5 },
    { sheetNo: 1, ruleNo: 1, lineNo: 8, columnNo: 5 },
    { sheetNo: 2, ruleNo: 0, lineNo: 1, columnNo: 1 },
    { sheetNo: 3, ruleNo: 0, lineNo: 5, columnNo: 6 },
    { sheetNo: 4, ruleNo: 0, lineNo: 1, columnNo: 1 },
    { sheetNo: 5, ruleNo: 0, lineNo: 2, columnNo: 5 },
    { sheetNo: 5, ruleNo: [00], lineNo: 5, columnNo: 7 },
    { sheetNo: 5, ruleNo: [000], lineNo: 8, columnNo: 9 },
    { sheetNo: 5, ruleNo: [001], lineNo: 12, columnNo: 9 },
    { sheetNo: 5, ruleNo: [01], lineNo: 15, columnNo: 7 },
    { sheetNo: 5, ruleNo: [02], lineNo: 18, columnNo: 7 },
    { sheetNo: 5, ruleNo: [03], lineNo: 22, columnNo: 7 },
  ];

  function doTest() {
    for (let test of tests) {
      let sheet = document.styleSheets[test.sheetNo];
      let rule;
      if (Array.isArray(test.ruleNo)) {
        for(const index of test.ruleNo) {
          rule = (rule ? rule : sheet).cssRules[index];
        }
      } else {
        rule = sheet.cssRules[test.ruleNo];
      }
      let line = InspectorUtils.getRelativeRuleLine(rule);
      let column = InspectorUtils.getRuleColumn(rule);
      info("testing sheet " + test.sheetNo + ", rule " + test.ruleNo);
      is(line, test.lineNo, "line number is correct");
      is(column, test.columnNo, "column number is correct");
    }

    SimpleTest.finish();
  }

  SimpleTest.waitForExplicitFinish();
  addLoadEvent(doTest);
  </script>
</head>
<body>
<h1>Test InspectorUtils::getRelativeRuleLine</h1>
<p id="display"></p>
<div id="content" style="display: none">

</div>
<pre id="test">
</pre>
</body>
</html>

Messung V0.5 in Prozent
C=95 H=83 G=88

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© 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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=277311
#Domains=752002