Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(473)

Side by Side Diff: components/image_fetcher/ios/ios_image_data_fetcher_wrapper_unittest.mm

Issue 2699633006: Move WebpDecoder from ios/web to components/image_fetcher (Closed)
Patch Set: Separate header Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "components/image_fetcher/ios/ios_image_data_fetcher_wrapper.h" 5 #import "components/image_fetcher/ios/ios_image_data_fetcher_wrapper.h"
6 6
7 #import <UIKit/UIKit.h> 7 #import <UIKit/UIKit.h>
8 8
9 #include "base/ios/ios_util.h" 9 #include "base/ios/ios_util.h"
10 #include "base/mac/scoped_block.h" 10 #include "base/mac/scoped_block.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ptr_util.h" 12 #include "base/memory/ptr_util.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/run_loop.h" 14 #include "base/run_loop.h"
15 #include "base/threading/thread.h" 15 #include "base/threading/thread.h"
16 #include "base/threading/thread_task_runner_handle.h" 16 #include "base/threading/thread_task_runner_handle.h"
17 #include "build/build_config.h" 17 #include "build/build_config.h"
18 #import "ios/web/public/image_fetcher/webp_decoder.h" 18 #import "components/image_fetcher/ios/webp_decoder.h"
19 #include "net/http/http_response_headers.h" 19 #include "net/http/http_response_headers.h"
20 #include "net/url_request/test_url_fetcher_factory.h" 20 #include "net/url_request/test_url_fetcher_factory.h"
21 #include "net/url_request/url_fetcher_delegate.h" 21 #include "net/url_request/url_fetcher_delegate.h"
22 #include "net/url_request/url_request_test_util.h" 22 #include "net/url_request/url_request_test_util.h"
23 #include "testing/gtest/include/gtest/gtest.h" 23 #include "testing/gtest/include/gtest/gtest.h"
24 #include "testing/platform_test.h" 24 #include "testing/platform_test.h"
25 25
26 #if !defined(__has_feature) || !__has_feature(objc_arc) 26 #if !defined(__has_feature) || !__has_feature(objc_arc)
27 #error "This file requires ARC support." 27 #error "This file requires ARC support."
28 #endif 28 #endif
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 EXPECT_TRUE(called_); 219 EXPECT_TRUE(called_);
220 } 220 }
221 221
222 TEST_F(IOSImageDataFetcherWrapperTest, TestCallbacksNotCalledDuringDeletion) { 222 TEST_F(IOSImageDataFetcherWrapperTest, TestCallbacksNotCalledDuringDeletion) {
223 image_fetcher_->FetchImageDataWebpDecoded(GURL(kTestUrl), callback_); 223 image_fetcher_->FetchImageDataWebpDecoded(GURL(kTestUrl), callback_);
224 image_fetcher_.reset(); 224 image_fetcher_.reset();
225 EXPECT_FALSE(called_); 225 EXPECT_FALSE(called_);
226 } 226 }
227 227
228 } // namespace image_fetcher 228 } // namespace image_fetcher
OLDNEW
« no previous file with comments | « components/image_fetcher/ios/ios_image_data_fetcher_wrapper.mm ('k') | components/image_fetcher/ios/webp_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698