Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/toolkit/crashreporter/test/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_bug471404.js   Sprache: JAVA

 
function check_clear_visible(browser, aVisible) {
  return SpecialPowers.spawn(browser, [aVisible], function (aVisible) {
    const doc = content.document;
    let visible = false;
    const reportListSubmitted = doc.getElementById("reportListSubmitted");
    if (reportListSubmitted) {
      const style = doc.defaultView.getComputedStyle(reportListSubmitted);
      if (style.display !== "none" && style.visibility === "visible") {
        visible = true;
      }
    }
    Assert.equal(
      visible,
      aVisible,
      "clear submitted reports button is " + (aVisible ? "visible" : "hidden")
    );
  });
}

// each test here has a setup (run before loading about:crashes) and onload (run after about:crashes loads)
var _tests = [
  {
    setup: null,
    onload(browser) {
      return check_clear_visible(browser, false);
    },
  },
  {
    setup(crD) {
      return add_fake_crashes(crD, 1);
    },
    onload(browser) {
      return check_clear_visible(browser, true);
    },
  },
];

add_task(async function test() {
  let appD = make_fake_appdir();
  let crD = appD.clone();
  crD.append("Crash Reports");

  await BrowserTestUtils.withNewTab(
    { gBrowser, url: "about:blank" },
    async function (browser) {
      for (let test of _tests) {
        // Run setup before loading about:crashes.
        if (test.setup) {
          await test.setup(crD);
        }

        BrowserTestUtils.startLoadingURIString(browser, "about:crashes");
        await BrowserTestUtils.browserLoaded(browser).then(() =>
          test.onload(browser)
        );
      }
    }
  );

  cleanup_fake_appdir();
});

Messung V0.5
C=97 H=91 G=93

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