OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 #include "ios/web/public/image_fetcher/webp_decoder.h" | 5 #import "ios/web/public/image_fetcher/webp_decoder.h" |
6 | 6 |
7 #import <CoreGraphics/CoreGraphics.h> | 7 #import <CoreGraphics/CoreGraphics.h> |
8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
9 #include <stddef.h> | 9 #include <stddef.h> |
10 #include <stdint.h> | 10 #include <stdint.h> |
11 | 11 |
12 #include <memory> | 12 #include <memory> |
13 | 13 |
14 #include "base/base_paths.h" | 14 #include "base/base_paths.h" |
15 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
16 #include "base/ios/ios_util.h" | 16 #include "base/ios/ios_util.h" |
17 #include "base/logging.h" | 17 #include "base/logging.h" |
18 #include "base/mac/scoped_cftyperef.h" | 18 #include "base/mac/scoped_cftyperef.h" |
19 #include "base/mac/scoped_nsobject.h" | 19 #import "base/mac/scoped_nsobject.h" |
20 #include "base/macros.h" | 20 #include "base/macros.h" |
21 #include "base/memory/ref_counted.h" | 21 #include "base/memory/ref_counted.h" |
22 #include "base/path_service.h" | 22 #include "base/path_service.h" |
23 #include "base/strings/sys_string_conversions.h" | 23 #include "base/strings/sys_string_conversions.h" |
24 #include "build/build_config.h" | 24 #include "build/build_config.h" |
25 #include "testing/gmock/include/gmock/gmock.h" | 25 #include "testing/gmock/include/gmock/gmock.h" |
26 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
27 | 27 |
28 #if !defined(__has_feature) || !__has_feature(objc_arc) | 28 #if !defined(__has_feature) || !__has_feature(objc_arc) |
29 #error "This file requires ARC support." | 29 #error "This file requires ARC support." |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 EXPECT_EQ(0u, [delegate_->GetImage() length]); | 287 EXPECT_EQ(0u, [delegate_->GetImage() length]); |
288 } | 288 } |
289 | 289 |
290 TEST_F(WebpDecoderTest, DecodeAborted) { | 290 TEST_F(WebpDecoderTest, DecodeAborted) { |
291 EXPECT_CALL(*delegate_, OnFinishedDecoding(false)).Times(1); | 291 EXPECT_CALL(*delegate_, OnFinishedDecoding(false)).Times(1); |
292 decoder_->Stop(); | 292 decoder_->Stop(); |
293 EXPECT_EQ(0u, [delegate_->GetImage() length]); | 293 EXPECT_EQ(0u, [delegate_->GetImage() length]); |
294 } | 294 } |
295 | 295 |
296 } // namespace webp_transcode | 296 } // namespace webp_transcode |
OLD | NEW |