Eine aufbereitete Darstellung der Quelle

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

einige Melodien

Quelle  file_fullscreen-backdrop.html

  Sprache: HTML
 

 products/Sources/formale Sprachen/C/Firefox/dom/base/test/fullscreen/file_fullscreen-backdrop.html


<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Test for Bug 1064843</title>
  <style id="style"></style>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <script src="/tests/SimpleTest/EventUtils.js"></script>
  <script src="/tests/SimpleTest/WindowSnapshot.js"></script>
  <script type="text/javascript" src="file_fullscreen-utils.js"></script>
  <style>
    html {
      overflow: hidden;
    }
    #placeholder {
      height: 1000vh;
    }
  </style>
</head>
<body>
<div id="fullscreen"></div>
<div id="placeholder"></div>
<script>

const gStyle = document.getElementById("style");
const gFullscreen = document.getElementById("fullscreen");

function is(ab, msg) {
  opener.is(ab"[backdrop] " + msg);
}

function isnot(ab, msg) {
  opener.isnot(ab"[backdrop] " + msg);
}

function ok(cond, msg) {
  opener.ok(cond, "[backdrop] " + msg);
}

function info(msg) {
  opener.info("[backdrop] " + msg);
}

function synthesizeMouseAtWindowCenter() {
  synthesizeMouseAtPoint(innerWidth / 2, innerHeight / 2, {});
}

const gFullscreenElementBackground = getComputedStyle(gFullscreen).background;

function begin() {
  info("The default background of window should be white");
  assertWindowPureColor(window, "white");
  addFullscreenChangeContinuation("enter", enterFullscreen);
  gFullscreen.requestFullscreen();
}

function setBackdropStyle(style) {
  gStyle.textContent = `#fullscreen::backdrop { ${style} }`;
}

function enterFullscreen() {
  is(getComputedStyle(gFullscreen).background, gFullscreenElementBackground,
     "Computed background of #fullscreen shouldn't be changed");

  info("The default background of backdrop for fullscreen is black");
  assertWindowPureColor(window, "black");

  setBackdropStyle("background: green");
  info("The background color of backdrop should be changed to green");
  assertWindowPureColor(window, "green");

  gFullscreen.style.background = "blue";
  info("The blue fullscreen element should cover the backdrop");
  assertWindowPureColor(window, "blue");

  gFullscreen.style.background = "";
  setBackdropStyle("display: none");
  info("The white body should be shown when the backdrop is hidden");
  assertWindowPureColor(window, "white");

  setBackdropStyle("");
  info("Content should return to black because we restore the backdrop");
  assertWindowPureColor(window, "black");

  gFullscreen.style.display = "none";
  info("The backdrop should disappear with the fullscreen element");
  assertWindowPureColor(window, "white");

  gFullscreen.style.display = "";
  setBackdropStyle("position: absolute");
  info("Changing position shouldn't immediately affect the view");
  assertWindowPureColor(window, "black");

  window.scroll(0, screen.height);
  info("Scrolled up the absolutely-positioned element");
  assertWindowPureColor(window, "white");

  addFullscreenChangeContinuation("exit", exitFullscreen);
  document.exitFullscreen();
}

function exitFullscreen() {
  opener.nextTest();
}
</script>
</body>
</html>

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

¤ Dauer der Verarbeitung: 0.26 Sekunden  (vorverarbeitet am  2026-08-27) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Diese beiden folgenden Angebotsgruppen bietet das Unternehmen

Angebot

Hier finden Sie eine Liste der Produkte des Unternehmens






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=476070
#Domains=661743