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


Quelle  file_fullscreen-single.html   Sprache: HTML

 
 products/sources/formale Sprachen/C/Firefox/dom/base/test/fullscreen/file_fullscreen-single.html


<!DOCTYPE HTML>
<html>
<!--

Open one window, focus it and enter fullscreen, then exit fullscreen.

-->

<head>
  <title>Simple Fullscreen Enter and Exit Test</title>
  <script src="/tests/SimpleTest/EventUtils.js"></script>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <script type="application/javascript" src="file_fullscreen-utils.js"></script>
</head>
<body>

<div id="fullscreen-div"><p>Fullscreen div</p></div>

<script type="application/javascript">

function ok(condition, msg) {
  opener.ok(condition, "[single] " + msg);
}

function is(value, expected, msg) {
  opener.is(value, expected, "[single] " + msg);
}

function isnot(value, unexpected, msg) {
  opener.isnot(value, unexpected, "[single] " + msg);
}

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

function windowResized() {
  info(`Window resized to width: ${window.innerWidth}, height: ${window.innerHeight}.`);
}

async function begin() {
  window.addEventListener('resize', windowResized);

  info(`Starting window width: ${window.innerWidth}, height: ${window.innerHeight}.`);
  let windowedWidth = window.innerWidth;
  let windowedHeight = window.innerHeight;

  info("Requesting fullscreen.");
  let entryPromise = document.getElementById('fullscreen-div').requestFullscreen()
  info("Fullscreen requested, waiting for promise to resolve.");

  await entryPromise;

  info("element.requestFullscreen() promise resolved.");
  info(`Fullscreen window width: ${window.innerWidth}, height: ${window.innerHeight}.`);
  isnot(document.fullscreenElement, null, "document.fullscreenElement should exist.");
  ok(window.fullScreen, "window.fullScreen");
  isnot(windowedWidth, window.innerWidth, "window width should be changed.");
  isnot(windowedHeight, window.innerHeight, "window height should be changed.");

  info("Requesting fullscreen exit.");
  let exitPromise = document.exitFullscreen()
  info("Fullscreen exit requested, waiting for promise to resolve.");

  await exitPromise;

  info("document.exitFullscreen() promise resolved.");
  info(`Restored window width: ${window.innerWidth}, height: ${window.innerHeight}.`);
  is(document.fullscreenElement, null, "document.fullscreenElement should be null.");
  ok(!window.fullScreen, "window.fullScreen should be false.");
  is(window.innerWidth, windowedWidth, "window width should be restored.");
  is(window.innerHeight, windowedHeight, "window height should be restored.");
  opener.nextTest();
}

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

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

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