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


Quelle  browser_test_fullscreen_size.js   Sprache: JAVA

 
/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set sts=2 sw=2 et tw=80: */
"use strict";

function waitForReflow(aWindow) {
  return new Promise(resolve => {
    aWindow.requestAnimationFrame(() => {
      aWindow.requestAnimationFrame(resolve);
    });
  });
}

add_task(async function fullscreen_size() {
  let win = await BrowserTestUtils.openNewBrowserWindow({});
  win.gBrowser.selectedBrowser.focus();

  info("Enter browser fullscreen mode");
  let promise = Promise.all([
    BrowserTestUtils.waitForEvent(win, "fullscreen"),
    BrowserTestUtils.waitForEvent(win, "resize"),
  ]);
  win.fullScreen = true;
  await promise;

  info("Await reflow of the chrome window");
  await waitForReflow(win);

  is(win.innerHeight, win.outerHeight, "Check height");
  is(win.innerWidth, win.outerWidth, "Check width");

  await BrowserTestUtils.closeWindow(win);
});

// https://bugzilla.mozilla.org/show_bug.cgi?id=1830721
add_task(async function fullscreen_size_moz_appearance() {
  const win = await BrowserTestUtils.openNewBrowserWindow({});
  win.gBrowser.selectedBrowser.focus();

  info("Add -moz-appearance style to chrome document");
  const style = win.document.createElement("style");
  style.innerHTML = `
    #main-window {
      -moz-appearance: button;
    }
  `;
  win.document.head.appendChild(style);

  info("Await reflow of the chrome window");
  await waitForReflow(win);

  info("Enter browser fullscreen mode");
  let promise = Promise.all([
    BrowserTestUtils.waitForEvent(win, "fullscreen"),
    BrowserTestUtils.waitForEvent(win, "resize"),
  ]);
  win.fullScreen = true;
  await promise;

  info("Await reflow of the chrome window");
  await waitForReflow(win);

  is(win.innerHeight, win.outerHeight, "Check height");
  is(win.innerWidth, win.outerWidth, `Check width`);

  await BrowserTestUtils.closeWindow(win);
});

Messung V0.5
C=96 H=98 G=96

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