Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/dom/tests/mochitest/general/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 1 kB image not shown  

Quelle  test_resizeby.html

  Sprache: HTML
 

 products/Sources/formale Sprachen/C/Firefox/dom/tests/mochitest/general/test_resizeby.html


<!DOCTYPE HTML>
<html>
<head>
  <title>Test for Bug 1369627</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <script src="/tests/SimpleTest/EventUtils.js"></script>


  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1369627">Mozilla Bug 1369627</a>
<p id="display"></p>
<div id="content">
</div>
<pre id="test">
</pre>

<script>
  /** Test for Bug 1369627 */
  add_task(async function resizeby() {
    await SimpleTest.promiseFocus();

    const popup = window.open("about:blank""_blank""width=500,height=500");

    is(popup.document.location.href, "about:blank");
    is(popup.document.readyState, "complete");

    // This fails flakily, see bug 1974454
    is(popup.innerHeight, 500"starting height is 500");
    is(popup.innerWidth, 500"starting width in 500");

    // When this test was written, it said that resizeBy can occur sync without a resize event.
    // Since bug 543435, window.open can fire a resize event.
    // So there can be up to two resize, we only care for the correct innerWidth.
    const resizeByDone = new Promise(resolve => {
      const checkResized = () => {
        info(`Checking target width: ${popup.innerWidth} vs ${550}`);
        if (popup.innerWidth == 550) {
          popup.removeEventListener("resize", checkResized);
          resolve();
        }
      }
      popup.addEventListener("resize", checkResized);
      checkResized();
    });

    popup.resizeBy(500);

    await resizeByDone;

    is(popup.innerHeight, 500"ending height is 500");
    is(popup.innerWidth, 550"ending width is 550");

    popup.close();
  });
</script>
</body>
</html>

Messung V0.5 in Prozent
C=99 H=98 G=98

¤ Dauer der Verarbeitung: 0.22 Sekunden  (vorverarbeitet am  2026-08-25) ¤

*© Formatika GbR, Deutschland






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.