RESOLVED INVALID 60186
Port Mozilla's IndexedDB tests: transaction lifetimes
https://bugs.webkit.org/show_bug.cgi?id=60186
Summary Port Mozilla's IndexedDB tests: transaction lifetimes
Mark Pilgrim (Google)
Reported 2011-05-04 11:02:23 PDT
http://mxr.mozilla.org/mozilla2.0/source/dom/indexedDB/test/test_transaction_lifetimes.html?force=1 This is a port of a test from Mozilla's IndexedDB test suite. It checks that transactions expire upon completion, i.e. that they can not be reused once they are complete. WebKit passes this test.
Attachments
Patch (4.94 KB, patch)
2011-05-04 11:03 PDT, Mark Pilgrim (Google)
no flags
Patch (5.01 KB, patch)
2011-05-18 14:47 PDT, Mark Pilgrim (Google)
no flags
Patch (5.23 KB, patch)
2011-05-20 06:34 PDT, Mark Pilgrim (Google)
levin: review-
Mark Pilgrim (Google)
Comment 1 2011-05-04 11:03:50 PDT
David Grogan
Comment 2 2011-05-04 14:19:32 PDT
Comment on attachment 92284 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=92284&action=review > LayoutTests/storage/indexeddb/mozilla/transaction-lifetimes.html:56 > + transaction = evalAndLog("transaction = db.transaction('foo');"); I think a transaction with nothing to do aborts; could you add an onabort handler with testPassed("empty transaction aborted") or something similar?
Mark Pilgrim (Google)
Comment 3 2011-05-18 07:39:15 PDT
I don't see anything in the spec to back up that assertion. Also, WebKit does not appear to trigger onabort in this test.
David Grogan
Comment 4 2011-05-18 11:52:16 PDT
(In reply to comment #2) > (From update of attachment 92284 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=92284&action=review > > > LayoutTests/storage/indexeddb/mozilla/transaction-lifetimes.html:56 > > + transaction = evalAndLog("transaction = db.transaction('foo');"); > > I think a transaction with nothing to do aborts; could you add an onabort handler with testPassed("empty transaction aborted") or something similar? (In reply to comment #3) > I don't see anything in the spec to back up that assertion. Also, WebKit does not appear to trigger onabort in this test. I was referring to behavior described here: http://trac.webkit.org/browser/trunk/LayoutTests/storage/indexeddb/tutorial.html#L209 If onabort doesn't get called, could you add onabort = unexpectedAbortCalled (or whatever its name is)?
David Grogan
Comment 5 2011-05-18 11:54:13 PDT
Comment on attachment 92284 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=92284&action=review > LayoutTests/storage/indexeddb/mozilla/transaction-lifetimes.html:53 > + evalAndLog("event.target.transaction.oncomplete = checkTransaction;"); What is event.target? db?
Mark Pilgrim (Google)
Comment 6 2011-05-18 14:40:59 PDT
(In reply to comment #3) > I don't see anything in the spec to back up that assertion. Also, WebKit does not appear to trigger onabort in this test. I was wrong on both counts. Updating test as you originally suggested.
Mark Pilgrim (Google)
Comment 7 2011-05-18 14:41:37 PDT
(In reply to comment #5) > (From update of attachment 92284 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=92284&action=review > > > LayoutTests/storage/indexeddb/mozilla/transaction-lifetimes.html:53 > > + evalAndLog("event.target.transaction.oncomplete = checkTransaction;"); > > What is event.target? db? Yes.
Mark Pilgrim (Google)
Comment 8 2011-05-18 14:47:33 PDT
David Grogan
Comment 9 2011-05-19 13:51:44 PDT
Comment on attachment 93985 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=93985&action=review informal r+, pending additional comment about transaction inside setVersion transaction > LayoutTests/storage/indexeddb/mozilla/transaction-lifetimes.html:56 > + transaction = evalAndLog("transaction = db.transaction('foo');"); Sorry, one last request. Can you add a comment that this test might have to be refactored when http://www.w3.org/Bugs/Public/show_bug.cgi?id=11401 is resolved? It seems as though creating a transaction inside a setVersion transaction will be forbidden, based on the latest discussion: http://lists.w3.org/Archives/Public/public-webapps/2011AprJun/0608.html
Mark Pilgrim (Google)
Comment 10 2011-05-20 06:34:11 PDT
Mark Pilgrim (Google)
Comment 11 2011-05-20 06:35:12 PDT
(In reply to comment #10) > Created an attachment (id=94209) [details] > Patch This adds a debug statement linking to the unresolved WG bug.
David Grogan
Comment 12 2011-05-20 13:55:19 PDT
r+ Thanks
David Levin
Comment 13 2011-05-23 10:06:27 PDT
Comment on attachment 94209 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=94209&action=review > LayoutTests/storage/indexeddb/mozilla/transaction-lifetimes.html:1 > +<!DOCTYPE html> Where is the layoutTestController.dumpAsText() call? > LayoutTests/storage/indexeddb/mozilla/transaction-lifetimes.html:6 > + http://creativecommons.org/publicdomain/zero/1.0/ " This license isn't one of the two that is allowed. Perhaps you can ask if this is ok on webkit-dev.
David Levin
Comment 14 2011-05-23 10:07:00 PDT
Comment on attachment 94209 [details] Patch r- pending resolution of my two comments.
Tony Chang
Comment 15 2011-05-23 10:46:00 PDT
Comment on attachment 94209 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=94209&action=review >> LayoutTests/storage/indexeddb/mozilla/transaction-lifetimes.html:6 >> + http://creativecommons.org/publicdomain/zero/1.0/ " > > This license isn't one of the two that is allowed. Perhaps you can ask if this is ok on webkit-dev. It's public domain, so it has no copyright/license (e.g., like sqlite).
Mark Pilgrim (Google)
Comment 16 2011-05-25 18:28:39 PDT
(In reply to comment #13) > (From update of attachment 94209 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=94209&action=review > > > LayoutTests/storage/indexeddb/mozilla/transaction-lifetimes.html:1 > > +<!DOCTYPE html> > > Where is the layoutTestController.dumpAsText() call? None of the other IndexedDB tests (mine or existing ones) have this call. > > > LayoutTests/storage/indexeddb/mozilla/transaction-lifetimes.html:6 > > + http://creativecommons.org/publicdomain/zero/1.0/ " > > This license isn't one of the two that is allowed. Perhaps you can ask if this is ok on webkit-dev. Is Tony's comment sufficient?
Tony Chang
Comment 17 2011-05-26 09:26:40 PDT
Comment on attachment 94209 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=94209&action=review >>> LayoutTests/storage/indexeddb/mozilla/transaction-lifetimes.html:1 >>> +<!DOCTYPE html> >> >> Where is the layoutTestController.dumpAsText() call? > > None of the other IndexedDB tests (mine or existing ones) have this call. It's in js-test-pre.js.
David Grogan
Comment 18 2011-08-25 17:07:32 PDT
Mark, it looks like this patch was forgotten. Can it be committed if Dave Levin is satisfied?
David Levin
Comment 19 2011-09-04 03:59:08 PDT
(In reply to comment #15) > (From update of attachment 94209 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=94209&action=review > > >> LayoutTests/storage/indexeddb/mozilla/transaction-lifetimes.html:6 > >> + http://creativecommons.org/publicdomain/zero/1.0/ " > > > > This license isn't one of the two that is allowed. Perhaps you can ask if this is ok on webkit-dev. > > It's public domain, so it has no copyright/license (e.g., like sqlite). As I suggested, perhaps you can ask on webkit-dev because this doesn't seem complaint to me. When one becomes a committer, one signs a document saying that they will only let in code that is one of those two licenses, It also says: "If a contributed source file does not have any licensing terms attached to it, do not commit it to the repository. Instead, please contact the author to determine what the intended licensing terms are. If you need assistance with this, contact the WebKit team." So this code doesn't seem acceptable. I'll admit that these license issues simply confuse me -- personally I wish it was all simpler -- which is why I mentioned emailing webkit-dev previously for clarification because I believe others there can help clarify this (while I cannot).
Joshua Bell
Comment 20 2012-07-03 15:08:11 PDT
This will be redundant with https://bugs.webkit.org/show_bug.cgi?id=90412 (which also changes the semantics of an empty transaction from aborting to completing, which makes this test invalid)
Note You need to log in before you can comment on or make changes to this bug.