chromium/third_party/blink/renderer/core/layout/layout_box_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/core/layout/layout_box.h"

#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/core/dom/dom_token_list.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/html/html_body_element.h"
#include "third_party/blink/renderer/core/html/html_element.h"
#include "third_party/blink/renderer/core/layout/layout_image.h"
#include "third_party/blink/renderer/core/paint/paint_layer.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/graphics/test/stub_image.h"
#include "third_party/blink/renderer/platform/testing/paint_test_configurations.h"

namespace blink {

class LayoutBoxTest : public RenderingTest {};

TEST_F(LayoutBoxTest, BackgroundIsKnownToBeObscured) {}

TEST_F(LayoutBoxTest, BackgroundNotObscuredWithCssClippedChild) {}

TEST_F(LayoutBoxTest, BackgroundNotObscuredWithCssClippedGrandChild) {}

TEST_F(LayoutBoxTest, ForegroundIsKnownToBeOpaqueInRect) {}

TEST_F(LayoutBoxTest, ForegroundIsKnownToBeOpaqueInRectVerticalRL) {}

TEST_F(LayoutBoxTest, BackgroundRect) {}

TEST_F(LayoutBoxTest, LocationContainer) {}

TEST_F(LayoutBoxTest, TopLeftLocationFlipped) {}

TEST_F(LayoutBoxTest, TableRowCellTopLeftLocationFlipped) {}

TEST_F(LayoutBoxTest, LocationContainerOfSVG) {}

TEST_F(LayoutBoxTest, ControlClip) {}

TEST_F(LayoutBoxTest, VisualOverflowRectWithBlockChild) {}

TEST_F(LayoutBoxTest, VisualOverflowRectWithLegacyChild) {}

TEST_F(LayoutBoxTest, VisualOverflowRectWithMask) {}

TEST_F(LayoutBoxTest, VisualOverflowRectWithMaskAndOverflowHidden) {}

TEST_F(LayoutBoxTest, VisualOverflowRectWithMaskWithOutset) {}

TEST_F(LayoutBoxTest, VisualOverflowRectWithMaskWithOutsetAndOverflowHidden) {}

TEST_F(LayoutBoxTest, VisualOverflowRectOverflowHidden) {}

TEST_F(LayoutBoxTest, VisualOverflowRectOverflowClip) {}

TEST_F(LayoutBoxTest, VisualOverflowRectWithOverflowClipMargin) {}

// |InkOverflow| stopped storing visual overflow contained by |BorderBoxRect|
// because they are not useful, and they are inconsistent when fully contained
// and partially contained.
// TODO(crbug.com/1144203): Change this to "if (NG)" when NG always use
// fragment-based ink overflow. Then, remove this when legacy is gone.
#define EXPECT_CONTENTS_VISUAL_OVERFLOW(rect, layout_box)

TEST_F(LayoutBoxTest, ContentsVisualOverflowPropagation) {}

TEST_F(LayoutBoxTest, HitTestOverflowClipMargin) {}

TEST_F(LayoutBoxTest, HitTestContainPaint) {}

TEST_F(LayoutBoxTest, OverflowRectsContainPaint) {}

TEST_F(LayoutBoxTest, OverflowRectsOverflowHidden) {}

TEST_F(LayoutBoxTest, SetTextFieldIntrinsicInlineSize) {}

class AnimatedImage : public StubImage {};

TEST_F(LayoutBoxTest, DelayedInvalidation) {}

TEST_F(LayoutBoxTest, DelayedInvalidationLayoutViewScrolled) {}

TEST_F(LayoutBoxTest, MarkerContainerScrollableOverflowRect) {}

static String CommonStyleForGeometryWithScrollbarTests() {}

TEST_F(LayoutBoxTest, LocationOfAbsoluteChildWithContainerScrollbars) {}

TEST_F(LayoutBoxTest,
       LocationOfAbsoluteChildWithContainerScrollbarsDifferentWritingModes) {}

TEST_F(LayoutBoxTest,
       LocationOfAbsoluteAutoTopLeftChildWithContainerScrollbars) {}

TEST_F(LayoutBoxTest,
       LocationOfAbsoluteAutoTopLeftGrandChildWithContainerScrollbars) {}

TEST_F(LayoutBoxTest, LocationOfInFlowChildWithContainerScrollbars) {}

TEST_F(LayoutBoxTest, LocationOfRelativeChildWithContainerScrollbars) {}

TEST_F(LayoutBoxTest, LocationOfFloatLeftChildWithContainerScrollbars) {}

TEST_F(LayoutBoxTest, LocationOfFloatRightChildWithContainerScrollbars) {}

TEST_F(LayoutBoxTest, GeometriesWithScrollbarsNonScrollable) {}

TEST_F(LayoutBoxTest, GeometriesWithScrollbarsScrollable) {}

TEST_F(LayoutBoxTest,
       ThickScrollbarSubpixelSizeMarginNoDirtyLayoutAfterLayout) {}

// crbug.com/1108270
TEST_F(LayoutBoxTest, MenuListIntrinsicBlockSize) {}

TEST_F(LayoutBoxTest, HasReflection) {}

TEST_F(LayoutBoxTest, PhysicalVisualOverflowRectIncludingFilters) {}

TEST_F(LayoutBoxTest, SetNeedsOverflowRecalcLayoutBox) {}

TEST_F(LayoutBoxTest, SetNeedsOverflowRecalcFlexBox) {}

TEST_F(LayoutBoxTest, ScrollsWithViewportRelativePosition) {}

TEST_F(LayoutBoxTest, ScrollsWithViewportFixedPosition) {}

TEST_F(LayoutBoxTest, ScrollsWithViewportFixedPositionInsideTransform) {}

TEST_F(LayoutBoxTest, HitTestResizerWithTextAreaChild) {}

TEST_F(LayoutBoxTest, HitTestResizerStackedWithTextAreaChild) {}

TEST_F(LayoutBoxTest, AnchorInFragmentedContainingBlock) {}

TEST_F(LayoutBoxTest, AnchorInInlineContainingBlock) {}

TEST_F(LayoutBoxTest, AnchorInInlineContainingBlockWithNameConflicts) {}

TEST_F(LayoutBoxTest, IsUserScrollable) {}

TEST_F(LayoutBoxTest, IsUserScrollableLayoutView) {}

TEST_F(LayoutBoxTest, LogicalTopLogicalLeft) {}

class LayoutBoxBackgroundPaintLocationTest : public RenderingTest,
                                             public PaintTestConfigurations {};

INSTANTIATE_PAINT_TEST_SUITE_P();

TEST_P(LayoutBoxBackgroundPaintLocationTest, ContentBoxClipZeroPadding) {}

TEST_P(LayoutBoxBackgroundPaintLocationTest,
       AttachmentLocalContentBoxClipNonZeroPadding) {}

TEST_P(LayoutBoxBackgroundPaintLocationTest, NonLocalImage) {}

TEST_P(LayoutBoxBackgroundPaintLocationTest, LocalImageAndColor) {}

TEST_P(LayoutBoxBackgroundPaintLocationTest,
       LocalImageAndNonLocalClipPaddingColor) {}

TEST_P(LayoutBoxBackgroundPaintLocationTest,
       LocalImageAndNonLocalClipContentColorNonZeroPadding) {}

TEST_P(LayoutBoxBackgroundPaintLocationTest, BorderBoxClipColorNoBorder) {}

TEST_P(LayoutBoxBackgroundPaintLocationTest, BorderBoxClipColorSolidBorder) {}

TEST_P(LayoutBoxBackgroundPaintLocationTest,
       BorderBoxClipColorTranslucentBorder) {}

TEST_P(LayoutBoxBackgroundPaintLocationTest, BorderBoxClipColorDashedBorder) {}

TEST_P(LayoutBoxBackgroundPaintLocationTest, ContentClipColorZeroPadding) {}

TEST_P(LayoutBoxBackgroundPaintLocationTest, ContentClipColorNonZeroPadding) {}

TEST_P(LayoutBoxBackgroundPaintLocationTest, CustomScrollbar) {}

TEST_P(LayoutBoxBackgroundPaintLocationTest,
       TranslucentColorAndTranslucentBorder) {}

TEST_P(LayoutBoxBackgroundPaintLocationTest,
       LocalImageTranslucentColorAndTransparentBorder) {}

TEST_P(LayoutBoxBackgroundPaintLocationTest, InsetBoxShadow) {}

TEST_P(LayoutBoxBackgroundPaintLocationTest, OutsetBoxShadow) {}

TEST_P(LayoutBoxBackgroundPaintLocationTest, BorderImage) {}

}  // namespace blink