mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-20 07:17:32 +09:00
Issue #1693 - Use scoped enums for IDBTransaction.
Based on a patch from Mozilla bug 1598164. Needed due to identifier collision between NSS and IDBTransaction. Co-authored by: Simon Giesecke <simon.giesecke@gmail.com> Co-authored by: Matt A. Tobin <email@mattatobin.com>
This commit is contained in:
parent
89dd425fd2
commit
c920f32df3
25 changed files with 175 additions and 182 deletions
|
|
@ -55,10 +55,10 @@ function testSteps()
|
|||
|
||||
try {
|
||||
db.transaction("foo").objectStore("foo").clear();
|
||||
ok(false, "clear should throw on READ_ONLY transactions");
|
||||
ok(false, "clear should throw on Mode::ReadOnly transactions");
|
||||
}
|
||||
catch (e) {
|
||||
ok(true, "clear should throw on READ_ONLY transactions");
|
||||
ok(true, "clear should throw on Mode::ReadOnly transactions");
|
||||
}
|
||||
|
||||
request = db.transaction("foo", "readwriteflush")
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ function testSteps()
|
|||
is(db.version, 1, "Database has correct version");
|
||||
|
||||
db.onupgradeneeded = function() {
|
||||
ok(false, "our ongoing VERSION_CHANGE transaction should exclude any others!");
|
||||
ok(false, "our ongoing Mode::VersionChange transaction should exclude any others!");
|
||||
}
|
||||
|
||||
db.createObjectStore("foo");
|
||||
|
|
|
|||
|
|
@ -258,7 +258,7 @@ function testSteps()
|
|||
abortEventCount = 0;
|
||||
let expectedAbortEventCount = 0;
|
||||
|
||||
// During INITIAL
|
||||
// During ReadyState::Initial
|
||||
transaction = db.transaction("foo");
|
||||
transaction.abort();
|
||||
try {
|
||||
|
|
@ -269,7 +269,7 @@ function testSteps()
|
|||
ok(true, "second abort should throw an error");
|
||||
}
|
||||
|
||||
// During LOADING
|
||||
// During ReadyState::Loading
|
||||
transaction = db.transaction("foo");
|
||||
transaction.objectStore("foo").get(1).onerror = abortErrorHandler;
|
||||
expectedAbortEventCount++;
|
||||
|
|
@ -282,7 +282,7 @@ function testSteps()
|
|||
ok(true, "second abort should throw an error");
|
||||
}
|
||||
|
||||
// During LOADING from callback
|
||||
// During ReadyState::Loading from callback
|
||||
transaction = db.transaction("foo");
|
||||
transaction.objectStore("foo").get(1).onsuccess = grabEventAndContinueHandler;
|
||||
event = yield undefined;
|
||||
|
|
@ -297,7 +297,7 @@ function testSteps()
|
|||
ok(true, "second abort should throw an error");
|
||||
}
|
||||
|
||||
// During LOADING from error callback
|
||||
// During ReadyState::Loading from error callback
|
||||
transaction = db.transaction("foo", "readwrite");
|
||||
transaction.objectStore("foo").add({}, 1).onerror = function(event) {
|
||||
event.preventDefault();
|
||||
|
|
@ -327,7 +327,7 @@ function testSteps()
|
|||
};
|
||||
yield undefined;
|
||||
|
||||
// During COMMITTING
|
||||
// During ReadyState::Committing
|
||||
transaction = db.transaction("foo", "readwrite");
|
||||
transaction.objectStore("foo").put({hello: "world"}, 1).onsuccess = function(event) {
|
||||
continueToNextStep();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue