Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2361)

Unified Diff: blimp/client/feature/compositor/blimp_client_picture_cache_unittest.cc

Issue 2160363002: Move ImageSerializationProcessor code to blimp/client/core (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@split-blimp-client-core
Patch Set: fix public_deps for //blimp/test Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: blimp/client/feature/compositor/blimp_client_picture_cache_unittest.cc
diff --git a/blimp/client/feature/compositor/blimp_client_picture_cache_unittest.cc b/blimp/client/feature/compositor/blimp_client_picture_cache_unittest.cc
deleted file mode 100644
index 6a19ca1cf1e4600c820ae839fd575ccf844460f6..0000000000000000000000000000000000000000
--- a/blimp/client/feature/compositor/blimp_client_picture_cache_unittest.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "blimp/client/feature/compositor/blimp_client_picture_cache.h"
-
-#include <stdint.h>
-#include <memory>
-#include <vector>
-
-#include "blimp/test/support/compositor/picture_cache_test_support.h"
-#include "testing/gtest/include/gtest/gtest.h"
-#include "third_party/skia/include/core/SkColor.h"
-#include "third_party/skia/include/core/SkPicture.h"
-#include "third_party/skia/include/core/SkRefCnt.h"
-
-namespace blimp {
-namespace client {
-namespace {
-
-bool FakeImageDecoder(const void* input, size_t input_size, SkBitmap* bitmap) {
- return true;
-}
-
-class BlimpClientPictureCacheTest : public testing::Test {
- public:
- BlimpClientPictureCacheTest() : cache_(&FakeImageDecoder) {}
- ~BlimpClientPictureCacheTest() override = default;
-
- protected:
- BlimpClientPictureCache cache_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BlimpClientPictureCacheTest);
-};
-
-TEST_F(BlimpClientPictureCacheTest, TwoSkPicturesInCache) {
- sk_sp<const SkPicture> picture1 = CreateSkPicture(SK_ColorBLUE);
- sk_sp<const SkPicture> picture2 = CreateSkPicture(SK_ColorRED);
- cc::PictureData picture1_data = CreatePictureData(picture1);
- cc::PictureData picture2_data = CreatePictureData(picture2);
-
- std::vector<cc::PictureData> cache_update;
- cache_update.push_back(picture1_data);
- cache_update.push_back(picture2_data);
-
- cache_.ApplyCacheUpdate(cache_update);
-
- cache_.MarkUsed(picture1->uniqueID());
- cache_.MarkUsed(picture2->uniqueID());
-
- sk_sp<const SkPicture> cached_picture1 =
- cache_.GetPicture(picture1->uniqueID());
- EXPECT_NE(nullptr, cached_picture1);
- EXPECT_EQ(GetBlobId(picture1), GetBlobId(cached_picture1));
- sk_sp<const SkPicture> cached_picture2 =
- cache_.GetPicture(picture2->uniqueID());
- EXPECT_NE(nullptr, cached_picture2);
- EXPECT_EQ(GetBlobId(picture2), GetBlobId(cached_picture2));
-
- cache_.Flush();
-}
-
-} // namespace
-} // namespace client
-} // namespace blimp

Powered by Google App Engine
This is Rietveld 408576698