1 // Copyright 2018 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. 4 5 #ifndef COMPONENTS_IMAGE_FETCHER_CORE_MOCK_IMAGE_DECODER_H_ 6 #define COMPONENTS_IMAGE_FETCHER_CORE_MOCK_IMAGE_DECODER_H_ 7 8 #include "base/callback.h" 9 #include "components/image_fetcher/core/image_decoder.h" 10 #include "testing/gmock/include/gmock/gmock.h" 11 12 namespace image_fetcher { 13 14 class MockImageDecoder : public image_fetcher::ImageDecoder { 15 public: 16 MockImageDecoder(); 17 ~MockImageDecoder() override; 18 MOCK_METHOD3(DecodeImage, 19 void(const std::string& image_data, 20 const gfx::Size& desired_image_frame_size, 21 image_fetcher::ImageDecodedCallback callback)); 22 }; 23 24 } // namespace image_fetcher 25 26 #endif // COMPONENTS_IMAGE_FETCHER_CORE_MOCK_IMAGE_DECODER_H_ 27