Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/layout/style/test/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 1 kB image not shown  

Quelle  test_sheet_privilege.html   Sprache: HTML

 
 products/Sources/formale Sprachen/C/Firefox/layout/style/test/test_sheet_privilege.html


<!doctype html>
<title>Test whether it can access a filed in MediaList with normal privilege after accessing with chrome privilege.</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>

<style>
@media screen and (max-width: 800px) {
  body {
    background-color: lime;
  }
}
</style>
<script>
"use strict";

function assertMediaText(rule, description) {
  is(rule.media.mediaText, "screen and (max-width: 800px)", description);
}

add_task(function testCssRuleMedia() {
  assertMediaText(SpecialPowers.wrap(document).styleSheets[0].cssRules[0], "privileged document");
  assertMediaText(document.styleSheets[0].cssRules[0], "unprivileged document");
});

add_task(function testSheetFromCache() {
  for (let i = 0; i < 2; ++i) {
    const style = document.createElement("style");
    style.textContent = `@media screen and (max-width: 800px) {}`;
    document.head.append(style);
    assertMediaText(SpecialPowers.wrap(style).sheet.cssRules[0], "privileged sheet " + i);
    assertMediaText(style.sheet.cssRules[0], "unprivileged sheet " + i);
  }
});
</script>

Messung V0.5
C=95 H=97 G=95

¤ Dauer der Verarbeitung: 0.16 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.