RESOLVED FIXED80664
IndexedDB layout tests: factor out prefix-handling-code
https://bugs.webkit.org/show_bug.cgi?id=80664
Summary IndexedDB layout tests: factor out prefix-handling-code
David Grogan
Reported 2012-03-08 18:28:39 PST
IndexedDB layout test refactor: factor prefix-handling-code
Attachments
Patch (129.42 KB, patch)
2012-03-08 18:29 PST, David Grogan
no flags
Patch (379.15 KB, patch)
2012-03-12 16:03 PDT, David Grogan
no flags
Patch (379.38 KB, patch)
2012-03-12 16:17 PDT, David Grogan
no flags
Patch (377.19 KB, patch)
2012-03-12 16:29 PDT, David Grogan
no flags
Patch (376.87 KB, patch)
2012-03-12 17:30 PDT, David Grogan
no flags
Patch (405.12 KB, patch)
2012-03-13 13:21 PDT, David Grogan
no flags
David Grogan
Comment 1 2012-03-08 18:29:18 PST
David Grogan
Comment 2 2012-03-12 16:03:08 PDT
David Grogan
Comment 3 2012-03-12 16:17:07 PDT
David Grogan
Comment 4 2012-03-12 16:29:49 PDT
David Grogan
Comment 5 2012-03-12 17:30:13 PDT
David Grogan
Comment 6 2012-03-12 17:38:20 PDT
Josh, could you look at this? The prefix lines were moved to a function, dealWithPrefixes, in shared.js that each test now calls. With apologies to any non-googlers who might be reading this, it might be easier to look at the expectation changes here: http://emmy/chrome/layout-test-results/results.html
Joshua Bell
Comment 7 2012-03-13 12:28:37 PDT
Comment on attachment 131467 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=131467&action=review > LayoutTests/ChangeLog:15 > + * storage/indexeddb/basics-workers-expected.txt: Was basics-shared-workers-expected.txt missed? > LayoutTests/ChangeLog:54 > + * storage/indexeddb/database-quota.html: Looks like database-quota-expected.txt wasn't updated? > LayoutTests/storage/indexeddb/resources/shared.js:27 > +function dealWithPrefixes() I'm not thrilled with the name... how about "removeVendorPrefixes" ? > LayoutTests/storage/indexeddb/resources/shared.js:41 > + shouldBeFalse("indexedDB == null"); Some of the tests had shouldBeFalse("IDBTransaction == null") removed; maybe add shouldBeTrue("Boolean(indexedDB && IDBCursor && IDBDatabase && ...)"); ?
David Grogan
Comment 8 2012-03-13 13:21:34 PDT
David Grogan
Comment 9 2012-03-13 13:29:52 PDT
(In reply to comment #7) > (From update of attachment 131467 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=131467&action=review > > > LayoutTests/ChangeLog:15 > > + * storage/indexeddb/basics-workers-expected.txt: > > Was basics-shared-workers-expected.txt missed? > > > LayoutTests/ChangeLog:54 > > + * storage/indexeddb/database-quota.html: > > Looks like database-quota-expected.txt wasn't updated? Ah yes, these two were missed because new-run-webkit-tests doesn't run them. Updated. > > > LayoutTests/storage/indexeddb/resources/shared.js:27 > > +function dealWithPrefixes() > > I'm not thrilled with the name... how about "removeVendorPrefixes" ? Thanks, I meant to revisit that. removeVendorPrefixes works. > > > LayoutTests/storage/indexeddb/resources/shared.js:41 > > + shouldBeFalse("indexedDB == null"); > > Some of the tests had shouldBeFalse("IDBTransaction == null") removed; maybe add shouldBeTrue("Boolean(indexedDB && IDBCursor && IDBDatabase && ...)"); ? Changed. But why does the single Boolean function call work? I expected to have to add that function call to each object that was incompatible with &&. It's as if && accepts more types if it knows it's going to be passed to Boolean. What's going on here that I'm misunderstanding?
Joshua Bell
Comment 10 2012-03-13 16:55:14 PDT
(In reply to comment #9) > > > > Some of the tests had shouldBeFalse("IDBTransaction == null") removed; maybe add shouldBeTrue("Boolean(indexedDB && IDBCursor && IDBDatabase && ...)"); ? > > Changed. > > But why does the single Boolean function call work? I expected to have to add that function call to each object that was incompatible with &&. It's as if && accepts more types if it knows it's going to be passed to Boolean. What's going on here that I'm misunderstanding? (x && y) will return x (if x is falsy) or y. It doesn't coerce the result to an actual boolean like the comparison operators do. The Boolean(expr) is just so that what pops out is actually a JS boolean value (true or false), rather than just the last item in the (a && b && c) chain. Boolean(expr) does the same thing as !!expr. !!(a && b && c ...) would work just as well.
David Grogan
Comment 11 2012-03-13 17:14:15 PDT
(In reply to comment #10) > (In reply to comment #9) Thanks for the explanation, I get it now. Do you have any more comments on this patch or should I send it off to tony?
Joshua Bell
Comment 12 2012-03-13 17:15:54 PDT
(In reply to comment #11) > (In reply to comment #10) > > (In reply to comment #9) > Thanks for the explanation, I get it now. > > Do you have any more comments on this patch or should I send it off to tony? Nope, lgtm!
David Grogan
Comment 13 2012-03-13 17:45:58 PDT
Tony, could you review this? Sorry about the huge patch size. I looked at every new baseline.
Tony Chang
Comment 14 2012-03-14 12:01:38 PDT
Comment on attachment 131701 [details] Patch rs=me
WebKit Review Bot
Comment 15 2012-03-14 14:21:25 PDT
Comment on attachment 131701 [details] Patch Clearing flags on attachment: 131701 Committed r110750: <http://trac.webkit.org/changeset/110750>
WebKit Review Bot
Comment 16 2012-03-14 14:21:31 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.