From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- .../test/unit/GlobalObjectsModule.sys.mjs | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 dom/indexedDB/test/unit/GlobalObjectsModule.sys.mjs (limited to 'dom/indexedDB/test/unit/GlobalObjectsModule.sys.mjs') diff --git a/dom/indexedDB/test/unit/GlobalObjectsModule.sys.mjs b/dom/indexedDB/test/unit/GlobalObjectsModule.sys.mjs new file mode 100644 index 0000000000..c8bb420b3d --- /dev/null +++ b/dom/indexedDB/test/unit/GlobalObjectsModule.sys.mjs @@ -0,0 +1,29 @@ +/** + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ + */ + +export function GlobalObjectsModule() {} + +GlobalObjectsModule.prototype = { + runTest() { + const name = "Splendid Test"; + + let ok = this.ok; + let finishTest = this.finishTest; + + let keyRange = IDBKeyRange.only(42); + ok(keyRange, "Got keyRange"); + + let request = indexedDB.open(name, 1); + request.onerror = function (event) { + ok(false, "indexedDB error, '" + event.target.error.name + "'"); + finishTest(); + }; + request.onsuccess = function (event) { + let db = event.target.result; + ok(db, "Got database"); + finishTest(); + }; + }, +}; -- cgit v1.2.3