Bug 188583

Summary: [macOS] [WK2] Add infrastructure to test receiving file promises on drop
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: Tools / TestsAssignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: aestes, bdakin, commit-queue, ews-watchlist, lforschler, megan_gardner, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
aestes: review+
Archive of layout-test-results from ews206 for win-future
none
Patch for landing none

Wenson Hsieh
Reported 2018-08-14 15:47:25 PDT
Add infrastructure to test receiving file promises on drop
Attachments
Patch (34.85 KB, patch)
2018-08-14 16:43 PDT, Wenson Hsieh
aestes: review+
Archive of layout-test-results from ews206 for win-future (12.89 MB, application/zip)
2018-08-16 17:42 PDT, EWS Watchlist
no flags
Patch for landing (34.74 KB, patch)
2018-08-16 21:19 PDT, Wenson Hsieh
no flags
Wenson Hsieh
Comment 1 2018-08-14 16:43:19 PDT
EWS Watchlist
Comment 2 2018-08-16 17:42:42 PDT Comment hidden (obsolete)
EWS Watchlist
Comment 3 2018-08-16 17:42:53 PDT Comment hidden (obsolete)
Andy Estes
Comment 4 2018-08-16 20:30:03 PDT
Comment on attachment 347129 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=347129&action=review I'm not sure your unique filename finding logic in copyFile() is correct, but otherwise looks great! r=me > Tools/TestWebKitAPI/mac/TestFilePromiseReceiver.mm:48 > + _promisedTypeIdentifiers = adoptNS(promisedTypeIdentifiers.copy); I don't think dot syntax makes sense for -copy. It's an operation, not a property. > Tools/TestWebKitAPI/mac/TestFilePromiseReceiver.mm:101 > + NSString *adjustedFileName = suffix ? fileNameWithNumericSuffix(fileName, suffix) : fileName; Won't this try to copy to the same existing file path twice before appending a numeric suffix?
Wenson Hsieh
Comment 5 2018-08-16 20:33:11 PDT
Comment on attachment 347129 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=347129&action=review Thanks for the review! >> Tools/TestWebKitAPI/mac/TestFilePromiseReceiver.mm:48 >> + _promisedTypeIdentifiers = adoptNS(promisedTypeIdentifiers.copy); > > I don't think dot syntax makes sense for -copy. It's an operation, not a property. Sounds good — changed to [] notation. >> Tools/TestWebKitAPI/mac/TestFilePromiseReceiver.mm:101 >> + NSString *adjustedFileName = suffix ? fileNameWithNumericSuffix(fileName, suffix) : fileName; > > Won't this try to copy to the same existing file path twice before appending a numeric suffix? Ah, good catch! Fixed.
Wenson Hsieh
Comment 6 2018-08-16 21:19:07 PDT
Created attachment 347347 [details] Patch for landing
WebKit Commit Bot
Comment 7 2018-08-16 21:58:56 PDT
Comment on attachment 347347 [details] Patch for landing Clearing flags on attachment: 347347 Committed r234976: <https://trac.webkit.org/changeset/234976>
Radar WebKit Bug Importer
Comment 8 2018-08-17 06:06:26 PDT
Note You need to log in before you can comment on or make changes to this bug.