Bug 89609 - IndexedDB: Fix layout tests to clear previous database structures
Summary: IndexedDB: Fix layout tests to clear previous database structures
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Joshua Bell
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-20 15:52 PDT by Joshua Bell
Modified: 2012-06-21 16:29 PDT (History)
4 users (show)

See Also:


Attachments
Patch (15.66 KB, patch)
2012-06-20 15:54 PDT, Joshua Bell
no flags Details | Formatted Diff | Diff
Patch for landing (15.69 KB, patch)
2012-06-21 13:24 PDT, Joshua Bell
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Bell 2012-06-20 15:52:58 PDT
IndexedDB: Fix layout tests to clear previous database structures
Comment 1 Joshua Bell 2012-06-20 15:54:34 PDT
Created attachment 148671 [details]
Patch
Comment 2 Joshua Bell 2012-06-20 15:54:54 PDT
tony@ - r?
Comment 3 Tony Chang 2012-06-20 16:11:35 PDT
Comment on attachment 148671 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=148671&action=review

> LayoutTests/ChangeLog:10
> +        A handful of tests weren't deleting previously created stores (or the whole
> +        database), which made them fail if trivially re-run in Chromium or under
> +        NRWT with --iterations=2.

Should DRT delete all databases between tests?  See TestShell::resetTestController() where we reset other things Tools/DumpRenderTree/chromium/TestShell.cpp.
Comment 4 Joshua Bell 2012-06-20 16:25:59 PDT
(In reply to comment #3)
> 
> Should DRT delete all databases between tests?  See TestShell::resetTestController() where we reset other things Tools/DumpRenderTree/chromium/TestShell.cpp.

Yes. I likely introduced this test-only regression with http://src.chromium.org/viewvc/chrome?view=rev&revision=140892 which stores the data on disk and persists it (via a temp dir) only for the lifetime of the WebIDBFactory instantiated via webKitPlatformSupport()->idbFactory() - but that factory should probably be discarded for each test run (and I had thought it was!).
Comment 5 Joshua Bell 2012-06-21 13:09:12 PDT
FYI, changing out DRT uses temp dirs for IDB should be easier after https://bugs.webkit.org/show_bug.cgi?id=88338 lands.
Comment 6 Joshua Bell 2012-06-21 13:24:08 PDT
Created attachment 148870 [details]
Patch for landing
Comment 7 WebKit Review Bot 2012-06-21 16:29:01 PDT
Comment on attachment 148870 [details]
Patch for landing

Clearing flags on attachment: 148870

Committed r120976: <http://trac.webkit.org/changeset/120976>
Comment 8 WebKit Review Bot 2012-06-21 16:29:05 PDT
All reviewed patches have been landed.  Closing bug.