Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/dom/indexedDB/test/unit/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 1 kB image not shown  

Quelle  test_odd_result_order.js   Sprache: JAVA

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


/* exported testGenerator */
var testGenerator = testSteps();

function* testSteps() {
  const data = { key: 5, index: 10 };

  let request = indexedDB.open(
    this.window ? window.location.pathname : "Splendid Test",
    1
  );
  request.onerror = errorHandler;
  request.onupgradeneeded = grabEventAndContinueHandler;
  let event = yield undefined;

  let db = event.target.result;

  ok(db instanceof IDBDatabase, "Got a real database");

  db.onerror = errorHandler;

  let objectStore = db.createObjectStore("foo", {
    keyPath: "key",
    autoIncrement: true,
  });
  objectStore.createIndex("foo""index");

  event.target.onsuccess = continueToNextStep;
  yield undefined;

  objectStore = db.transaction("foo""readwrite").objectStore("foo");
  request = objectStore.add(data);
  request.onsuccess = grabEventAndContinueHandler;
  event = yield undefined;

  let key;
  executeSoon(function () {
    key = request.result;
    continueToNextStep();
  });
  yield undefined;

  is(key, data.key, "Got the right key");

  objectStore = db.transaction("foo").objectStore("foo");
  objectStore.get(data.key).onsuccess = grabEventAndContinueHandler;
  event = yield undefined;

  let obj;
  executeSoon(function () {
    obj = event.target.result;
    continueToNextStep();
  });
  yield undefined;

  is(obj.key, data.key, "Got the right key");
  is(obj.index, data.index, "Got the right property value");

  objectStore = db.transaction("foo""readwrite").objectStore("foo");
  request = objectStore.delete(data.key);
  request.onsuccess = grabEventAndContinueHandler;
  event = yield undefined;

  key = undefined;
  executeSoon(function () {
    key = request.result;
    continueToNextStep();
  }, 0);
  yield undefined;

  ok(key === undefined, "Got the right value");

  finishTest();
}

Messung V0.5
C=97 H=92 G=94

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