OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "platform/image-decoders/ImageDecoderTestHelpers.h" | 5 #include "platform/image-decoders/ImageDecoderTestHelpers.h" |
6 | 6 |
| 7 #include <memory> |
7 #include "platform/SharedBuffer.h" | 8 #include "platform/SharedBuffer.h" |
8 #include "platform/image-decoders/ImageFrame.h" | 9 #include "platform/image-decoders/ImageFrame.h" |
9 #include "platform/testing/UnitTestHelpers.h" | 10 #include "platform/testing/UnitTestHelpers.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
11 #include "wtf/StringHasher.h" | 12 #include "wtf/StringHasher.h" |
12 #include "wtf/text/StringBuilder.h" | 13 #include "wtf/text/StringBuilder.h" |
13 #include <memory> | |
14 | 14 |
15 namespace blink { | 15 namespace blink { |
16 | 16 |
17 PassRefPtr<SharedBuffer> readFile(const char* fileName) { | 17 PassRefPtr<SharedBuffer> readFile(const char* fileName) { |
18 String filePath = testing::blinkRootDir(); | 18 String filePath = testing::blinkRootDir(); |
19 filePath.append(fileName); | 19 filePath.append(fileName); |
20 return testing::readFromFile(filePath); | 20 return testing::readFromFile(filePath); |
21 } | 21 } |
22 | 22 |
23 PassRefPtr<SharedBuffer> readFile(const char* dir, const char* fileName) { | 23 PassRefPtr<SharedBuffer> readFile(const char* dir, const char* fileName) { |
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 size_t frameCount = decoderA->frameCount(); | 569 size_t frameCount = decoderA->frameCount(); |
570 ASSERT_EQ(frameCount, decoderB->frameCount()); | 570 ASSERT_EQ(frameCount, decoderB->frameCount()); |
571 | 571 |
572 for (size_t i = 0; i < frameCount; ++i) { | 572 for (size_t i = 0; i < frameCount; ++i) { |
573 verifyFramesMatch(file, decoderA->frameBufferAtIndex(i), | 573 verifyFramesMatch(file, decoderA->frameBufferAtIndex(i), |
574 decoderB->frameBufferAtIndex(i)); | 574 decoderB->frameBufferAtIndex(i)); |
575 } | 575 } |
576 } | 576 } |
577 | 577 |
578 } // namespace blink | 578 } // namespace blink |
OLD | NEW |