diff options
author | Moonchild <moonchild@palemoon.org> | 2021-02-25 01:03:57 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2021-02-25 01:03:57 +0000 |
commit | ceadffab6b357723981a429e11222daf6cd6dcfb (patch) | |
tree | 5603053048d6a460f79b22bdf165fb74d32d39b0 /testing/web-platform/tests/IndexedDB/transaction-create_in_versionchange.htm | |
parent | 14fb2f966e9b54598c451e3cb35b4aa0480dafed (diff) | |
parent | ad5a13bd501e379517da1a944c104a11d951a3f5 (diff) | |
download | UXP-RC_20210225.tar UXP-RC_20210225.tar.gz UXP-RC_20210225.tar.lz UXP-RC_20210225.tar.xz UXP-RC_20210225.zip |
Merge branch 'master' into releaseRC_20210225
Diffstat (limited to 'testing/web-platform/tests/IndexedDB/transaction-create_in_versionchange.htm')
-rw-r--r-- | testing/web-platform/tests/IndexedDB/transaction-create_in_versionchange.htm | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/testing/web-platform/tests/IndexedDB/transaction-create_in_versionchange.htm b/testing/web-platform/tests/IndexedDB/transaction-create_in_versionchange.htm deleted file mode 100644 index 4d98c0004..000000000 --- a/testing/web-platform/tests/IndexedDB/transaction-create_in_versionchange.htm +++ /dev/null @@ -1,82 +0,0 @@ -<!DOCTYPE html> -<meta charset=utf-8> -<title>Attempt to create new transactions inside a versionchange transaction</title> -<link rel="author" href="mailto:odinho@opera.com" title="Odin Hørthe Omdal"> -<script src=/resources/testharness.js></script> -<script src=/resources/testharnessreport.js></script> -<script src=support.js></script> - -<script> - var db, events = [], - open_rq = createdb(async_test()) - - open_rq.onupgradeneeded = function(e) { - db = e.target.result - - db.createObjectStore("store") - .add("versionchange1", 1) - .addEventListener("success", log("versionchange_add.success")) - - assert_throws('InvalidStateError', function() { db.transaction("store") }) - - e.target.transaction - .objectStore("store") - .count(2) - .addEventListener("success", log("versionchange_count.success")) - - assert_throws('InvalidStateError', function() { db.transaction("store", "readwrite") }) - - open_rq.transaction - .objectStore("store") - .add("versionchange2", 2) - .addEventListener("success", log("versionchange_add2.success")) - - open_rq.transaction.oncomplete = function(e) { - log("versionchange_txn.complete")(e) - - db.transaction("store") - .objectStore("store") - .count() - .addEventListener("success", log("complete_count.success")) - } - } - - open_rq.onsuccess = function(e) { - log("open_rq.success")(e) - - var txn = db.transaction("store", "readwrite") - txn.objectStore("store") - .put("woo", 1) - .addEventListener("success", log("complete2_get.success")) - - txn.oncomplete = this.step_func(function(e) { - assert_array_equals(events, [ - "versionchange_add.success: 1", - "versionchange_count.success: 0", - "versionchange_add2.success: 2", - "versionchange_txn.complete", - - "open_rq.success: [object IDBDatabase]", - - "complete_count.success: 2", - "complete2_get.success: 1", - ], - "events") - this.done() - }) - } - - - function log(msg) { - return function(e) { - if(e && e.target && e.target.error) - events.push(msg + ": " + e.target.error.name) - else if(e && e.target && e.target.result !== undefined) - events.push(msg + ": " + e.target.result) - else - events.push(msg) - }; - } -</script> - -<div id=log></div> |