OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "core/layout/LayoutInline.h" | 5 #include "core/layout/LayoutInline.h" |
6 #include "core/layout/LayoutTestHelper.h" | 6 #include "core/layout/LayoutTestHelper.h" |
7 #include "core/layout/LayoutView.h" | 7 #include "core/layout/LayoutView.h" |
8 #include "platform/geometry/TransformState.h" | 8 #include "platform/geometry/TransformState.h" |
9 #include "platform/testing/RuntimeEnabledFeaturesTestHelpers.h" | 9 #include "platform/testing/RuntimeEnabledFeaturesTestHelpers.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 | 11 |
12 namespace blink { | 12 namespace blink { |
13 | 13 |
14 typedef bool TestParamRootLayerScrolling; | 14 typedef bool TestParamRootLayerScrolling; |
15 class MapCoordinatesTest | 15 class MapCoordinatesTest |
16 : public testing::WithParamInterface<TestParamRootLayerScrolling>, | 16 : public ::testing::WithParamInterface<TestParamRootLayerScrolling>, |
17 private ScopedRootLayerScrollingForTest, | 17 private ScopedRootLayerScrollingForTest, |
18 public RenderingTest { | 18 public RenderingTest { |
19 public: | 19 public: |
20 MapCoordinatesTest() | 20 MapCoordinatesTest() |
21 : ScopedRootLayerScrollingForTest(GetParam()), | 21 : ScopedRootLayerScrollingForTest(GetParam()), |
22 RenderingTest(SingleChildLocalFrameClient::Create()) {} | 22 RenderingTest(SingleChildLocalFrameClient::Create()) {} |
23 FloatPoint MapLocalToAncestor(const LayoutObject*, | 23 FloatPoint MapLocalToAncestor(const LayoutObject*, |
24 const LayoutBoxModelObject* ancestor, | 24 const LayoutBoxModelObject* ancestor, |
25 FloatPoint, | 25 FloatPoint, |
26 MapCoordinatesFlags = 0) const; | 26 MapCoordinatesFlags = 0) const; |
(...skipping 1627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1654 LayoutUnit::Epsilon()); | 1654 LayoutUnit::Epsilon()); |
1655 EXPECT_NEAR(50.0, matrix.ProjectPoint(FloatPoint(100.0, 50.0)).Y(), | 1655 EXPECT_NEAR(50.0, matrix.ProjectPoint(FloatPoint(100.0, 50.0)).Y(), |
1656 LayoutUnit::Epsilon()); | 1656 LayoutUnit::Epsilon()); |
1657 EXPECT_NEAR(25.0, matrix.ProjectPoint(FloatPoint(50.0, 100.0)).X(), | 1657 EXPECT_NEAR(25.0, matrix.ProjectPoint(FloatPoint(50.0, 100.0)).X(), |
1658 LayoutUnit::Epsilon()); | 1658 LayoutUnit::Epsilon()); |
1659 EXPECT_NEAR(100.0, matrix.ProjectPoint(FloatPoint(50.0, 100.0)).Y(), | 1659 EXPECT_NEAR(100.0, matrix.ProjectPoint(FloatPoint(50.0, 100.0)).Y(), |
1660 LayoutUnit::Epsilon()); | 1660 LayoutUnit::Epsilon()); |
1661 } | 1661 } |
1662 | 1662 |
1663 } // namespace blink | 1663 } // namespace blink |
OLD | NEW |