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


Quelle  browser_post_auth.js   Sprache: JAVA

 
"use strict";

const { PromptTestUtils } = ChromeUtils.importESModule(
  "resource://testing-common/PromptTestUtils.sys.mjs"
);

const FOLDER = getRootDirectory(gTestPath).replace(
  "chrome://mochitests/content/",
  "http://mochi.test:8888/"
);

add_task(async function () {
  let tab = await BrowserTestUtils.openNewForegroundTab(
    gBrowser,
    "about:blank"
  );
  let browserLoadedPromise = BrowserTestUtils.browserLoaded(
    tab.linkedBrowser,
    true,
    `${FOLDER}post.html`
  );
  BrowserTestUtils.startLoadingURIString(
    tab.linkedBrowser,
    `${FOLDER}post.html`
  );
  await browserLoadedPromise;

  let finalLoadPromise = BrowserTestUtils.browserLoaded(
    tab.linkedBrowser,
    true,
    `${FOLDER}auth_post.sjs`
  );

  await SpecialPowers.spawn(tab.linkedBrowser, [], async function () {
    let file = new content.File(
      [new content.Blob(["1234".repeat(1024 * 500)], { type: "text/plain" })],
      "test-name"
    );
    content.document.getElementById("input_file").mozSetFileArray([file]);
    content.document.getElementById("form").submit();
  });

  let promptPromise = PromptTestUtils.handleNextPrompt(
    tab.linkedBrowser,
    {
      modalType: Ci.nsIPrompt.MODAL_TYPE_TAB,
      promptType: "promptUserAndPass",
    },
    { buttonNumClick: 0, loginInput: "user", passwordInput: "pass" }
  );

  await promptPromise;

  await finalLoadPromise;

  await SpecialPowers.spawn(tab.linkedBrowser, [], async function () {
    Assert.ok(content.location.href.includes("auth_post.sjs"));
    Assert.ok(content.document.body.innerHTML.includes("1234"));
  });

  BrowserTestUtils.removeTab(tab);

  // Clean up any active logins we added during the test.
  Services.obs.notifyObservers(null"net:clear-active-logins");
});

Messung V0.5
C=94 H=100 G=96

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