Changeset 228380 in webkit
- Timestamp:
- Feb 12, 2018 10:32:28 AM (6 years ago)
- Location:
- branches/safari-605-branch/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-605-branch/Tools/ChangeLog
r228360 r228380 1 2018-02-12 Jason Marcell <jmarcell@apple.com> 2 3 Cherry-pick r227910. rdar://problem/37460507 4 5 2018-01-31 Wenson Hsieh <wenson_hsieh@apple.com> 6 7 [iOS WK2] API test DataInteractionTests.ExternalSourceDataTransferItemGetFolderAsEntry is failing after an SDK update 8 https://bugs.webkit.org/show_bug.cgi?id=182339 9 <rdar://problem/36041396> 10 11 Reviewed by Andy Estes. 12 13 This API test wasn't meant to be dependent on the size of an image generated using UIImagePNGRepresentation(). 14 To make this test robust against changes to image encoding, write the raw data to the test folder instead and 15 check against the length of the data written. 16 17 * TestWebKitAPI/Tests/ios/DataInteractionTests.mm: 18 (testIconImageData): 19 (runTestWithTemporaryFolder): 20 (TestWebKitAPI::TEST): 21 1 22 2018-02-09 Jason Marcell <jmarcell@apple.com> 2 23 -
branches/safari-605-branch/Tools/TestWebKitAPI/Tests/ios/DataInteractionTests.mm
r228360 r228380 185 185 } 186 186 187 static NSData *testIconImageData() 188 { 189 return [NSData dataWithContentsOfURL:[[NSBundle mainBundle] URLForResource:@"icon" withExtension:@"png" subdirectory:@"TestWebKitAPI.resources"]]; 190 } 191 187 192 static void runTestWithTemporaryTextFile(void(^runTest)(NSURL *fileURL)) 188 193 { … … 213 218 NSFileManager *defaultManager = [NSFileManager defaultManager]; 214 219 [defaultManager createDirectoryAtURL:temporaryFolder.get() withIntermediateDirectories:NO attributes:nil error:&error]; 215 [ UIImagePNGRepresentation(testIconImage()) writeToURL:[temporaryFolder.get() URLByAppendingPathComponent:@"icon.png" isDirectory:NO] atomically:YES];220 [testIconImageData() writeToURL:[temporaryFolder.get() URLByAppendingPathComponent:@"icon.png" isDirectory:NO] atomically:YES]; 216 221 [testZIPArchive() writeToURL:[temporaryFolder.get() URLByAppendingPathComponent:@"archive.zip" isDirectory:NO] atomically:YES]; 217 222 … … 1017 1022 @"DIR: /somedirectory/subdirectory1", 1018 1023 @"DIR: /somedirectory/subdirectory2", 1019 @"FILE: /somedirectory/archive.zip ('application/zip', 988 bytes)",1020 @"FILE: /somedirectory/icon.png ('image/png', 42130 bytes)",1024 [NSString stringWithFormat:@"FILE: /somedirectory/archive.zip ('application/zip', %tu bytes)", testZIPArchive().length], 1025 [NSString stringWithFormat:@"FILE: /somedirectory/icon.png ('image/png', %tu bytes)", testIconImageData().length], 1021 1026 @"FILE: /somedirectory/subdirectory1/text-file-1.txt ('text/plain', 43 bytes)", 1022 1027 @"FILE: /somedirectory/subdirectory2/text-file-2.txt ('text/plain', 44 bytes)"
Note: See TracChangeset
for help on using the changeset viewer.