Merge pull request #1 from SDWebImage/master

Update the test cases with new WebP sample URLs
This commit is contained in:
Antti Kortetmaa 2020-12-11 12:02:58 +02:00 committed by GitHub
commit e252beb187
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ const int64_t kAsyncTestTimeout = 5;
- (void)test01ThatWEBPWorks { - (void)test01ThatWEBPWorks {
XCTestExpectation *expectation = [self expectationWithDescription:@"WEBP"]; XCTestExpectation *expectation = [self expectationWithDescription:@"WEBP"];
NSURL *imageURL = [NSURL URLWithString:@"http://www.ioncannon.net/wp-content/uploads/2011/06/test2.webp"]; NSURL *imageURL = [NSURL URLWithString:@"https://www.gstatic.com/webp/gallery3/1_webp_ll.png"];
[[SDWebImageDownloader sharedDownloader] downloadImageWithURL:imageURL options:0 progress:nil completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, BOOL finished) { [[SDWebImageDownloader sharedDownloader] downloadImageWithURL:imageURL options:0 progress:nil completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, BOOL finished) {
if (image && data && !error && finished) { if (image && data && !error && finished) {
[expectation fulfill]; [expectation fulfill];
@ -57,7 +57,7 @@ const int64_t kAsyncTestTimeout = 5;
- (void)test02ThatProgressiveWebPWorks { - (void)test02ThatProgressiveWebPWorks {
XCTestExpectation *expectation = [self expectationWithDescription:@"Progressive WebP download"]; XCTestExpectation *expectation = [self expectationWithDescription:@"Progressive WebP download"];
NSURL *imageURL = [NSURL URLWithString:@"http://www.ioncannon.net/wp-content/uploads/2011/06/test9.webp"]; NSURL *imageURL = [NSURL URLWithString:@"https://www.gstatic.com/webp/gallery3/3_webp_ll.png"];
[[SDWebImageDownloader sharedDownloader] downloadImageWithURL:imageURL options:SDWebImageDownloaderProgressiveLoad progress:nil completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, BOOL finished) { [[SDWebImageDownloader sharedDownloader] downloadImageWithURL:imageURL options:SDWebImageDownloaderProgressiveLoad progress:nil completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, BOOL finished) {
if (image && data && !error && finished) { if (image && data && !error && finished) {
[expectation fulfill]; [expectation fulfill];