Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 1999d432f1a35cb558900f79f21fb8cbd38aaacc https://github.com/WebKit/WebKit/commit/1999d432f1a35cb558900f79f21fb8cbd38aaacc Author: David Quesada <david_ques...@apple.com> Date: 2022-11-16 (Wed, 16 Nov 2022)
Changed paths: M Source/WebKit/NetworkProcess/Downloads/cocoa/WKDownloadProgress.mm M Tools/TestWebKitAPI/Tests/WebKitCocoa/DownloadProgress.mm Log Message: ----------- WKDownloadProgress should write its progress as an xattr when unpublishing https://bugs.webkit.org/show_bug.cgi?id=247904 rdar://102250986 Reviewed by Alexey Proskuryakov. When unpublishing the NSProgress associated with a download, write an xattr on the progress file that reflects the fraction of progress made on the download. (or -1 if a download of indeterminate length) This leaves a record of the progress for outside observers to reflect if they encounter a file that represents a partially completed download that happens to be paused, and therefore doesn't have a live NSProgress. * Source/WebKit/NetworkProcess/Downloads/cocoa/WKDownloadProgress.mm: (-[WKDownloadProgress unpublish]): (-[WKDownloadProgress _updateProgressExtendedAttributeOnProgressFile]): * Tools/TestWebKitAPI/Tests/WebKitCocoa/DownloadProgress.mm: (-[DownloadProgressTestRunner init]): (-[DownloadProgressTestRunner dealloc]): On creation/deallocation of the test runner, create and delete the file being used to publish progress. This file needs to actually exist for the purposes of the new test. (-[DownloadProgressTestRunner progressURL]): (TEST): DownloadProgress.ProgressExtendedAttributeSetAfterPartialDownloadStops: Start a download and pause it, partway through, then assert that the progress file has an extended attribute set that reflects the fraction of the progress made through the download. Canonical link: https://commits.webkit.org/256744@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes