RESOLVED FIXED 97051
IndexedDB: Rewrite confusing call sequence layout tests
https://bugs.webkit.org/show_bug.cgi?id=97051
Summary IndexedDB: Rewrite confusing call sequence layout tests
Joshua Bell
Reported 2012-09-18 16:07:32 PDT
IndexedDB: Rewrite confusing call sequence layout tests
Attachments
Patch (6.60 KB, patch)
2012-09-18 16:07 PDT, Joshua Bell
no flags
Patch (54.79 KB, patch)
2012-09-19 14:07 PDT, Joshua Bell
no flags
Joshua Bell
Comment 1 2012-09-18 16:07:50 PDT
Joshua Bell
Comment 2 2012-09-18 16:14:16 PDT
This is a work in progress - I want to go through and rewrite two of the layout tests that push IDB through a series of states. The tests (which I wrote when I was a n00b!) are written in a fairly confusing style using a wrapper object around the IDB API. This makes them difficult to maintain and understand. I plan to leave the intent of the tests intact and ensure that the tests still push IDB through the same set of states (opening/closing/versioning/deleting) databases, but with simpler, more "idiomatic" code, and eventually break them out into separate files. The two tests are: factory-deletedatabase-interactions.html open-close-version.html I've tackled the first sub-test of open-close-version.html, attached. The output differs by tweaking the database name (a change), using evalAndLog() for API calls (more spammy), adding assertions about sequence (the ++state thingy), and removing the summary "concate the states together and make sure the strings match" which was confusing and redundant. If this looks acceptable I'll do the rest to the other sub-tests, land, then do a clean-up pass removing a lot of the extraneous debug() calls, land, then finally split the tests up into separate files.
Joshua Bell
Comment 3 2012-09-19 14:07:13 PDT
Joshua Bell
Comment 4 2012-09-19 14:32:19 PDT
The latest patch goes ahead and converts all of those tests over. The *-expected.txt diffs are minimized to show that the tests themselves are doing the same thing as previously. Once this has landed I'll split them into separate files, update the output, and eliminate some of the nested functions to make them easier to read.
Joshua Bell
Comment 5 2012-09-19 14:32:33 PDT
dgrogan@, alecflett@ - please take a look
Alec Flett
Comment 6 2012-09-19 15:18:19 PDT
lgtm
Joshua Bell
Comment 7 2012-09-19 16:39:31 PDT
tony@ - test only changes - r? cq?
WebKit Review Bot
Comment 8 2012-09-20 10:59:58 PDT
Comment on attachment 164774 [details] Patch Clearing flags on attachment: 164774 Committed r129142: <http://trac.webkit.org/changeset/129142>
WebKit Review Bot
Comment 9 2012-09-20 11:00:01 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.