Commit Graph

483 Commits

Author SHA1 Message Date
DreamPiggy f415e51508 Update the test case, because previouslly we have no test case about the storeImage behavior when imageData is nil 2020-03-02 14:52:50 +08:00
DreamPiggy cc8e80ff84 Try to fix the test case `test11ThatCancelAllDownloadWorks` to make it stable 2020-03-02 14:52:50 +08:00
DreamPiggy d88b7d81db Update the test case with Case 3: UIAnimatedImage without sd_imageFormat should use GIF not APNG 2020-03-02 14:52:50 +08:00
DreamPiggy 12bdd57f31 Added the test case `test42StoreCacheWithImageAndFormatWithoutImageData` to ensure this behavior 2020-03-02 14:52:50 +08:00
DreamPiggy 5c3c40288f
Merge pull request #2936 from dreampiggy/feature_better_vector_support_pdf
Feature - better support for vector format detection, now PDF rasterized bitmap is built-in
2020-02-26 16:02:20 +08:00
DreamPiggy d56636e15b Update the Example and Test case about URLSessionMetrics, expose the API in UIVIew+WebCache to make it easy to write code (or user have to write NSStringFromClass) 2020-01-30 18:33:16 +08:00
DreamPiggy eeec6de698 Update the PDF demo and test cases 2020-01-30 15:29:57 +08:00
DreamPiggy cde0e48a6d Add one progressive animation test case to avoid this regression bug in the future 2020-01-18 16:46:00 +08:00
DreamPiggy b8b7438ce9 Fix the wrong behavior of current sd_blurredImageWithRadius, which calculate the wrong box size for consolve 2020-01-15 21:35:15 +08:00
DreamPiggy 7a8407d0be Fix the test case again because of the behavior changes for aspect ratio rect limit 2020-01-13 22:17:19 +08:00
DreamPiggy 72250f2182 Fix the test case again 2020-01-10 22:33:05 +08:00
DreamPiggy cd1ae56f5f Add one test case to ensure the `SDWebImageScaleDownLargeImages` is translated to thumbnail decoding 2020-01-10 19:28:39 +08:00
DreamPiggy 77283f6116 Update the test case, fix the behavior of thumbnail pixel size when aspect ratio is YES. 2020-01-10 18:23:41 +08:00
DreamPiggy fa124b4d11 Enable the force decode test case for macOS as well 2020-01-10 11:55:01 +08:00
DreamPiggy 86e3a164dc Fix the test case of blur radius calculation. CG and CI now match in visual 2020-01-03 14:45:13 +08:00
DreamPiggy 1afadafc78 Update all transformer test cases to support Core Image 2020-01-03 11:58:12 +08:00
DreamPiggy eda7422c82 Fix the issue of sd_croppedImageWithRect (UIKit) and sd_rotatedImageWithAngle for CIImage 2019-12-30 22:40:06 +08:00
DreamPiggy a7682d58b4 Add the test case testSDGraphicsImageRenderer, update the documentation 2019-12-21 20:15:59 +08:00
DreamPiggy c49bc5c925 Change the implementation of `sd_rotatedImageWithAngle` using the UIGraphicsRenderer, avoid always using ARGB8888 2019-12-16 17:29:58 +08:00
DreamPiggy 0b12058427 Fix the test case compile warning of `SDWebImageTestDiskCache` 2019-12-16 12:44:52 +08:00
DreamPiggy 5c1351a2fd Added `test47DiskCacheExtendedData` test case 2019-11-28 21:02:26 +08:00
DreamPiggy 5f2a9695d8 Add the test case for SDFileAttributeHelper, fix the issue that associated object is lost 2019-11-28 19:49:51 +08:00
DreamPiggy 983dd59e4f Add one test case for this behavior: `test14AnimatedImageViewStopPlayingWhenHidden` 2019-11-09 13:48:27 +08:00
DreamPiggy 29027a693a Update the test case for animated image view format test 2019-11-09 03:10:18 +08:00
DreamPiggy 4c7cbc6aa7 Update the test case to SDAnimatedImageView/Player 2019-11-04 12:34:36 +08:00
DreamPiggy a4888081ea Change the "Tests" iOS target name into "Tests iOS", since now we have 3 test target, to help for readability 2019-10-28 13:18:12 +08:00
DreamPiggy 0db2169665 Update tvOS available check on test case 2019-10-27 22:48:43 +08:00
DreamPiggy 77830dd4f2 Add all the Test Case on tvOS platform, using the same code as iOS 2019-10-27 22:32:53 +08:00
DreamPiggy 1442534f6d Fix the SDDisplayLink issue of default value, add test cases `testSDDisplayLink` 2019-10-27 21:47:09 +08:00
DreamPiggy 5aab84df90 Fix the test case naming and documentation 2019-10-16 17:04:03 +08:00
DreamPiggy 34e736375e Refactory to seperate the response modifier and data decryptor, one for HTTP response, one for Data decrypt. 2019-10-15 20:16:52 +08:00
DreamPiggy d6fbaaff04 Add test case `test24ThatDownloadRequestModifierWorks `, including the base64 and zlib testing for both fileURL and webURL 2019-10-15 16:40:59 +08:00
DreamPiggy e8ee90b85e Try to fix the test case `test15DownloaderLIFOExecutionOrder`, because the queue dispatch delay, we add the next 8-14 urls just after url 7 start downloading 2019-09-30 12:36:39 +08:00
DreamPiggy 902c619126 Added the test case `test15DownloaderLIFOExecutionOrder` to fix the LIFO order. See #2823 2019-09-26 22:49:31 +08:00
DreamPiggy 164409d30a Fix the iOS 13 Test case 2019-09-22 17:20:57 +08:00
DreamPiggy f80a2840c0 Fix the Travis-CI test issue for macOS 10.15 2019-09-22 16:03:45 +08:00
DreamPiggy 1a32f90f9c Add test. case for HEIC animated imaged decoding && encoding 2019-09-22 15:06:03 +08:00
DreamPiggy d20b25b72c Fix the unused code warning on test cases 2019-09-20 19:07:19 +08:00
DreamPiggy 7e83241c37 Fix the macOS SDAnimatedImageRep to match Netscape standard of GIF loop count, which should use 1 when there are no loop count information 2019-09-20 18:59:14 +08:00
DreamPiggy a7ae1053ec Fix the test case issue. The loop count test case need another PR to fix 2019-09-20 17:44:38 +08:00
DreamPiggy 113c20ad9e Add the test case for GIF image which does not have any Loop Count extension metadata 2019-09-20 16:29:26 +08:00
DreamPiggy fb6819add0 Add test case to ensure the `SDImageIOAnimatedCoder` abstract class can not be used as normal coder 2019-09-20 14:32:35 +08:00
DreamPiggy 70b8fec54a Fix the compile issue for test cases on macOS 2019-08-30 17:25:10 +08:00
DreamPiggy 1f74aea686 Add the test case for these two new properties 2019-08-27 19:41:27 +08:00
DreamPiggy 3f248552b3 Update the test case for catalyst 2019-08-13 13:22:10 +08:00
DreamPiggy 054c5186b8 Use UIImage.class for conformsToSelector detect, which fix the current Xcode 11 Beta5 's runtime behavior of UIKit for macOS 2019-08-12 20:55:07 +08:00
DreamPiggy caae8f171f Fix the test case because of cache key 2019-08-03 18:29:18 +08:00
DreamPiggy b444652412 Add more tests to ensure the callback been called, even we cancel the operation, impact the view category and prefetcher 2019-08-03 17:24:34 +08:00
DreamPiggy 4e51f1deac Merge branch 'master' of https://github.com/SDWebImage/SDWebImage into bugfix_user_cancel_guarantee_callback 2019-08-02 17:41:32 +08:00
DreamPiggy cd2e36f7a5 Add test cases for `matchAnimatedImageClass` options 2019-08-02 16:03:48 +08:00
DreamPiggy 67b29b9d07 Update all the test cases for cancel, now it should receive a completion with error code `SDWebImageErrorCancelled` 2019-08-02 13:32:08 +08:00
DreamPiggy 6f0f735d4f Update the test case for cancel behavior 2019-08-01 20:12:07 +08:00
DreamPiggy 5df70628be
Merge pull request #2780 from dreampiggy/project_upgrade_xcode_10
Follow App Store submit rule, upgrade the minimum Xcode version to Xcode 10.0
2019-07-03 16:45:56 +08:00
DreamPiggy 5c22cc73ae Update the project warning for unnecessary xcconfig files 2019-07-02 18:23:39 +08:00
DreamPiggy 6d626edaf8 Expose the memoryCache and diskCache object on `SDImageCache`, make it useful for user who have custom property beyond `SDImageCacheConfig` 2019-07-02 15:12:56 +08:00
DreamPiggy 3cd71190b3 Merge branch 'master' of https://github.com/SDWebImage/SDWebImage into remove_explicit_Tests_deployment 2019-06-30 12:07:16 +08:00
ifsnow fcaa7d6c7a Change the default value of accept request header 2019-06-27 18:42:50 +09:00
DreamPiggy df5be0e34c Update CI to use Xcode 10.2. Combine both the Example and Test Podfile into one. Make CocoaPods only generate one `Pods.xcodeproj` and fix the New Build System issue 2019-06-18 15:46:08 +08:00
DreamPiggy 8ce8a87b03 Merge branch 'master' of https://github.com/SDWebImage/SDWebImage into feature_transformer_cache_phase_1
# Conflicts:
#	Tests/Tests/SDWebImageManagerTests.m
2019-06-14 12:52:34 +08:00
DreamPiggy 4683e5a0ad Merge branch 'master' of https://github.com/SDWebImage/SDWebImage into feature_global_control_options
# Conflicts:
#	SDWebImage.xcodeproj/project.pbxproj
2019-06-13 11:50:41 +08:00
DreamPiggy f88798fe28 Add test about the store cache type && transformer cache type, make sure it works 2019-05-30 14:05:24 +08:00
DreamPiggy c66f5c90ef Replace the unavailable Demo test images with the new images from Kodak site 2019-05-29 15:12:14 +08:00
DreamPiggy 949024c2a6 Fix that all Example targets disable all NSLog output. We need to keep the log to investigate some issue from system framework 2019-05-29 14:24:01 +08:00
kinarob 3c24856541 `backgroundImageOperationKey` test should apply for SD_UIKIT only 2019-05-25 21:30:22 +08:00
kinarob 2396c2e7c0 Fix get button background image operation key bug 2019-05-24 21:09:59 +08:00
DreamPiggy 0dbcb98c6f Add test case for options manager, ensure it works 2019-05-23 21:55:39 +08:00
DreamPiggy 8adfe3faeb Add the test cases for SDImageCacheDecodeFirstFrameOnly on memory cache 2019-05-16 17:42:17 +08:00
DreamPiggy 1d5b411f3c Using the lazy property for `lock` and `runLoopMode` to ensure this will not cause crash and logic issue. Without need of checking on `setImage:` 2019-05-16 11:32:10 +08:00
DreamPiggy 63c0794ad8 Fix that SDAnimatedImageView initWithImage will skip the initialize logic and crash 2019-05-15 20:26:39 +08:00
kinarob 9f4bc99fe8 add macros checking in SDImageFilterTransformer 2019-05-06 14:38:31 +08:00
kinarob 430bebe274 Add cacheType checking in animatedImageView category 2019-05-06 11:33:26 +08:00
Bogdan Poplauschi 479fed6913 Revert explicitly set *_DEPLOYMENT_TARGET inside the Tests Xcode project. Initially changed in #2709 2019-04-29 15:57:12 +03:00
DreamPiggy bf047b6e1b Update more test cases for code coverage 2019-04-27 15:05:02 +08:00
DreamPiggy 873d9eddce Added many test case to ensure the code behavior. Upgrade the test coverage 2019-04-27 15:05:02 +08:00
DreamPiggy ccec69715d Fix the test project using the wrong min deployment target version 2019-04-27 14:40:08 +08:00
DreamPiggy 774ecaf40f Fix the test case compile issue of macOS 2019-04-25 20:49:23 +08:00
DreamPiggy feed2e5abd Update the test cases, using a 150x200 image (which width is not equal to height) to ensure the rotation works 2019-04-25 18:58:40 +08:00
DreamPiggy 9c6c4927fb Add test case for CGImage create decoded with EXIF orientation 2019-04-25 16:10:39 +08:00
DreamPiggy 9cce513a09 Add a simple test case to ensure SDAnimatedImageView should display the static NSImage 2019-04-25 14:13:56 +08:00
zhongwuzw 522743f246 Merge master into fix_tint_image_bug 2019-04-03 14:51:16 +08:00
zhongwuzw 3a5a387485 Add tests for inversion check 2019-04-03 14:14:15 +08:00
zhongwuzw fa303a9b73 Update snapshot 2019-04-03 12:28:10 +08:00
zhongwuzw 2a4e96d8f5 Add test case to check inversion when do round corner operation 2019-04-03 12:10:21 +08:00
DreamPiggy 2640301e82 Change the optional method into required, force the custom loader author to provide the error check 2019-04-02 17:56:12 +08:00
DreamPiggy cc13b18c21
Merge pull request #2660 from dreampiggy/bugfix_caches_manager_lock
Fix the thread safe issue of caches manager and specify the default caches array value.
2019-03-31 18:34:44 +08:00
DreamPiggy f9e80d18eb Fix the current caches manager, does not apply the SDImageCache.sharedImageCache. Fix the thread safe issue of caches manager.
Update the test cases and documents about this behavior.
2019-03-31 15:36:04 +08:00
DreamPiggy cf7a5a626b Remove the unused intrinsicContentSize for SDAnimatedImageView. This is original from FL and it's proved to be a of FL itself, but not what UIKit/AppKit behavior. 2019-03-30 15:47:41 +08:00
DreamPiggy d9c8ba6da2
Merge pull request #2652 from dreampiggy/bugfix_xcconfig_xcode_10_2
Fix the issue cause build failure for Xcode 10.2
2019-03-28 15:10:36 +08:00
DreamPiggy 110b49633f Fix the warning of deprecated project localization after upgrading Xcode 10.2 2019-03-26 18:03:14 +08:00
DreamPiggy b09da860b9 Fix the issue cause build failure for Xcode 10.2.
Fix the wrong relative path of SDWebImage.xcodeproj
Fix the wrong xcconfig using ENABLE_BITCODE on debug configuration
2019-03-26 17:36:35 +08:00
DreamPiggy 9fe1eee005 Rename the SDImageLoaderProtocol method naming to avoid the Selector conflict with SDWebImageManager and cause misunderstanding usage 2019-03-25 18:44:41 +08:00
DreamPiggy c6fe902a30 Fix the SDWebImage Test project using the framework xcconfig, should ignore the prefix header 2019-03-21 19:38:09 +08:00
DreamPiggy 71bff450b3
Merge pull request #2635 from dreampiggy/bugfix_transformer_cache_key
Fix the current transformer cache key generating rules, try to keep the image file extension
2019-03-12 20:42:23 +08:00
DreamPiggy 9fb9ac7ad4 Fix the current transformer cache key generating rules, try to keep the image file extension as much as we can 2019-03-09 17:07:47 +08:00
DreamPiggy 6bab2de69a Move some internal classes into private header files, make it easy to maintain the code 2019-03-09 15:25:44 +08:00
DreamPiggy e303b7aed6 Update the test case to ensure the encoding options work 2019-01-28 13:57:55 +08:00
DreamPiggy 2bfdac1f60 Update the test cases 2019-01-26 17:43:30 +08:00
DreamPiggy d90ca19d1b Revert the changes due to merge conflict. 2019-01-26 17:42:17 +08:00
DreamPiggy 4bb93d293f Merge branch 'master' of https://github.com/SDWebImage/SDWebImage into 5.x
# Conflicts:
#	CHANGELOG.md
#	SDWebImage.podspec
#	SDWebImage/FLAnimatedImage/FLAnimatedImageView+WebCache.m
#	SDWebImage/SDWebImageDownloader.m
#	SDWebImage/SDWebImageDownloaderOperation.m
#	SDWebImage/SDWebImageWebPCoder.m
#	SDWebImage/UIView+WebCache.h
#	SDWebImage/UIView+WebCache.m
#	Tests/Tests/SDCategoriesTests.m
#	WebImage/Info.plist
2019-01-26 17:02:27 +08:00
DreamPiggy 759e02eb30 Add test case for this special case of FLAnimatedImage loading 2019-01-14 13:07:45 +08:00
DreamPiggy e6a4e74ed5 Revert the changes for unused public API, polish comments 2019-01-03 11:49:06 +08:00
DreamPiggy b68730bedf Use the more intuitive and suitable cache path for SDImageCache. Defaults now to `~Library/Caches/com.hackemist.SDImageCache/default/`, namespace controls the sub-directory name.
Remove the namespacePrefix property because now it's not follows what it says
2018-12-09 15:23:26 +08:00
DreamPiggy f663cab2c9 Merge branch 'master' of https://github.com/SDWebImage/SDWebImage into 5.x
# Conflicts:
#	CHANGELOG.md
#	README.md
#	SDWebImage.podspec
#	SDWebImage/FLAnimatedImage/FLAnimatedImageView+WebCache.m
#	SDWebImage/SDImageCache.m
#	SDWebImage/SDWebImageCompat.m
#	SDWebImage/SDWebImageDownloaderOperation.m
#	SDWebImage/SDWebImageManager.m
#	SDWebImage/UIView+WebCache.h
#	SDWebImage/UIView+WebCache.m
#	Tests/Tests/SDImageCacheTests.m
#	WebImage/Info.plist
2018-11-17 11:54:18 +08:00
Bogdan Poplauschi d89b735708 Fixed some warnings in the tests 2018-11-11 21:50:44 -06:00
Bogdan Poplauschi 887eeb4bc3 Fixes (use xcode10 image, no need for inputFileListPaths or outputFileListPaths) 2018-11-11 21:10:50 -06:00
Bogdan Poplauschi edb9c45859 Xcode 10 - upgraded schemes, using xcode10 Travis image, removed some deprecated methods from our demos + formatting
Using xcconfig files - easier to maintain all the settings appart from target files, less conflicts, can reuse the values
2018-11-11 20:19:33 -06:00
Bogdan Poplauschi 6c6d848cee Added 2 tests for #2516 Fix extention long length of file name 2018-10-28 20:49:44 +02:00
Bogdan Poplauschi 64123734c3 Move webp component (and libwebp dependency) to SDWebImage/SDWebImageWebPCoder
- move the webp component + the libwebp dependency to SDWebImage/SDWebImageWebPCoder (including tests and demo)
- Xcode 9.4
- instead of directly linking the Demos to the frameworks, using CocoaPods (`Examples/Podfile`). This allows using SDWebImage/SDWebImageWebPCoder into our examples so we keep the WebP demos
- demos code cleanup and warnings resolved
- all links from docs (README, Migration guide, CHANGELOG) are full links, so they work even from external pages (i.e. https://cocoapods.org/pods/SDWebImage).
- added "Additional modules" section to README
2018-09-07 12:40:25 +03:00
Bogdan Poplauschi 2bb336bc12 Merge pull request #2449 from dreampiggy/feature_set_image_block_extra_args
Feature set image block extra args
2018-08-28 12:36:55 +03:00
DreamPiggy 8c5db9484b Adopt all the protocol APIs which contains getter value to use property instead, to make the API easy to use or Swift user 2018-08-19 12:10:26 +08:00
DreamPiggy 0fb7268d2e Add the test case for cache serializer feature 2018-08-17 17:58:27 +08:00
DreamPiggy b400b51cca Fix the bug that `SDWebImageContextCacheKeyFilter` wrongly be used as cache serializer and cause crash 2018-08-17 17:20:17 +08:00
DreamPiggy 39893fbdac Merge branch 'master' of https://github.com/rs/SDWebImage into 5.x
# Conflicts:
#	Tests/Tests/SDCategoriesTests.m
#	Tests/Tests/SDTestCase.h
#	Tests/Tests/SDTestCase.m
2018-08-17 16:19:09 +08:00
DreamPiggy 3966200d6a
Merge pull request #2434 from dreampiggy/test_coder
Add more tests for image decoding/encoding part
2018-08-17 14:56:39 +08:00
DreamPiggy 26ebbba807
Merge pull request #2438 from dreampiggy/test_view_category
Add the test cases for View Transition and View Indicator, both iOS && macOS
2018-08-17 14:46:42 +08:00
DreamPiggy 50b6a09a9b Fix the test case testFLAnimatedImageViewSetImageWithURL because of remote resource is not available 2018-08-16 14:57:47 +08:00
DreamPiggy 04becbb02b Update the test to ensure the UIView sd_internalSetImageWithURL of setImageBlock behavior 2018-08-16 11:45:51 +08:00
DreamPiggy 8b26091741 Disable HEIC encoding check temporally for travis-ci 2018-08-10 23:49:35 +08:00
DreamPiggy 0ff95e2255 Update the view indicator and transition test 2018-08-10 23:25:17 +08:00
DreamPiggy 1d8454d356 Fix that the minimumProgressInterval should always callback the final finished progress but not ignore it 2018-08-10 22:41:22 +08:00
DreamPiggy 7ee0d06cf7 Add the test cases for View Transition and View Indicator, both iOS && macOS 2018-08-10 22:36:51 +08:00
DreamPiggy 7187aff159 Update SDAnimatedImage test and HEIC/HEIF test 2018-08-10 15:41:32 +08:00
DreamPiggy b0775361b5 Add more test about SDAnimatedImage 2018-08-10 15:26:14 +08:00
DreamPiggy 8bd5e5e44d Add more tests for animated coder 2018-08-10 15:26:14 +08:00
DreamPiggy fc23b93d08 Update the test about progressive decoding of other image format 2018-08-10 15:26:14 +08:00
Bogdan Poplauschi 83b5d22a56
Merge pull request #2417 from dreampiggy/feature_disk_cache_migration_from_4.x
Feature disk cache migration from 4.x
2018-08-08 12:47:20 +03:00
Bogdan Poplauschi 1d4823eb48 Merge pull request #2415 from dreampiggy/feature_minimum_progress_interval
Feature minimum progress interval
2018-08-04 19:11:04 +03:00
DreamPiggy d9d0b7d4bf Add the feature, to migrate the disk cache from 4.x version to the new location of cache path. 2018-08-03 17:32:04 +08:00
DreamPiggy e400d220c5 Update the test from merge conflict 2018-08-02 18:53:52 +08:00
DreamPiggy 8b7e88de50 Merge branch 'master' of https://github.com/rs/SDWebImage into 5.x
# Conflicts:
#	SDWebImage/FLAnimatedImage/FLAnimatedImageView+WebCache.m
#	SDWebImage/SDWebImageDownloader.h
#	SDWebImage/SDWebImageDownloader.m
#	SDWebImage/SDWebImageDownloaderOperation.h
#	SDWebImage/UIView+WebCache.m
#	Tests/Tests/SDWebImageDownloaderTests.m
2018-08-02 18:42:21 +08:00
Bogdan Poplauschi 676a4b53b7 Merge pull request #2336 from gukemanbu/xucg
remove addProgressCallback, add createDownloaderOperationWithUrl
2018-08-02 11:25:51 +03:00
DreamPiggy 6a3aa48410 Update the test to ensure minimumProgressInterval works 2018-08-02 13:19:52 +08:00
DreamPiggy 6398eedce8 Rename `sd_UTTypeFromSDImageFormat` to `sd_UTTypeFromImageFormat` 2018-07-19 01:44:48 +08:00
Bogdan Poplauschi 49cd121b05 CocoaPods 1.5.0 for the Tests project 2018-07-17 10:56:42 +03:00
Bogdan Poplauschi c797279e70 Accidentally removed `endif` - added back 2018-07-16 10:46:08 +03:00
DreamPiggy 982ade8824 Remove all FLAnimatedImage from the Core SDWebImage repo. Move the code to SDWebImageFLPlugin repo 2018-07-13 22:17:02 +08:00
DreamPiggy e533a3da80 Refactor the UIImage+MultiFormat and GIF/WebP category. Simplify the usage and remove the extra method which is not used so common. 2018-06-16 20:05:54 +08:00
DreamPiggy 1343a65321 Fix the test 2018-06-06 16:06:34 +08:00
xucg 91a8227ab1 add unit test 2018-05-24 20:27:48 +08:00
DreamPiggy c6fa6e31fb Remove the extra calculation of image orientation for ImageIO coder 2018-05-04 16:30:39 +08:00
Bogdan Poplauschi ebfe2cedc2 Merge pull request #2306 from dreampiggy/renaming_coder_protocol_and_coders
Renaming coder protocol and coders
2018-04-26 19:08:34 +03:00
Bogdan Poplauschi 5bedca7473
Merge pull request #2304 from dreampiggy/renaming_image_transformer
Renaming image transformer
2018-04-26 18:49:52 +03:00
Bogdan Poplauschi f185418014
Merge pull request #2294 from dreampiggy/renaming_progressive_load
Renaming progressive load
2018-04-26 18:45:23 +03:00
DreamPiggy 0423cc2cf0 Update the test for image coder renaming 2018-04-26 23:21:26 +08:00
DreamPiggy a5616e2bcd Update the test for renaming 2018-04-26 23:03:44 +08:00
DreamPiggy 5d7625f567 Fix the HTTP auth test again 2018-04-26 23:02:45 +08:00
DreamPiggy 189dc814f1 Fix the test about HTTP Auth for downloader 2018-04-26 22:08:03 +08:00
DreamPiggy e9cf356e57 Renaming `SDWebImageProgressiveDownload` to `SDWebImageProgressiveLoad`. Which is more suitable for custom loader which also support progressive image loading. (No need to be download) 2018-04-26 21:42:25 +08:00
DreamPiggy 9c11886dc0 Update the test project to use modular headers instead of massive headers... 2018-04-19 17:25:39 +08:00
Bogdan Poplauschi af0eaccbc5 Merge pull request #2292 from dreampiggy/refactor_cache_webcache_protocol
Fix the custom cache protocol naming
2018-04-19 10:39:39 +03:00
Bogdan Poplauschi eded5f026c Merge pull request #2293 from dreampiggy/refactor_naming_NSImge_category
Renaming the NSImage category naming to `NSImage+Compatibility`
2018-04-19 10:26:51 +03:00
DreamPiggy 7cf58ad7c5 Renaming the NSImage category naming to `NSImage+Compatibility`, because it's only used for Cross-platform compatibility code. `Additions` is too wide 2018-04-18 21:14:34 +08:00
DreamPiggy d5074429f0 Add tests for custom loader protocol, using a test loader to specify loader function 2018-04-18 20:46:00 +08:00
DreamPiggy 60759f812a Refactor to only use one publish protocol for custom loader. Renaming image downloader description to loader 2018-04-18 20:46:00 +08:00
DreamPiggy a6bdba724e Fix all cache test 2018-04-18 19:24:23 +08:00
DreamPiggy 2c7d1a465a Update the tests for web cache protocol and caches manager 2018-04-18 14:40:56 +08:00
Bogdan Poplauschi 1bc4662bde Merge pull request #2282 from dreampiggy/refactor_memory_cache_disk_cache
Refactor cache - Support custom memory cache & disk cache
2018-04-17 12:14:06 +03:00
DreamPiggy dd2e71c99d Add support for SDAnimatedImage imageNamed:bundle: for macOS, enable SDAnimatedImageTest for macOS 2018-04-17 12:03:24 +08:00
DreamPiggy 2d27300e00 Add test for custom memory cache and disk cache 2018-04-17 11:09:56 +08:00
DreamPiggy 62058d209d Add memory cache and disk cache protocol, make our image cache just like a wrapper to call the disk cache implementation 2018-04-17 11:09:56 +08:00
DreamPiggy 781c079a3a Use `SDWebImageAvoidDecodeImage` to allow user to control force decode feature for individual image request. Replace all the central control for `decompressImages` 2018-04-16 01:12:09 +08:00
DreamPiggy e1d96e7812 Revert "Merge pull request #1898 from walkline/master into 5.x" 2018-04-13 16:48:15 +08:00
DreamPiggy f8e9dd3412 Update the test for cache path API 2018-04-13 11:19:03 +08:00
DreamPiggy d515a36337 Merge branch 'master' of https://github.com/rs/SDWebImage into 5.x
# Conflicts:
#	SDWebImage/SDWebImageImageIOCoder.m
2018-04-12 01:16:34 +08:00
DreamPiggy 2cb03773db
Merge pull request #2261 from dreampiggy/feature_request_modifier_and_response
Feature request modifier and response
2018-04-11 16:51:28 +08:00
DreamPiggy 46e5b196f8 Fix the test about alpha images force decode 2018-04-11 16:10:41 +08:00
DreamPiggy b9ec481edf Remove the extra calculation of image orientation for ImageIO coder 2018-04-10 21:19:12 +08:00
DreamPiggy 22c293738a Update the progressive coder/ animated coder init API, which pass the options to support extensibility 2018-04-09 13:42:52 +08:00
DreamPiggy cbf8581696 Fix the scale factor issue on macOS using helper methods to match the behavior of UIKit. Also remove the unused API on NSImage category 2018-04-08 19:54:39 +08:00
DreamPiggy 55256d0091 Use a protocol instance instead of block for request modifier. This can solve the problem that Swift user is hard to grab the block back stored in dictionary. 2018-04-07 15:56:34 +08:00
DreamPiggy f01fe38fdd Add downloader request modifier to allow modify final HTTP request. Also open the API to allow advanced user to check cache & downloader operation. 2018-04-07 15:52:39 +08:00
DreamPiggy 1d7dba33f5 Update the test about download operation, which using protocol instead of class 2018-04-05 15:25:14 +08:00
DreamPiggy 73c811dc23 Fix all code tied with SDWebImageDownloaderOperation class but not protocol, which previously relay on NSURLSession but it should not to be 2018-04-05 07:26:50 +08:00
DreamPiggy 793b7e33a8 Update the custom downloader operation to fix test 2018-04-05 06:06:01 +08:00
DreamPiggy be36009d10 Update the test for custom download operation class. 2018-04-05 00:15:53 +08:00
DreamPiggy c3892d7d08 Move all download settings into SDWebImageDownloaderConfig, make it more easy to use with clear API.
Deprecate `createNewSessionWithConfiguration`, which make downloader not sync with URLSession. If user need to specify sharedDownloader config, just modify the defaultDownloaderConfig instead.
2018-04-05 00:15:53 +08:00
DreamPiggy 6bdcf63224 Fix the test build 2018-04-03 02:07:59 +08:00
DreamPiggy 8236dee202 Move the context arg after the `options` arg to make Swift ABI clear. Also update all view category to support context arg. 2018-04-02 03:24:23 +08:00
DreamPiggy 851ee7d372 Update the prefetcher test case naming 2018-04-01 00:11:15 +08:00
DreamPiggy bc164d6369 Fix prefetcher thread-safe problem using stdatomic instead of OSAtomic. Also fix test. 2018-03-31 21:44:53 +08:00
DreamPiggy 5da5ec92fb Add the test for APNG coder 2018-03-29 17:59:32 +08:00
DreamPiggy a6d61c409d Fix compile issue and test 2018-03-25 20:44:41 +08:00
DreamPiggy 5e09c6bf19 Add support for imageNamed: in SDAnimatedImage with bundle files 2018-03-25 17:32:48 +08:00
DreamPiggy 7e83d78ca3 Add tests about SDAnimatedImage SDAnimatedImageView and SDAnimatedImage+WebCache 2018-03-25 17:32:48 +08:00
DreamPiggy f94dd00c52 Use the context arg to pass the SDAnimatedImage class to create the instance by image cache and downloader.
Also enhance view category to support firstFrameOnly, scaleFactor and preload
2018-03-25 17:29:11 +08:00
DreamPiggy 87bbcdc46f Introduce SDAnimatedImage and SDAnimatedImageView for high performance animated image rendering on iOS & macOS 2018-03-25 17:23:12 +08:00
DreamPiggy ec7927b25a Update the transformer to use as immutable class. Move the tests into SDWebImageTransformerTests 2018-03-23 15:48:58 +08:00
DreamPiggy ed0100c323 Move the NSBezierPath and UIColor category into implementation because it's now for internal use only 2018-03-18 23:00:35 +08:00
DreamPiggy 67285ee722 Add the test for transformer property 2018-03-17 22:31:28 +08:00
DreamPiggy a2076d362e Add sd_colorsWithRect method and test, treat RGB color with default alpha 1.0 2018-03-17 21:18:20 +08:00
DreamPiggy 3e3ec8d513 Change the hex color from 0x00000000 format to #00000000 2018-03-17 21:18:20 +08:00
DreamPiggy aea81791ec Fix the test on macOS. Fix the issue when using rounded corner 2018-03-17 21:18:20 +08:00
DreamPiggy d0df01bec1 Complete the 8 tests for all image transform methods, well done 2018-03-17 21:18:19 +08:00
DreamPiggy c9dfe39e36 Change all sharedInstance from method to class property 2018-03-11 16:08:33 +08:00
DreamPiggy e0ad0711da Mark two set method in SDWebImageDownloader as property 2018-03-11 15:53:18 +08:00
DreamPiggy 69bc9cbd2c Update the prefetcher test to ensure that prefetch different urls works and the delegate methods work 2018-02-22 13:38:39 +08:00
DreamPiggy 9c3928a9db Fix prefetcher test to first clear the disk cache, and manager test to only fulfill the finished one 2018-02-20 21:18:08 +08:00
DreamPiggy 90632d0abc Fix prefetcher test to first clear the disk cache, and manager test to only fulfill the finished one 2018-02-20 20:58:39 +08:00
DreamPiggy 57e56d0154 Fix the test because one header file not available on iOS. Tests header search path is different from main project 2018-02-20 02:38:14 +08:00
DreamPiggy 9d78dccac7 Add tests scheme for macOS. Because we now support cross-platform, some implementation is different from UIKit & AppKit. So we also need test 2018-02-20 00:49:25 +08:00
DreamPiggy 150affd201 Add new SDCategoriesTests for any other WebCache category tests 2018-02-19 20:38:55 +08:00
DreamPiggy 1f27d3c15f Rename SDCategoriesTests to SDWebCacheCategoriesTests to make it focus on view category, import KVOController instead of build-in KVO for test 2018-02-19 20:19:14 +08:00
DreamPiggy f115830f97 Fix test again about typo 2018-02-13 21:54:21 +08:00
DreamPiggy d6a3e2c1ae Change the context arg to init method because it should be readonly after created 2018-02-07 19:59:00 +08:00
DreamPiggy 5000e8095b Fix the test for CustomDownloaderOperation 2018-01-26 00:02:01 +08:00
DreamPiggy edd26fc1e6 Merge branch 'master' of https://github.com/rs/SDWebImage into 5.x
* 'master' of https://github.com/rs/SDWebImage:
  Add protect to some Core Graphics methods
  Change all UIImage init method to alloc instead of autorelease to immediately release it after usage
  Add a option SDWebImageFromCacheOnly to load the image from cache only and prevent network
  Update the test for custom operation interface
  Use synchronized instead of semaphore in SDWebImageDownloader to make it more easy to understand :)
  Use a lock instead of barrier queue to avoid dispatch_sync blocking the main queue on race condition
2018-01-23 11:51:49 +08:00
DreamPiggy 82c44e275a Update the test 2018-01-22 21:54:12 +08:00
DreamPiggy aac654b069 Update the test for custom operation interface 2018-01-21 11:11:46 +08:00
DreamPiggy 46a55ba6c7 Merge branch 'master' of https://github.com/rs/SDWebImage into 5.x
* 'master' of https://github.com/rs/SDWebImage:
  Update the test and description to make it more clear
  Fix the issue that `setAnimationImagesWithURLs` weak reference may dealloc before the animated images was set
  Fix the strange file permissions issue
  Add the SDImageCacheQueryMemoryOnly to specify query memory only
  Update the cache options name to make it more clear
  Added missing param in storeImage examples
  Add a NSProgress property represent the image loading progress, this allow user add KVO on it for complicated logic
2018-01-17 19:22:54 +08:00
DreamPiggy 3f3a309fb4 Update the test and description to make it more clear 2018-01-16 11:34:56 +08:00
DreamPiggy 1ef45bace1 Add a NSProgress property represent the image loading progress, this allow user add KVO on it for complicated logic 2018-01-13 22:34:58 +08:00
DreamPiggy db5307eb94 Change our imageCache `storeImageDataToDisk` to internal use IO-queue. And also change error from POSIX errno to Cocoa file error 2018-01-03 15:21:02 +08:00
DreamPiggy caafe27937 Upgrade target deployment version to iOS 8.0 / macOS 10.10 2018-01-01 13:15:51 +08:00
DreamPiggy 8a8d661ea7 Merge branch 'master' of https://github.com/rs/SDWebImage into 5.x
* 'master' of https://github.com/rs/SDWebImage:
  Adopt the current requirement, change ImageIO coder's canDeocdeFromHEIC to actual implementation
  Fix Clang Static Analyzer warning for number nil check from Xcode 9.2
2017-12-29 22:57:32 +08:00
DreamPiggy 8b3c4c2cde Fix Clang Static Analyzer warning for number nil check from Xcode 9.2 2017-12-29 12:52:29 +08:00
DreamPiggy f2888f799c Merge branch 'master' of https://github.com/rs/SDWebImage into 5.x
* 'master' of https://github.com/rs/SDWebImage: (25 commits)
  When store image with no data for SDImageCache, check whether it contains alpha to use PNG or JPEG format
  Fix the way remove all elements from pointer array
  Remove some unused code, fix typo, update the comments
  Use a weak pointerArray to store the operations for sd_setAnimationImagesWithURLs, avoid extra retain of operation instance
  Use a copy-weak maptable for operations stored in UIView(WebCacheOperation) category to avoid retain of operation, and also use lock to keep thread-safe
  Fix progressive WebP decoding by creating data provider with actual data size
  Add a SDWebImageExternalCustomManagerKey context arguments to allow user to custom image manager for UIView category to avoid build from scratch
  Check the group instance before calling group leave
  Remove the out-dated compatible code for non-ARC
  Update the comments
  Allow custom SDWebImageDownloaderOperation to handle HTTP redirect
  Update the comments for that SDWebImageInternalSetImageGroupKey key
  Fix potential thread-safe problem in SDWebImagePrefetcher by keeping all access through prefetcher queue and retain the local URLs firstly
  Update the comments and remove the unnecessary main queue check
  Follow Apple doc and remove that manual calculation of byte alignment to make it more universal for different architecture device
  Change prefetchURLs from nonatomic to atomic to avoid multi-thread access crash
  capture currentURL instead of using index to access to avoid race condition
  Grab the poster image instead of image itself to avoid an UIAnimatedImage been set
  Update the documents
  Update tests to invalidate session after usage
  ...
2017-12-22 21:06:48 +08:00
DreamPiggy a7c8ce5864 Update tests to invalidate session after usage 2017-11-27 00:37:20 +08:00
Bogdan Poplauschi ab06d2370b Merge branch 'master' into 5.x 2017-10-27 10:17:44 +03:00
Bogdan Poplauschi 04855c945e Merge pull request #2061 from dvkch/master
Cached image filename are sometimes generated with invalid path extensions
2017-10-21 17:15:11 +03:00
Bogdan Poplauschi 4e8d450c69 Merge branch 'master' into 5.x
# Conflicts:
#	Tests/Tests/SDImageCacheTests.m
2017-10-21 16:50:19 +03:00
Bogdan Poplauschi ed411dcba9 Finally fixed the tests from `SDImageCacheTests` so we can re-enable `test40InsertionOfImageData`
- the problems: some tests were just poorly written, using async calls but not properly setting async expectations. Those were generating undefined behaviour (not clear if/when those callbacks would be executed).
- also, we wanted to call `clearAllCaches` before every test, but since some methods there are async, this doesn't work with the way `setUp` was designed. So basically sometimes before a test we could clear the cache but sometimes not, or even the clear could come while running the test which was worst
- decided to fix this by making sure after every test that we manually clear what we have added.
2017-10-20 21:14:25 +03:00
Bogdan Poplauschi 86151183f6 Switched all the tests from using https://s3.amazonaws.com/fast-image-cache/demo-images/* images which are big and sometimes fail to arrive in 5 seconds (before the test can timeout) to smaller images, basically using http://via.placeholder.com/ like http://via.placeholder.com/50x50.jpg or http://via.placeholder.com/200x200.png
This should speed up the tests a bit and also avoid some of the random failures due to timeout
2017-10-20 20:29:18 +03:00
Bogdan Poplauschi 90c90a06bc Refactored the `SDWebImageDecoderTests` a bit. Per DRY, created `verifyCoder:withLocalImageURL:isAnimatedImage:` method that will take a imageURL and a coder and will check decoding and encoding back and forth, sizes and so. Reusing this method for the static WebP image, for the animated WebP image and for the GIF. 2017-10-20 18:40:09 +03:00
Bogdan Poplauschi f57c21d52a Improved the code coverage of our unit tests (given that we disabled test40InsertionOfImageData).
Also updated the Tests Podfile so we don't get a warning (xcodeproj was renamed to project)
2017-10-20 16:15:38 +03:00
Bogdan Poplauschi 9d80374064 Merge branch 'master' into 5.x 2017-10-19 20:52:36 +03:00
Bogdan Poplauschi 05828742e8 Just disabled this test test40InsertionOfImageData - keeps failing for unknown reasons (strangely sometimes the data doesn't get written to disk) 2017-10-19 19:15:21 +03:00
Bogdan Poplauschi 324563c7d2 Merge pull request #1898 from walkline/master into 5.x
Handle storeImageDataToDisk error.
2017-10-18 13:04:07 +03:00
DreamPiggy a0879fc049 Feature: refactor decoding code and provide decoding plugin
- open the decoding/encoding procedures to the users
- switch from hardcoded decoding/encoding to pluginable decoders/encoders (builtin + user created)
- `SDWebImageCodersManager` is a singleton holding an array of `SDImageCoder` (protocol). Even though a singleton is not necesarily a good pattern, in this case it eliminates dealing with passing this array around
- uses a priority queue behind scenes, which means the latest added coders have priority.
- the priority is crucial when encoding/decoding something, we go through the list and ask each coder if they can handle the current data (see `canDecodeFromData:`, `canEncodeToFormat:`, `canIncrementallyDecodeFromData:`)
- each coder must conform to this protocol `SDImageCoder` describing all the required behavior for a coder
- we provide 3 built-in coders: `SDWebImageImageIOCoder` (for JPEG, PNG, TIFF), `SDWebImageGIFCoder` (for GIF), `SDWebImageWebPCoder` (for WebP and animated WebP)
- the user of SDWebImage can create custom coders by conforming to `SDImageCoder` and adding the coders to `SDWebImageCodersManager`. See `addCoder:` or `removeCoder:` or `coders` getter to get the array
- in order to preserve backwards compatibility, the UIImage categories were preserved, calling the new coders APIs described above
2017-10-16 19:52:18 +03:00
walkline b51e0ca689 Removing not needed functions in SDImageCache. Using DI with initializer. 2017-10-11 21:11:36 +03:00
walkline 5fbbf73986 Merge branch 'master' of github.com:rs/SDWebImage 2017-10-11 20:16:06 +03:00
Bogdan Poplauschi ff0690547d Xcode 9 recommended settings applied 2017-10-06 20:58:44 +03:00
DreamPiggy 74566aeb98 Add a test for SDWebImageRefreshCached 2017-09-23 20:34:08 +08:00
DreamPiggy 05dfa6c588 Fix clang strict prototype warning in test 2017-09-21 10:15:30 +08:00
walkline b9c17dcdd0 Merge branch 'master' of github.com:rs/SDWebImage
# Conflicts:
#	Tests/SDWebImage Tests.xcodeproj/project.pbxproj
2017-09-09 14:57:58 +03:00
skyline75489 d11597a796 Move common test logic to SDTestCase 2017-08-03 07:50:51 +08:00
Bogdan Poplauschi f6cca301d5 Merge pull request #1952 from dreampiggy/master
#1951: Fix animated WebP decoding issue, including canvas size, the support for dispose method and the duration per frame
2017-07-31 15:26:06 +03:00
Bogdan Poplauschi 637c418139 Removed unreliable check from Downloader tests - sometimes there is more than 1 download in the queue which makes the tests fail 2017-07-31 13:02:26 +03:00
DreamPiggy f3cffd0aca Add test for animated WebP image array
The image array used for +[UIImage animatedImageWithImages:] should share the same size.
2017-07-03 02:46:42 +08:00
walkline a581ab1991 Handle storeImageDataToDisk error. 2017-05-11 15:31:51 +03:00
Bogdan Poplauschi 8d1a0ae091 Added tests for the scale down decoding + test image and updated a bit the other decoder tests 2016-10-06 16:00:43 +03:00
Bogdan Poplauschi 9879ddf0dc Test xcodeproj updated to Xcode 8 2016-10-06 16:00:02 +03:00
Bogdan Poplauschi 9c0c31f524 Updated the test for FLAnimatedImage 2016-10-04 16:48:12 +03:00
Bogdan Poplauschi ed5f018c2b Fixed the tests - were failing because of the #984 changes 2016-10-01 12:40:50 +03:00
Bogdan Poplauschi 13ffb2327c Stopped the simulators from being too verbose 2016-09-30 21:07:44 +03:00
Bogdan Poplauschi 67e0719755 Update according to Xcode 8 recommended settings. Set the deployment target to iOS 8.0. No code signing. Enabled some warnings 2016-09-30 21:06:05 +03:00
Bogdan Poplauschi 1cbe54d600 Tests for the WebCache categories 2016-09-25 19:53:53 +03:00
Bogdan Poplauschi 460c2e01a1 Tests project: CocoaPods 1.1.0, dynamic frameworks, include all the code from SDWebImage (MapKit and GIF), updated imports so they work fine 2016-09-25 19:46:46 +03:00
Bogdan Poplauschi f48a133f1b Prefetcher tests 2016-09-25 15:49:33 +03:00
Bogdan Poplauschi ea0bd97d10 Tests for SDWebImageManager 2016-09-25 15:17:21 +03:00
Bogdan Poplauschi fbca6a6dc3 Removed unneded code 2016-09-25 14:57:51 +03:00