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

Quelle  browser_bug462673.js   Sprache: JAVA

 
add_task(async function () {
  var win = openDialog(
    AppConstants.BROWSER_CHROME_URL,
    "_blank",
    "chrome,all,dialog=no"
  );
  await SimpleTest.promiseFocus(win);

  let tab = win.gBrowser.tabs[0];
  await promiseTabLoadEvent(
    tab,
    getRootDirectory(gTestPath) + "test_bug462673.html"
  );

  is(
    win.gBrowser.browsers.length,
    2,
    "test_bug462673.html has opened a second tab"
  );
  is(
    win.gBrowser.selectedTab,
    tab.nextElementSibling,
    "dependent tab is selected"
  );
  win.gBrowser.removeTab(tab);

  // Closing a tab will also close its parent chrome window, but async
  await BrowserTestUtils.domWindowClosed(win);
});

add_task(async function () {
  var win = openDialog(
    AppConstants.BROWSER_CHROME_URL,
    "_blank",
    "chrome,all,dialog=no"
  );
  await SimpleTest.promiseFocus(win);

  let tab = win.gBrowser.tabs[0];
  await promiseTabLoadEvent(
    tab,
    getRootDirectory(gTestPath) + "test_bug462673.html"
  );

  var newTab = BrowserTestUtils.addTab(win.gBrowser);
  var newBrowser = newTab.linkedBrowser;
  win.gBrowser.removeTab(tab);
  ok(!win.closed, "Window stays open");
  if (!win.closed) {
    is(win.gBrowser.tabs.length, 1, "Window has one tab");
    is(win.gBrowser.browsers.length, 1, "Window has one browser");
    is(win.gBrowser.selectedTab, newTab, "Remaining tab is selected");
    is(
      win.gBrowser.selectedBrowser,
      newBrowser,
      "Browser for remaining tab is selected"
    );
    is(
      win.gBrowser.tabbox.selectedPanel,
      newBrowser.parentNode.parentNode.parentNode,
      "Panel for remaining tab is selected"
    );
  }

  await promiseWindowClosed(win);
});

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

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