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

Unified Diff: blimp/engine/renderer/blimp_engine_picture_cache_unittest.cc

Issue 2629743003: Remove all blimp engine code (Closed)
Patch Set: Use consistent comment style in //chrome Created 3 years, 11 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/engine/renderer/blimp_engine_picture_cache_unittest.cc
diff --git a/blimp/engine/renderer/blimp_engine_picture_cache_unittest.cc b/blimp/engine/renderer/blimp_engine_picture_cache_unittest.cc
deleted file mode 100644
index 1c76ca441a8df8923e0942e07811018706f36e38..0000000000000000000000000000000000000000
--- a/blimp/engine/renderer/blimp_engine_picture_cache_unittest.cc
+++ /dev/null
@@ -1,60 +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/engine/renderer/blimp_engine_picture_cache.h"
-
-#include "blimp/test/support/compositor/picture_cache_test_support.h"
-#include "testing/gmock/include/gmock/gmock.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 engine {
-namespace {
-
-class BlimpEnginePictureCacheTest : public testing::Test {
- public:
- BlimpEnginePictureCacheTest() : cache_(nullptr) {}
- ~BlimpEnginePictureCacheTest() override = default;
-
- protected:
- BlimpEnginePictureCache cache_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BlimpEnginePictureCacheTest);
-};
-
-TEST_F(BlimpEnginePictureCacheTest, TwoCachedPicturesCanBeRetrieved) {
- EXPECT_TRUE(cache_.CalculateCacheUpdateAndFlush().empty());
-
- sk_sp<const SkPicture> picture1 = CreateSkPicture(SK_ColorBLUE);
- cache_.MarkUsed(picture1.get());
- sk_sp<const SkPicture> picture2 = CreateSkPicture(SK_ColorRED);
- cache_.MarkUsed(picture2.get());
-
- std::vector<cc::PictureData> update = cache_.CalculateCacheUpdateAndFlush();
- ASSERT_EQ(2U, update.size());
- EXPECT_THAT(update, testing::UnorderedElementsAre(PictureMatches(picture1),
- PictureMatches(picture2)));
-
- EXPECT_TRUE(cache_.CalculateCacheUpdateAndFlush().empty());
-}
-
-TEST_F(BlimpEnginePictureCacheTest, SamePictureOnlyReturnedOnce) {
- EXPECT_TRUE(cache_.CalculateCacheUpdateAndFlush().empty());
-
- sk_sp<const SkPicture> picture = CreateSkPicture(SK_ColorBLUE);
- cache_.MarkUsed(picture.get());
- cache_.MarkUsed(picture.get());
-
- std::vector<cc::PictureData> update = cache_.CalculateCacheUpdateAndFlush();
- ASSERT_EQ(1U, update.size());
- EXPECT_THAT(update, testing::UnorderedElementsAre(PictureMatches(picture)));
-}
-
-} // namespace
-} // namespace engine
-} // namespace blimp
« no previous file with comments | « blimp/engine/renderer/blimp_engine_picture_cache.cc ('k') | blimp/engine/renderer/blimp_remote_compositor_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698