Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/toolkit/content/tests/browser/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 1 kB image not shown  

Quelle  browser_bug1693577.js   Sprache: JAVA

 
/*
 * This test checks that the popupshowing event for input fields, which do not
 * have a dedicated contextmenu event, but use the global one (added by
 * editMenuOverlay.js, see bug 1693577) include a triggerNode.
 *
 * The search-input field of the browser-sidebar is one of the rare cases in
 * mozilla-central, which can be used to test this. There are a few more in
 * comm-central, which need the triggerNode information.
 */


add_task(async function test_search_input_popupshowing() {
  let sidebar = document.getElementById("sidebar");

  let loadPromise = BrowserTestUtils.waitForEvent(sidebar, "load"true);
  SidebarController.toggle("viewBookmarksSidebar");
  await loadPromise;

  let inputField =
    sidebar.contentDocument.getElementById("search-box").inputField;
  const popupshowing = BrowserTestUtils.waitForEvent(
    sidebar.contentWindow,
    "popupshowing"
  );

  EventUtils.synthesizeMouseAtCenter(
    inputField,
    {
      type: "contextmenu",
      button: 2,
    },
    sidebar.contentWindow
  );
  let popupshowingEvent = await popupshowing;

  Assert.equal(
    popupshowingEvent.target.triggerNode?.id,
    "search-box",
    "Popupshowing event for the search input includes triggernode."
  );

  const popup = popupshowingEvent.target;
  await BrowserTestUtils.waitForEvent(popup, "popupshown");

  const popuphidden = BrowserTestUtils.waitForEvent(popup, "popuphidden");
  popup.hidePopup();
  await popuphidden;

  SidebarController.toggle("viewBookmarksSidebar");
});

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

¤ 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.