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

Quelle  browser_bug1572798.js

  Sprache: JAVA
 

add_task(async function test_bug_1572798() {
  let tab = BrowserTestUtils.addTab(window.gBrowser, "about:blank");
  await BrowserTestUtils.browserLoaded(tab.linkedBrowser, {
    wantLoad: "about:blank",
  });
  BrowserTestUtils.startLoadingURIString(
    tab.linkedBrowser,
    "https://example.com/browser/toolkit/content/tests/browser/file_document_open_audio.html"
  );
  await BrowserTestUtils.browserLoaded(tab.linkedBrowser);
  let windowLoaded = BrowserTestUtils.waitForNewWindow();
  info("- clicking button to spawn a new window -");
  await SpecialPowers.spawn(tab.linkedBrowser, [], function () {
    content.document.querySelector("button").click();
  });
  info("- waiting for the new window -");
  let newWin = await windowLoaded;
  info("- checking that the new window plays the audio -");
  let documentOpenedBrowser = newWin.gBrowser.selectedBrowser;
  await SpecialPowers.spawn(documentOpenedBrowser, [], async function () {
    try {
      await content.document.querySelector("audio").play();
      ok(true"Could play the audio");
    } catch (e) {
      ok(false"Rejected audio promise" + e);
    }
  });

  info("- Cleaning up -");
  await BrowserTestUtils.closeWindow(newWin);
  await BrowserTestUtils.removeTab(tab);
});

Messung V0.5 in Prozent
C=89 H=96 G=92

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© 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.