| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013, Google Inc. All rights reserved. | 2 * Copyright (c) 2013, Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 FakeImageObserver() | 52 FakeImageObserver() |
| 53 : last_decoded_size_(0), last_decoded_size_changed_delta_(0) {} | 53 : last_decoded_size_(0), last_decoded_size_changed_delta_(0) {} |
| 54 | 54 |
| 55 virtual void DecodedSizeChangedTo(const Image*, size_t new_size) { | 55 virtual void DecodedSizeChangedTo(const Image*, size_t new_size) { |
| 56 last_decoded_size_changed_delta_ = | 56 last_decoded_size_changed_delta_ = |
| 57 SafeCast<int>(new_size) - SafeCast<int>(last_decoded_size_); | 57 SafeCast<int>(new_size) - SafeCast<int>(last_decoded_size_); |
| 58 last_decoded_size_ = new_size; | 58 last_decoded_size_ = new_size; |
| 59 } | 59 } |
| 60 bool ShouldPauseAnimation(const Image*) override { return false; } | 60 bool ShouldPauseAnimation(const Image*) override { return false; } |
| 61 void AnimationAdvanced(const Image*) override {} | 61 void AnimationAdvanced(const Image*) override {} |
| 62 void AsyncLoadCompleted(const Image*) override { NOTREACHED(); } |
| 62 | 63 |
| 63 virtual void ChangedInRect(const Image*, const IntRect&) {} | 64 virtual void ChangedInRect(const Image*, const IntRect&) {} |
| 64 | 65 |
| 65 size_t last_decoded_size_; | 66 size_t last_decoded_size_; |
| 66 int last_decoded_size_changed_delta_; | 67 int last_decoded_size_changed_delta_; |
| 67 }; | 68 }; |
| 68 | 69 |
| 69 static PassRefPtr<SharedBuffer> ReadFile(const char* file_name) { | 70 static PassRefPtr<SharedBuffer> ReadFile(const char* file_name) { |
| 70 String file_path = testing::BlinkRootDir(); | 71 String file_path = testing::BlinkRootDir(); |
| 71 file_path.append(file_name); | 72 file_path.append(file_name); |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 kOriginRightBottom}, | 328 kOriginRightBottom}, |
| 328 {"/LayoutTests/images/resources/exif-orientation-8-llo.jpg", | 329 {"/LayoutTests/images/resources/exif-orientation-8-llo.jpg", |
| 329 kOriginLeftBottom}}; | 330 kOriginLeftBottom}}; |
| 330 | 331 |
| 331 INSTANTIATE_TEST_CASE_P( | 332 INSTANTIATE_TEST_CASE_P( |
| 332 DecodedImageOrientationHistogramTest, | 333 DecodedImageOrientationHistogramTest, |
| 333 DecodedImageOrientationHistogramTest, | 334 DecodedImageOrientationHistogramTest, |
| 334 ::testing::ValuesIn(kDecodedImageOrientationHistogramTestParams)); | 335 ::testing::ValuesIn(kDecodedImageOrientationHistogramTestParams)); |
| 335 | 336 |
| 336 } // namespace blink | 337 } // namespace blink |
| OLD | NEW |