Bug 250892 - [Cocoa] Add test coverage for corrupted LocalStorage database
Summary: [Cocoa] Add test coverage for corrupted LocalStorage database
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sihui Liu
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-01-20 04:31 PST by Przemyslaw Gorszkowski
Modified: 2023-03-27 11:06 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.