OLD | NEW |
1 // Copyright (c) 2008, Google Inc. | 1 // Copyright (c) 2008, Google Inc. |
2 // All rights reserved. | 2 // 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 16 matching lines...) Expand all Loading... |
27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 | 29 |
30 #include "config.h" | 30 #include "config.h" |
31 #include "webkit/tools/test_shell/image_decoder_unittest.h" | 31 #include "webkit/tools/test_shell/image_decoder_unittest.h" |
32 | 32 |
33 #include "BMPImageDecoder.h" | 33 #include "BMPImageDecoder.h" |
34 | 34 |
35 class BMPImageDecoderTest : public ImageDecoderTest { | 35 class BMPImageDecoderTest : public ImageDecoderTest { |
36 public: | 36 public: |
37 BMPImageDecoderTest() : ImageDecoderTest("bmp") { } | 37 BMPImageDecoderTest() : ImageDecoderTest(L"bmp") { } |
38 | 38 |
39 protected: | 39 protected: |
40 virtual WebCore::ImageDecoder* CreateDecoder() const { | 40 virtual WebCore::ImageDecoder* CreateDecoder() const { |
41 return new WebCore::BMPImageDecoder(); | 41 return new WebCore::BMPImageDecoder(); |
42 } | 42 } |
43 | 43 |
44 // The BMPImageDecoderTest tests are really slow under Valgrind. | 44 // The BMPImageDecoderTest tests are really slow under Valgrind. |
45 // Thus it is split into fast and slow versions. The threshold is | 45 // Thus it is split into fast and slow versions. The threshold is |
46 // set to 10KB because the fast test can finish under Valgrind in | 46 // set to 10KB because the fast test can finish under Valgrind in |
47 // less than 30 seconds. | 47 // less than 30 seconds. |
(...skipping 10 matching lines...) Expand all Loading... |
58 | 58 |
59 #ifndef CALCULATE_MD5_SUMS | 59 #ifndef CALCULATE_MD5_SUMS |
60 TEST_F(BMPImageDecoderTest, ChunkedDecodingFast) { | 60 TEST_F(BMPImageDecoderTest, ChunkedDecodingFast) { |
61 TestChunkedDecoding(TEST_SMALLER, kThresholdSize); | 61 TestChunkedDecoding(TEST_SMALLER, kThresholdSize); |
62 } | 62 } |
63 | 63 |
64 TEST_F(BMPImageDecoderTest, ChunkedDecodingSlow) { | 64 TEST_F(BMPImageDecoderTest, ChunkedDecodingSlow) { |
65 TestChunkedDecoding(TEST_BIGGER, kThresholdSize); | 65 TestChunkedDecoding(TEST_BIGGER, kThresholdSize); |
66 } | 66 } |
67 #endif | 67 #endif |
OLD | NEW |