Bug 237353

Summary: Add test coverage for deleting FileSystem data when file is being written
Product: WebKit Reporter: Sihui Liu <sihui_liu>
Component: Tools / TestsAssignee: Sihui Liu <sihui_liu>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing
none
Patch for landing none

Description Sihui Liu 2022-03-01 22:53:44 PST
...
Comment 1 Sihui Liu 2022-03-01 22:58:53 PST
Created attachment 453572 [details]
Patch
Comment 2 Chris Dumez 2022-03-02 09:34:43 PST
Comment on attachment 453572 [details]
Patch

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

> Tools/ChangeLog:8
> +        Verify that file can be removed from disk, and active FileSystemSyncAccessHandle is invalidated in ths case.

Typo: "ths"

> Tools/TestWebKitAPI/Tests/WebKitCocoa/FileSystemAccess.mm:208
> +        RetainPtr<NSData> data;

Why declare the variable here?

> Tools/TestWebKitAPI/Tests/WebKitCocoa/FileSystemAccess.mm:212
> +        data = [NSData dataWithBytes:workerBytes length:strlen(workerBytes)];

RetainPtr data = [NSData dataWithBytes:workerBytes length:strlen(workerBytes)];
Comment 3 Sihui Liu 2022-03-02 09:52:53 PST
Comment on attachment 453572 [details]
Patch

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

>> Tools/ChangeLog:8
>> +        Verify that file can be removed from disk, and active FileSystemSyncAccessHandle is invalidated in ths case.
> 
> Typo: "ths"

Will change.

>> Tools/TestWebKitAPI/Tests/WebKitCocoa/FileSystemAccess.mm:212
>> +        data = [NSData dataWithBytes:workerBytes length:strlen(workerBytes)];
> 
> RetainPtr data = [NSData dataWithBytes:workerBytes length:strlen(workerBytes)];

Sure, will change.
Comment 4 Sihui Liu 2022-03-02 09:55:20 PST
Created attachment 453628 [details]
Patch for landing
Comment 5 Sihui Liu 2022-03-02 09:55:53 PST
Created attachment 453629 [details]
Patch for landing
Comment 6 EWS 2022-03-02 10:50:01 PST
Committed r290736 (247983@main): <https://commits.webkit.org/247983@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 453629 [details].
Comment 7 Radar WebKit Bug Importer 2022-03-02 10:51:18 PST
<rdar://problem/89698883>