Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quellcode-Bibliothek file_fullscreen-rollback.html

  Sprache: HTML
 

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


 <!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=700764

Verifies that cancelFullScreen() rolls back to have the previous full-screen
element full-screen.

Tests:
* Request full-screen in doc.
* Request full-screen in doc on element not descended from full-screen element.
* Cancel full-screen, FSE should rollback to previous FSE.
* Request full-screen in subdoc.
* Cancel full-screen in subdoc, doc should be full-screen.
* Request full-screen in subdoc.
* Removing FSE should fully-exit full-screen.


-->

<head>
  <title>Test for Bug 700764</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <script src="/tests/SimpleTest/EventUtils.js"></script>
  <script type="application/javascript" src="file_fullscreen-utils.js"></script>
</head>
<body>

<div id="fse">
  <div id="fse-inner">
    <iframe id="subdoc" allowfullscreen srcdoc="<html><body bgcolor='black'></body></html>"></iframe>
  </div>
</div>

<div id="non-fse"></div>

<script type="application/javascript">

/** Test for Bug 700764 */

function ok(condition, msg) {
  opener.ok(condition, "[rollback] " + msg);
  if (!condition) {
    opener.finish();
  }
}

function is(ab, msg) {
  opener.is(ab"[rollback] " + msg);
  if (a != b) {
    opener.finish();
  }
}

function enterFullscreen(element, callback) {
  addFullscreenChangeContinuation("enter", callback);
  element.focus();
  element.requestFullscreen();
}

function revertFullscreen(doc, callback) {
  ok(doc.fullscreenElement != null, "Should only exit fullscreen on a fullscreen doc");
  addFullscreenChangeContinuation("exit", callback, doc);
  doc.exitFullscreen();
}

function e(id) {
  return document.getElementById(id);
}

function requestFullscreen(element) {
  element.focus();
  element.requestFullscreen();
}

function begin() {
  enterFullscreen(e("fse"), change1);
}

function change1() {
  is(document.fullscreenElement, e("fse"), "Body should be FSE");
  // Request full-screen from element not descendent from current FSE.
  enterFullscreen(e("non-fse"), change2);
}

function change2() {
  is(document.fullscreenElement, e("non-fse"), "FSE should be e('non-fse')");
  revertFullscreen(document, change3);
}

function change3() {
  is(document.fullscreenElement, e("fse"), "FSE should rollback to FSE.");
  var iframe = e("subdoc");
  enterFullscreen(iframe.contentDocument.body, change4);
}

function change4() {
  var iframe = e("subdoc");
  is(document.fullscreenElement, iframe"Subdoc container should be FSE.");
  is(iframe.contentDocument.fullscreenElement, iframe.contentDocument.body"Subdoc body should be FSE in subdoc");
  revertFullscreen(document, change5);
}

function change5() {
  is(document.fullscreenElement, e("fse"), "FSE should rollback to FSE.");
  revertFullscreen(document, change6);
}

function change6() {
  is(document.fullscreenElement, null, "Should have left full-screen entirely");
  enterFullscreen(e("fse"), change7);
}

function change7() {
  is(document.fullscreenElement, e("fse"), "FSE should be e('fse')");
  enterFullscreen(e("fse-inner"), change8);
}

function change8() {
  var element = e('fse-inner');
  is(document.fullscreenElement, element, "FSE should be e('fse-inner')");

  // We're breaking out of two levels of fullscreen by removing the
  // fullscreenElement. To make our helper functions work correctly,
  // we set the fullscreenChangeEnters value to 1. This is a hack, but
  // it is a hack that supports the expected behavior.
  setFullscreenChangeEnters(1);
  addFullscreenChangeContinuation("exit", change9);
  info(`Removing FSE should exit fullscreen.`);
  element.remove();
}

function change9() {
  is(document.fullscreenElement, null, "Should have fully exited full-screen mode when removed FSE from doc");
  opener.nextTest();
}

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

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

¤ 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.0.16Bemerkung:  (vorverarbeitet am  2026-08-27) ¤

*Bot Zugriff






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=476070
#Domains=661743