chromium/third_party/blink/renderer/platform/graphics/paint/paint_controller_test.cc

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/renderer/platform/graphics/paint/paint_controller_test.h"

#include "build/build_config.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "third_party/blink/renderer/platform/graphics/graphics_context.h"
#include "third_party/blink/renderer/platform/graphics/paint/display_item_cache_skipper.h"
#include "third_party/blink/renderer/platform/graphics/paint/drawing_display_item.h"
#include "third_party/blink/renderer/platform/graphics/paint/drawing_recorder.h"
#include "third_party/blink/renderer/platform/graphics/paint/scoped_display_item_fragment.h"
#include "third_party/blink/renderer/platform/graphics/paint/scoped_paint_chunk_properties.h"
#include "third_party/blink/renderer/platform/graphics/paint/subsequence_recorder.h"
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
#include "third_party/blink/renderer/platform/testing/paint_test_configurations.h"

ElementsAre;

namespace blink {

PaintControllerTestBase::DrawResult PaintControllerTestBase::Draw(
    GraphicsContext& context,
    const DisplayItemClient& client,
    DisplayItem::Type type,
    base::FunctionRef<void()> draw_function) {}

// Tests using this class will be tested with under-invalidation-checking
// enabled and disabled.
class PaintControllerTest : public PaintTestConfigurations,
                            public PaintControllerTestBase {};

#define EXPECT_DEFAULT_ROOT_CHUNK(size)

INSTANTIATE_TEST_SUITE_P();
TEST_P(PaintControllerTest, NestedRecorders) {}

TEST_P(PaintControllerTest, UpdateBasic) {}

TEST_P(PaintControllerTest, UpdateSwapOrder) {}

TEST_P(PaintControllerTest, UpdateSwapOrderWithInvalidation) {}

TEST_P(PaintControllerTest, UpdateNewItemInMiddle) {}

TEST_P(PaintControllerTest, UpdateInvalidationWithPhases) {}

TEST_P(PaintControllerTest, UpdateAddFirstOverlap) {}

TEST_P(PaintControllerTest, UpdateAddLastOverlap) {}

TEST_P(PaintControllerTest, CachedDisplayItems) {}

TEST_P(PaintControllerTest, UpdateSwapOrderWithChildren) {}

TEST_P(PaintControllerTest, UpdateSwapOrderWithChildrenAndInvalidation) {}

TEST_P(PaintControllerTest, CachedSubsequenceForcePaintChunk) {}

TEST_P(PaintControllerTest, CachedSubsequenceSwapOrder) {}

TEST_P(PaintControllerTest, CachedSubsequenceAndDisplayItemsSwapOrder) {}

TEST_P(PaintControllerTest, DisplayItemSwapOrderBeforeCachedSubsequence) {}

TEST_P(PaintControllerTest, CachedSubsequenceContainingFragments) {}

TEST_P(PaintControllerTest, UpdateSwapOrderCrossingChunks) {}

TEST_P(PaintControllerTest, OutOfOrderNoCrash) {}

TEST_P(PaintControllerTest, CachedNestedSubsequenceUpdate) {}

TEST_P(PaintControllerTest, CachedNestedSubsequenceKeepingDescendants) {}

TEST_P(PaintControllerTest, SkipCache) {}

TEST_P(PaintControllerTest, PartialSkipCache) {}

TEST_P(PaintControllerTest, SkipCacheDuplicatedItemAndChunkIds) {}

TEST_P(PaintControllerTest, SmallPaintControllerHasOnePaintChunk) {}
void DrawPath(GraphicsContext& context,
              DisplayItemClient& client,
              DisplayItem::Type type,
              unsigned count) {}

TEST_P(PaintControllerTest, BeginAndEndFrame) {}

TEST_P(PaintControllerTest, InsertValidItemInFront) {}

TEST_P(PaintControllerTest, TransientPaintControllerIncompleteCycle) {}

TEST_P(PaintControllerTest, AllowDuplicatedIdForTransientPaintController) {}

TEST_P(PaintControllerTest, AllowDuplicatedIdForUncacheableItem) {}

TEST_P(PaintControllerTest, RecordRegionCaptureDataValidData) {}

// Death tests don't work properly on Android.
#if defined(GTEST_HAS_DEATH_TEST) && !BUILDFLAG(IS_ANDROID)

TEST_P(PaintControllerTest, RecordRegionCaptureDataEmptyToken) {}

TEST_P(PaintControllerTest, DuplicatedSubsequences) {}

TEST_P(PaintControllerTest, DeletedClientInUnderInvalidatedSubsequence) {}

#endif  // defined(GTEST_HAS_DEATH_TEST) && !BUILDFLAG(IS_ANDROID)

}  // namespace blink