products/Sources/formale Sprachen/JAVA/Netbeans/ide/editor.macros/   (Firefox Browser Version 153.0.1©)  Datei vom 3.10.2025 mit Größe 304 B image not shown  

 test_locks.js   Interaktion und
PortierbarkeitJAVA

 

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


"use strict";

/**
 * Tests that privileged scopes can access Web Locks and use them without
 * being associated with a content global.
 */

add_task(async function test_locks() {
  Assert.ok(locks, "The locks global was imported.");
  let { promise: firstPromise, resolve: firstResolve } =
    Promise.withResolvers();

  const LOCK_NAME = "Some lock";

  await locks.request(LOCK_NAME, async lock => {
    Assert.ok(lock, "Got the lock");

    let { held: heldLocks } = await locks.query();
    Assert.equal(heldLocks.length, 1, "Should only be 1 held lock");
    Assert.equal(heldLocks[0].name, LOCK_NAME, "Got the right lock name");
    Assert.equal(heldLocks[0].clientId, "", "Got an empty client ID");

    firstResolve();
  });
  await firstPromise;
});

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

¤ sprechenden Kalenders0.13Angebot  (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:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.