#include "cc/tiles/image_controller.h"
#include <memory>
#include <optional>
#include <utility>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/run_loop.h"
#include "base/synchronization/condition_variable.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/thread_pool.h"
#include "base/threading/simple_thread.h"
#include "base/threading/thread_checker_impl.h"
#include "base/threading/thread_restrictions.h"
#include "cc/paint/paint_image_builder.h"
#include "cc/test/cc_test_suite.h"
#include "cc/test/skia_common.h"
#include "cc/test/stub_decode_cache.h"
#include "cc/test/test_paint_worklet_input.h"
#include "cc/tiles/image_decode_cache.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace cc {
namespace {
class TestableCache : public StubDecodeCache { … };
class DecodeClient { … };
class SimpleTask : public TileTask { … };
class BlockingTask : public TileTask { … };
int kDefaultTimeoutSeconds = …;
DrawImage CreateDiscardableDrawImage(gfx::Size size) { … }
DrawImage CreateBitmapDrawImage(gfx::Size size) { … }
class ImageControllerTest : public testing::Test { … };
TEST_F(ImageControllerTest, NullControllerUnrefsImages) { … }
TEST_F(ImageControllerTest, QueueImageDecode) { … }
TEST_F(ImageControllerTest, QueueImageDecodeNonLazy) { … }
TEST_F(ImageControllerTest, QueueImageDecodeTooLarge) { … }
TEST_F(ImageControllerTest, QueueImageDecodeMultipleImages) { … }
TEST_F(ImageControllerTest, QueueImageDecodeWithTask) { … }
TEST_F(ImageControllerTest, QueueImageDecodeMultipleImagesSameTask) { … }
TEST_F(ImageControllerTest, QueueImageDecodeChangeControllerWithTaskQueued) { … }
TEST_F(ImageControllerTest, QueueImageDecodeImageAlreadyLocked) { … }
TEST_F(ImageControllerTest, QueueImageDecodeLockedImageControllerChange) { … }
TEST_F(ImageControllerTest, DispatchesDecodeCallbacksAfterCacheReset) { … }
TEST_F(ImageControllerTest, DispatchesDecodeCallbacksAfterCacheChanged) { … }
TEST_F(ImageControllerTest, QueueImageDecodeLazyCancelImmediately) { … }
TEST_F(ImageControllerTest, QueueImageDecodeNonLazyCancelImmediately) { … }
}
}