Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/testing/web-platform/tests/content-index/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 1 kB image not shown  

Quelle  resources.js   Sprache: JAVA

 
'use strict';

const swUrl = 'resources/sw.js';
const scope = 'resources/';

async function expectTypeError(promise) {
  try {
    await promise;
    assert_unreached('Promise should have rejected');
  } catch (e) {
    assert_equals(e.name, 'TypeError');
  }
}

function createDescription({id = 'id', title = 'title', description = 'description',
                            category = 'homepage', iconUrl = '/images/green-256x256.png',
                            url = scope, includeIcons = true}) {
  return {id, title, description, category, icons: includeIcons ? [{src: iconUrl}] : [], url};
}

// Creates a Promise test for |func| given the |description|. The |func| will be
// executed with the `index` object of an activated Service Worker Registration.
function contentIndexTest(func, description) {
  promise_test(async t => {
    const registration = await service_worker_unregister_and_register(t, swUrl, scope);
    await wait_for_state(t, registration.installing, 'activated');
    return func(t, registration.index);
  }, description);
}

async function waitForMessageFromServiceWorker() {
  return await new Promise(resolve => {
    const listener = event => {
      navigator.serviceWorker.removeEventListener('message', listener);
      resolve(event.data);
    };

    navigator.serviceWorker.addEventListener('message', listener);
  });
}

// Returns a promise if the chromium based browser fetches icons for
// content-index.
async function fetchesIconsChromium() {
  const {fetchesIcons} =
      await import('/resources/chromium/content-index-helpers.js');
  return fetchesIcons();
}

// Returns a promise if the browser fetches icons for content-index and should
// therefore validate them.
async function fetchesIcons() {
  if (isChromiumBased) {
    return fetchesIconsChromium();
  }
  return false;
}

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

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

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