chromium/third_party/blink/renderer/core/paint/paint_layer_test.cc

// Copyright 2016 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/core/paint/paint_layer.h"

#include "testing/gmock/include/gmock/gmock.h"
#include "third_party/blink/renderer/core/dom/pseudo_element.h"
#include "third_party/blink/renderer/core/events/mouse_event.h"
#include "third_party/blink/renderer/core/html/html_iframe_element.h"
#include "third_party/blink/renderer/core/layout/hit_test_location.h"
#include "third_party/blink/renderer/core/layout/layout_box_model_object.h"
#include "third_party/blink/renderer/core/layout/layout_view.h"
#include "third_party/blink/renderer/core/page/page_animator.h"
#include "third_party/blink/renderer/core/paint/paint_controller_paint_test.h"
#include "third_party/blink/renderer/core/paint/paint_layer_paint_order_iterator.h"
#include "third_party/blink/renderer/core/paint/paint_layer_scrollable_area.h"
#include "third_party/blink/renderer/core/testing/core_unit_test_helper.h"
#include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"

namespace blink {

ElementsAre;
Pointee;

class PaintLayerTest : public PaintControllerPaintTest {};

INSTANTIATE_PAINT_TEST_SUITE_P();

TEST_P(PaintLayerTest, ChildWithoutPaintLayer) {}

TEST_P(PaintLayerTest, RootLayerScrollBounds) {}

TEST_P(PaintLayerTest, CompositedScrollingNoNeedsRepaint) {}

TEST_P(PaintLayerTest, NonCompositedScrollingNeedsRepaint) {}

TEST_P(PaintLayerTest, HasNonIsolatedDescendantWithBlendMode) {}

TEST_P(PaintLayerTest, HasFixedPositionDescendant) {}

TEST_P(PaintLayerTest, HasNonContainedAbsolutePositionDescendant) {}

TEST_P(PaintLayerTest, HasSelfPaintingDescendant) {}

TEST_P(PaintLayerTest, HasSelfPaintingDescendantNotSelfPainting) {}

TEST_P(PaintLayerTest, HasSelfPaintingParentNotSelfPainting) {}

static const HeapVector<Member<PaintLayer>>*
LayersPaintingOverlayOverflowControlsAfter(const PaintLayer* layer) {}

// We need new enum and class to test the overlay overflow controls reordering,
// but we don't move the tests related to the new class to the bottom, which is
// behind all tests of the PaintLayerTest. Because it will make the git history
// hard to track.
enum OverlayType {};

class ReorderOverlayOverflowControlsTest
    : public testing::WithParamInterface<OverlayType>,
      public PaintControllerPaintTestBase {};

INSTANTIATE_TEST_SUITE_P();

TEST_P(ReorderOverlayOverflowControlsTest, StackedWithInFlowDescendant) {}

TEST_P(ReorderOverlayOverflowControlsTest, StackedWithOutOfFlowDescendant) {}

TEST_P(ReorderOverlayOverflowControlsTest, StackedWithZIndexDescendant) {}

TEST_P(ReorderOverlayOverflowControlsTest,
       NestedStackedWithInFlowStackedChild) {}

TEST_P(ReorderOverlayOverflowControlsTest,
       NestedStackedWithOutOfFlowStackedChild) {}

TEST_P(ReorderOverlayOverflowControlsTest, MultipleChildren) {}

TEST_P(ReorderOverlayOverflowControlsTest, NonStackedWithInFlowDescendant) {}

TEST_P(ReorderOverlayOverflowControlsTest,
       NonStackedWithZIndexInFlowDescendant) {}

TEST_P(ReorderOverlayOverflowControlsTest, NonStackedWithOutOfFlowDescendant) {}

TEST_P(ReorderOverlayOverflowControlsTest, NonStackedWithNonStackedDescendant) {}

TEST_P(ReorderOverlayOverflowControlsTest,
       NestedNonStackedWithInFlowStackedChild) {}

TEST_P(ReorderOverlayOverflowControlsTest,
       NestedNonStackedWithOutOfFlowStackedChild) {}

TEST_P(ReorderOverlayOverflowControlsTest,
       AdjustAccessingOrderForSubtreeHighestLayers) {}

TEST_P(ReorderOverlayOverflowControlsTest, AddRemoveScrollableArea) {}

TEST_P(ReorderOverlayOverflowControlsTest, AddRemoveStackedChild) {}

TEST_P(PaintLayerTest, SubsequenceCachingStackedLayers) {}

TEST_P(PaintLayerTest, SubsequenceCachingSVG) {}

TEST_P(PaintLayerTest, SubsequenceCachingMuticol) {}

TEST_P(PaintLayerTest, NegativeZIndexChangeToPositive) {}

TEST_P(PaintLayerTest, HasVisibleSelfPaintingDescendant) {}

TEST_P(PaintLayerTest, Has3DTransformedDescendant) {}

TEST_P(PaintLayerTest, Has3DTransformedDescendantChangeStyle) {}

TEST_P(PaintLayerTest, Has3DTransformedDescendantNotStacking) {}

TEST_P(PaintLayerTest, Has3DTransformedGrandchildWithPreserve3d) {}

TEST_P(PaintLayerTest, DescendantDependentFlagsStopsAtThrottledFrames) {}

TEST_P(PaintLayerTest, CompositingContainerStackedFloatUnderStackingInline) {}

TEST_P(PaintLayerTest, CompositingContainerColumnSpanAll) {}

TEST_P(PaintLayerTest,
       CompositingContainerStackedFloatUnderStackingCompositedInline) {}

TEST_P(PaintLayerTest, CompositingContainerNonStackedFloatUnderStackingInline) {}

TEST_P(PaintLayerTest,
       CompositingContainerNonStackedFloatUnderStackingCompositedInline) {}

TEST_P(PaintLayerTest,
       CompositingContainerStackedUnderFloatUnderStackingInline) {}

TEST_P(PaintLayerTest,
       CompositingContainerStackedUnderFloatUnderStackingCompositedInline) {}

TEST_P(PaintLayerTest,
       CompositingContainerNonStackedUnderFloatUnderStackingInline) {}

TEST_P(PaintLayerTest,
       CompositingContainerNonStackedUnderFloatUnderStackingCompositedInline) {}

TEST_P(PaintLayerTest, FloatLayerAndAbsoluteUnderInlineLayer) {}

TEST_P(PaintLayerTest, FloatLayerUnderInlineLayerScrolled) {}

TEST_P(PaintLayerTest, FloatLayerUnderBlockUnderInlineLayer) {}

TEST_P(PaintLayerTest, FloatLayerUnderFloatUnderInlineLayer) {}

TEST_P(PaintLayerTest, FloatLayerUnderFloatLayerUnderInlineLayer) {}

TEST_P(PaintLayerTest, LayerUnderFloatUnderInlineLayer) {}

TEST_P(PaintLayerTest, CompositingContainerFloatingIframe) {}

TEST_P(PaintLayerTest, ColumnSpanLayerUnderExtraLayerScrolled) {}

TEST_P(PaintLayerTest, PaintLayerTransformUpdatedOnStyleTransformAnimation) {}

TEST_P(PaintLayerTest, NeedsRepaintOnSelfPaintingStatusChange) {}

TEST_P(PaintLayerTest, NeedsRepaintOnRemovingStackedLayer) {}

TEST_P(PaintLayerTest, FrameViewContentSize) {}

TEST_P(PaintLayerTest, ReferenceClipPathWithPageZoom) {}

TEST_P(PaintLayerTest, FragmentedHitTest) {}

TEST_P(PaintLayerTest, HitTestWithIgnoreClipping) {}

TEST_P(PaintLayerTest, HitTestWithStopNode) {}

TEST_P(PaintLayerTest, HitTestTableWithStopNode) {}

TEST_P(PaintLayerTest, HitTestSVGWithStopNode) {}

TEST_P(PaintLayerTest, SetNeedsRepaintSelfPaintingUnderNonSelfPainting) {}

TEST_P(PaintLayerTest, HitTestPseudoElementWithContinuation) {}

TEST_P(PaintLayerTest, HitTestFirstLetterPseudoElement) {}

TEST_P(PaintLayerTest, HitTestFirstLetterInBeforePseudoElement) {}

TEST_P(PaintLayerTest, HitTestFloatInsideInlineBoxContainer) {}

TEST_P(PaintLayerTest, HitTestFirstLetterPseudoElementDisplayContents) {}

TEST_P(PaintLayerTest, HitTestOverlayResizer) {}

TEST_P(PaintLayerTest, HitTestScrollbarUnderClip) {}

TEST_P(PaintLayerTest, HitTestPerspectiveBackfaceHiddenNotInverted) {}

TEST_P(PaintLayerTest, HitTestObscuredOverlayScrollbar) {}

TEST_P(PaintLayerTest, InlineWithBackdropFilterHasPaintLayer) {}

TEST_P(PaintLayerTest, GlobalRootScrollerHitTest) {}

TEST_P(PaintLayerTest, HitTestTinyLayerUnderLargeScale) {}

TEST_P(PaintLayerTest, AddLayerNeedsRepaintAndCullRectUpdate) {}

TEST_P(PaintLayerTest, HitTestLayerWith3DDescendantCrash) {}

#define TEST_SCROLL_CONTAINER(name, expected_scroll_container,           \
                              expected_is_fixed_to_view)

TEST_P(PaintLayerTest, ScrollContainerLayerRootScroller) {}

TEST_P(PaintLayerTest, ScrollContainerLayerRelativeScroller) {}

TEST_P(PaintLayerTest, ScrollContainerLayerNestedScroller) {}

TEST_P(PaintLayerTest, ScrollContainerLayerScrollerUnderRealFixed) {}

TEST_P(PaintLayerTest, ScrollContainerLayerScrollerUnderFakeFixed) {}

TEST_P(PaintLayerTest, ScrollContainerLayerFixedScroller) {}

TEST_P(PaintLayerTest, ScrollContainerLayerScrollerUnderTransformAndFixed) {}

TEST_P(PaintLayerTest, ScrollContainerLayerTransformScroller) {}

TEST_P(PaintLayerTest, HitTestScrollMarkerPseudoElement) {}

}  // namespace blink