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


Quelle  browser_pocket_panel.js   Sprache: JAVA

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

"use strict";

add_task(async function () {
  let tab = await BrowserTestUtils.openNewForegroundTab(
    gBrowser,
    "https://example.com/browser/browser/components/pocket/test/test.html"
  );

  info("clicking on pocket button in toolbar");
  let pocketButton = document.getElementById("save-to-pocket-button");
  // The panel is created on the fly, so we can't simply wait for focus
  // inside it.
  let pocketPanelShowing = BrowserTestUtils.waitForEvent(
    document,
    "popupshowing",
    true
  );
  pocketButton.click();
  await pocketPanelShowing;

  checkElements(true, ["customizationui-widget-panel"]);
  let pocketPanel = document.getElementById("customizationui-widget-panel");
  is(pocketPanel.state, "showing""pocket panel is showing");

  info("Trigger context menu in a pocket panel element");
  let contextMenu = document.getElementById("contentAreaContextMenu");
  is(contextMenu.state, "closed""context menu popup is closed");
  let popupShown = BrowserTestUtils.waitForEvent(contextMenu, "popupshown");
  let popupHidden = BrowserTestUtils.waitForEvent(contextMenu, "popuphidden");

  let pocketFrame = pocketPanel.querySelector("browser");

  const getReadyState = async frame =>
    SpecialPowers.spawn(frame, [], () => content.document.readyState);

  // Ensure Pocket panel is ready to avoid intermittency.
  await TestUtils.waitForCondition(
    async () => (await getReadyState(pocketFrame)) == "complete"
  );

  // Ensure that the document layout has been flushed before triggering the mouse event
  // (See Bug 1519808 for a rationale).
  await pocketFrame.ownerGlobal.promiseDocumentFlushed(() => {});
  await BrowserTestUtils.synthesizeMouseAtCenter(
    "body",
    {
      type: "contextmenu",
      button: 2,
    },
    pocketFrame
  );

  await popupShown;
  is(contextMenu.state, "open""context menu popup is open");
  const emeLearnMoreContextItem = contextMenu.querySelector(
    "#context-media-eme-learnmore"
  );
  ok(
    BrowserTestUtils.isHidden(emeLearnMoreContextItem),
    "Unrelated context menu items should be hidden"
  );

  contextMenu.hidePopup();
  await popupHidden;

  info("closing pocket panel");
  let pocketPanelHidden = BrowserTestUtils.waitForEvent(
    pocketPanel,
    "popuphidden"
  );
  pocketPanel.hidePopup();
  await pocketPanelHidden;
  checkElements(false, ["customizationui-widget-panel"]);

  BrowserTestUtils.removeTab(tab);
});

Messung V0.5
C=92 H=100 G=95

¤ 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