chromium/cc/trees/layer_tree_impl_unittest.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 "cc/trees/layer_tree_impl.h"

#include <algorithm>

#include "base/memory/raw_ptr.h"
#include "base/test/scoped_feature_list.h"
#include "base/time/time.h"
#include "cc/base/features.h"
#include "cc/layers/append_quads_data.h"
#include "cc/layers/heads_up_display_layer_impl.h"
#include "cc/test/fake_layer_tree_host_impl.h"
#include "cc/test/fake_raster_source.h"
#include "cc/test/layer_tree_impl_test_base.h"
#include "cc/trees/clip_node.h"
#include "cc/trees/debug_rect_history.h"
#include "cc/trees/draw_property_utils.h"
#include "cc/trees/layer_tree_host_impl.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/geometry/test/geometry_util.h"

namespace cc {
namespace {

std::pair<gfx::PointF, gfx::PointF> GetVisibleSelectionEndPoints(
    const gfx::RectF& rect,
    const gfx::PointF& top,
    const gfx::PointF& bottom) {}

class LayerTreeImplTest : public LayerTreeImplTestBase, public testing::Test {};

TEST_F(LayerTreeImplTest, HitTestingForSingleLayer) {}

TEST_F(LayerTreeImplTest, UpdateViewportAndHitTest) {}

TEST_F(LayerTreeImplTest, HitTestingForSingleLayerAndHud) {}

TEST_F(LayerTreeImplTest, HitTestingForUninvertibleTransform) {}

TEST_F(LayerTreeImplTest, HitTestingForSinglePositionedLayer) {}

TEST_F(LayerTreeImplTest, HitTestingForSingleRotatedLayer) {}

TEST_F(LayerTreeImplTest, HitTestingClipNodeDifferentTransformAndTargetIds) {}

TEST_F(LayerTreeImplTest, HitTestingSiblings) {}

TEST_F(LayerTreeImplTest, HitTestingForSinglePerspectiveLayer) {}

TEST_F(LayerTreeImplTest, HitTestingForSimpleClippedLayer) {}

TEST_F(LayerTreeImplTest, HitTestingForMultiClippedRotatedLayer) {}

TEST_F(LayerTreeImplTest, HitTestingForNonClippingIntermediateLayer) {}

TEST_F(LayerTreeImplTest, HitTestingForMultipleLayers) {}

TEST_F(LayerTreeImplTest, HitTestingSameSortingContextTied) {}

TEST_F(LayerTreeImplTest, HitTestingSameSortingContextChildWins) {}

TEST_F(LayerTreeImplTest, HitTestingWithoutSortingContext) {}

TEST_F(LayerTreeImplTest, HitTestingDistinctSortingContext) {}

TEST_F(LayerTreeImplTest, HitTestingSameSortingContextParentWins) {}

TEST_F(LayerTreeImplTest, HitTestingForMultipleLayersAtVaryingDepths) {}

TEST_F(LayerTreeImplTest, HitTestingRespectsClipParents) {}

TEST_F(LayerTreeImplTest, HitTestingForMultipleLayerLists) {}

TEST_F(LayerTreeImplTest, HitCheckingTouchHandlerRegionsForSingleLayer) {}

TEST_F(LayerTreeImplTest,
       HitCheckingTouchHandlerRegionsForUninvertibleTransform) {}

TEST_F(LayerTreeImplTest,
       HitCheckingTouchHandlerRegionsForSinglePositionedLayer) {}

TEST_F(LayerTreeImplTest,
       HitCheckingTouchHandlerRegionsForSingleLayerWithDeviceScale) {}

TEST_F(LayerTreeImplTest, HitCheckingTouchHandlerRegionsForSimpleClippedLayer) {}

TEST_F(LayerTreeImplTest,
       HitCheckingTouchHandlerRegionsForClippedLayerWithDeviceScale) {}

TEST_F(LayerTreeImplTest, HitCheckingTouchHandlerOverlappingRegions) {}

TEST_F(LayerTreeImplTest, HitTestingTouchHandlerRegionsForLayerThatIsNotDrawn) {}

TEST_F(LayerTreeImplTest, SelectionBoundsForSingleLayer) {}

TEST_F(LayerTreeImplTest, SelectionBoundsForPartialOccludedLayers) {}

TEST_F(LayerTreeImplTest, SelectionBoundsForScaledLayers) {}

TEST_F(LayerTreeImplTest, SelectionBoundsForDSFEnabled) {}

TEST_F(LayerTreeImplTest, SelectionBoundsWithLargeTransforms) {}

TEST_F(LayerTreeImplTest, SelectionBoundsForCaretLayer) {}

TEST_F(LayerTreeImplTest, NumLayersTestOne) {}

TEST_F(LayerTreeImplTest, NumLayersSmallTree) {}

TEST_F(LayerTreeImplTest, DeviceScaleFactorNeedsDrawPropertiesUpdate) {}

TEST_F(LayerTreeImplTest, DisplayColorSpacesDoesNotNeedDrawPropertiesUpdate) {}

TEST_F(LayerTreeImplTest, HitTestingCorrectLayerWheelListener) {}

TEST_F(LayerTreeImplTest, DebugRectHistoryLayoutShiftWithoutHud) {}

namespace {

class PersistentSwapPromise final : public SwapPromise {};

class NotPersistentSwapPromise final : public SwapPromise {};

}  // namespace

TEST_F(LayerTreeImplTest, PersistentSwapPromisesAreKeptAlive) {}

TEST_F(LayerTreeImplTest, NotPersistentSwapPromisesAreDroppedWhenSwapFails) {}

TEST_F(LayerTreeImplTest, TrackPictureLayersWithPaintWorklets) {}

TEST_F(LayerTreeImplTest, ElementIdToAnimationMapsTrackOnlyOnSyncTree) {}

class CommitToActiveTreeLayerTreeImplTest : public LayerTreeImplTest {};

TEST_F(CommitToActiveTreeLayerTreeImplTest,
       ElementIdToAnimationMapsTrackOnlyOnSyncTree) {}

// Verifies that the effect node's |is_fast_rounded_corner| is set to a draw
// properties of a RenderSurface, and then correctly forwarded to the shared
// quad state.
TEST_F(LayerTreeImplTest, CheckRenderSurfaceIsFastRoundedCorner) {}

LayerTreeSettings LayerTreeImplOcclusionSettings() {}

class LayerTreeImplOcclusionTest : public LayerTreeImplTest {};

TEST_F(LayerTreeImplOcclusionTest, Occlusion) {}

}  // namespace
}  // namespace cc