Bug 250892

Summary: [Cocoa] Add test coverage for corrupted LocalStorage database
Product: WebKit Reporter: Przemyslaw Gorszkowski <pgorszkowski>
Component: New BugsAssignee: Sihui Liu <sihui_liu>
Status: RESOLVED FIXED    
Severity: Normal CC: aperez, sihui_liu, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Przemyslaw Gorszkowski 2023-01-20 04:31:40 PST
We need a test to ensure the behavior is expected(restoring the data base file in case of corrupted file of localStorage). It can be an API test doing something like:
(1) making a malformed file (e.g. an empty file with name "localstorage") in LocalStorage directory
(2) creating a web view and loading a web page to store an item in localStorage
(3) creating a second web view and loading a web page with the same url to read the item from localStorage (to ensure the item is stored successfully)

Similar test exists for glib: https://github.com/WebKit/WebKit/pull/8716
Comment 1 Radar WebKit Bug Importer 2023-01-27 04:32:17 PST
<rdar://problem/104740551>
Comment 2 Sihui Liu 2023-03-24 15:52:15 PDT
Pull request: https://github.com/WebKit/WebKit/pull/11953
Comment 3 EWS 2023-03-27 11:06:35 PDT
Committed 262161@main (ce073e6cdcf1): <https://commits.webkit.org/262161@main>

Reviewed commits have been landed. Closing PR #11953 and removing active labels.