Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quelle  browser_form_validity_popup_submit.js

  Sprache: JAVA
 

/**
 * Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/publicdomain/zero/1.0/
 */


"use strict";

async function promiseValidityPopupShown() {
  await BrowserTestUtils.waitForEvent(
    window,
    "popupshown",
    /* capture = */ false,
    event => event.target.id == "invalid-form-popup"
  );
  return document.getElementById("invalid-form-popup");
}

const HTML = `
  <form action="">
    <input name="text" type="text" placeholder="type here" autofocus required>
    <input id="submit" type="submit">
  </form>
`;

add_setup(async function () {
  await SpecialPowers.pushPrefEnv({
    set: [["test.wait300msAfterTabSwitch"true]],
  });
});

add_task(async function bug_1790128() {
  await BrowserTestUtils.withNewTab(
    {
      gBrowser,
      url: `data:text/html,${encodeURI(HTML)}`,
    },
    async function (aBrowser) {
      let promisePopupShown = promiseValidityPopupShown();
      await BrowserTestUtils.synthesizeMouseAtCenter("#submit", {}, aBrowser);
      let popup = await promisePopupShown;
      is(popup.state, "open""Should be open");

      let promisePopupHidden = BrowserTestUtils.waitForEvent(
        popup,
        "popuphidden"
      );
      promisePopupShown = promiseValidityPopupShown();

      // This is written in a rather odd style because depending on whether
      // panel animations are enabled we might be able to show the popup again
      // after the first click or not. The point is that after one click the
      // popup should've hid at least once, and after two the popup should've
      // open again at least once.
      await BrowserTestUtils.synthesizeMouseAtCenter("#submit", {}, aBrowser);
      await promisePopupHidden;
      await BrowserTestUtils.synthesizeMouseAtCenter("#submit", {}, aBrowser);
      await promisePopupShown;
      ok(true"Should've shown the popup again");
    }
  );
});

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

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

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