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

Benutzer

 browser_net_fonts.js   Interaktion und
PortierbarkeitJAVA

 

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


"use strict";

/**
 * Tests if font preview is generated correctly
 */


add_task(async function () {
  const { monitor } = await initNetMonitor(FONTS_URL + "?name=fonts", {
    requestCount: 1,
  });
  info("Starting test... ");

  const { document, store, windowRequire } = monitor.panelWin;
  const Actions = windowRequire("devtools/client/netmonitor/src/actions/index");

  store.dispatch(Actions.batchEnable(false));

  // Reload the page to get the font request
  const waitForRequests = waitForNetworkEvents(monitor, 3);
  await reloadSelectedTab();
  await waitForRequests;

  const wait = waitForDOM(
    document,
    "#response-panel .response-font[src^='data:']"
  );

  const requests = document.querySelectorAll(
    ".request-list-item .requests-list-status"
  );

  // Check first font request
  clickElement(requests[1], monitor);
  clickOnSidebarTab(document, "response");

  await wait;

  ok(true, "Font preview is shown");

  const tabpanel = document.querySelector("#response-panel");
  let image = tabpanel.querySelector(".response-font");

  await waitFor(
    () => image.complete === true && image.naturalWidth > 0,
    "Wait for the font preview to load"
  );

  ok(
    image.complete && image.naturalHeight !== 0,
    "Font preview got generated correctly"
  );

  let fontData = document.querySelectorAll(".tabpanel-summary-value");
  is(fontData[0].textContent, "Ostrich Sans Medium", "Font name is correct");
  // "font/ttf" is returned on Linux, which is the expected MIME type, though
  // "application/octet-stream" is also accepted which is returned on Windows and MacOS.
  ok(
    ["font/ttf", "application/octet-stream"].includes(fontData[1].textContent),
    "MIME type is correct"
  );

  // Check second font request
  clickElement(requests[2], monitor);

  await waitForDOM(document, "#response-panel .response-font[src^='data:']");

  image = tabpanel.querySelector(".response-font");

  await waitFor(
    () => image.complete === true && image.naturalWidth > 0,
    "Wait for the font preview to load"
  );

  ok(
    image.complete && image.naturalHeight !== 0,
    "Font preview got generated correctly"
  );

  fontData = document.querySelectorAll(".tabpanel-summary-value");
  is(fontData[0].textContent, "Ostrich Sans Black", "Font name is correct");
  // Actually expected is "font/ttf", though "application/octet-stream" is
  // ok as well and obviously returned when running the test locally.
  ok(
    ["font/ttf", "application/octet-stream"].includes(fontData[1].textContent),
    "MIME type is correct"
  );

  await teardown(monitor);
});

Messung V0.5 in Prozent
C=91 H=100 G=95

¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.19Angebot  (Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-09-30) ¤

*Eine klare Vorstellung vom Zielzustand






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:

sprechenden Kalenders






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1126864
#Domains=2039723