Assume the foo_test_run depends on everything needed to run the test.
[chromium-blink-merge.git] / content / renderer / bmp_image_decoder_unittest.cc
bloba2491263615979fcfb77d572a4bea49394e76f3f
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "content/test/image_decoder_test.h"
6 #include "third_party/WebKit/public/web/WebImageDecoder.h"
8 class BMPImageDecoderTest : public ImageDecoderTest {
9 public:
10 BMPImageDecoderTest() : ImageDecoderTest("bmp") { }
12 protected:
13 virtual blink::WebImageDecoder* CreateWebKitImageDecoder() const OVERRIDE {
14 return new blink::WebImageDecoder(blink::WebImageDecoder::TypeBMP);
17 // The BMPImageDecoderTest tests are really slow under Valgrind.
18 // Thus it is split into fast and slow versions. The threshold is
19 // set to 10KB because the fast test can finish under Valgrind in
20 // less than 30 seconds.
21 static const int64 kThresholdSize = 10240;
24 TEST_F(BMPImageDecoderTest, DecodingFast) {
25 TestDecoding(TEST_SMALLER, kThresholdSize);
28 #if defined(THREAD_SANITIZER)
29 // BMPImageDecoderTest.DecodingSlow always times out under ThreadSanitizer v2.
30 #define MAYBE_DecodingSlow DISABLED_DecodingSlow
31 #else
32 #define MAYBE_DecodingSlow DecodingSlow
33 #endif
34 TEST_F(BMPImageDecoderTest, MAYBE_DecodingSlow) {
35 TestDecoding(TEST_BIGGER, kThresholdSize);