chromium/cc/trees/property_tree_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/property_tree.h"

#include <utility>

#include "cc/input/main_thread_scrolling_reason.h"
#include "cc/test/fake_impl_task_runner_provider.h"
#include "cc/test/fake_layer_tree_host_impl.h"
#include "cc/test/layer_test_common.h"
#include "cc/test/test_task_graph_runner.h"
#include "cc/trees/clip_node.h"
#include "cc/trees/draw_property_utils.h"
#include "cc/trees/effect_node.h"
#include "cc/trees/layer_tree_impl.h"
#include "cc/trees/scroll_node.h"
#include "cc/trees/transform_node.h"
#include "cc/trees/viewport_property_ids.h"
#include "components/viz/common/frame_sinks/copy_output_request.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/geometry/test/geometry_util.h"

namespace cc {
namespace {

class FakeProtectedSequenceSynchronizer : public ProtectedSequenceSynchronizer {};

TEST(PropertyTreeTest, ComputeTransformRoot) {}

TEST(PropertyTreeTest, SetNeedsUpdate) {}

TEST(PropertyTreeTest, ComputeTransformChild) {}

TEST(PropertyTreeTest, ComputeTransformSibling) {}

TEST(PropertyTreeTest, ComputeTransformSiblingSingularAncestor) {}

// Tests that the transform for fixed elements is translated based on the
// overscroll nodes scroll_offset and that the clip node has an outset based on
// the overscroll distance.
TEST(PropertyTreeTest, UndoOverscroll) {}

TEST(PropertyTreeTest, TransformsWithFlattening) {}

TEST(PropertyTreeTest, MultiplicationOrder) {}

TEST(PropertyTreeTest, ComputeTransformWithUninvertibleTransform) {}

TEST(PropertyTreeTest, ComputeTransformToTargetWithZeroSurfaceContentsScale) {}

TEST(PropertyTreeTest, FlatteningWhenDestinationHasOnlyFlatAncestors) {}

TEST(PropertyTreeTest, ScreenSpaceOpacityUpdateTest) {}

TEST(PropertyTreeTest, SingularTransformSnapTest) {}

// Tests that CopyOutputRequests are transformed by the EffectTree, such that
// assumptions the original requestor made about coordinate spaces remains true
// after the EffectTree transforms the requests.
TEST(EffectTreeTest, CopyOutputRequestsAreTransformed) {}

// Tests that a good CopyOutputRequest which becomes transformed into an invalid
// one is dropped (i.e., the requestor would get an "empty response" in its
// result callback). The scaling transform in this test is so extreme that it
// would result in an illegal adjustment to the CopyOutputRequest's scale ratio.
TEST(EffectTreeTest, CopyOutputRequestsThatBecomeIllegalAreDropped) {}

// Tests that GetPixelSnappedScrollOffset cannot return a negative offset, even
// when the snap amount is larger than the scroll offset. The snap amount can be
// (fractionally) larger due to floating point precision errors, and if the
// scroll offset is near zero that can naively lead to a negative offset being
// returned which is not desirable.
TEST(ScrollTreeTest, GetScrollOffsetForScrollTimelineNegativeOffset) {}

// Verify that when fractional scroll delta is turned off, that the remaining
// fractional delta does not cause additional property changes.
TEST(ScrollTreeTest, PushScrollUpdatesFromMainThreadIntegerDelta) {}

}  // namespace
}  // namespace cc