| 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 "SnapCoordinator.h" | 5 #include "SnapCoordinator.h" |
| 6 | 6 |
| 7 #include <gtest/gtest.h> |
| 8 #include <memory> |
| 7 #include "core/dom/Document.h" | 9 #include "core/dom/Document.h" |
| 8 #include "core/dom/Element.h" | 10 #include "core/dom/Element.h" |
| 9 #include "core/frame/FrameView.h" | 11 #include "core/frame/FrameView.h" |
| 10 #include "core/html/HTMLElement.h" | 12 #include "core/html/HTMLElement.h" |
| 11 #include "core/style/ComputedStyle.h" | 13 #include "core/style/ComputedStyle.h" |
| 12 #include "core/testing/DummyPageHolder.h" | 14 #include "core/testing/DummyPageHolder.h" |
| 13 #include "platform/scroll/ScrollTypes.h" | 15 #include "platform/scroll/ScrollTypes.h" |
| 14 #include "platform/testing/RuntimeEnabledFeaturesTestHelpers.h" | 16 #include "platform/testing/RuntimeEnabledFeaturesTestHelpers.h" |
| 15 #include <gtest/gtest.h> | |
| 16 #include <memory> | |
| 17 | 17 |
| 18 namespace blink { | 18 namespace blink { |
| 19 | 19 |
| 20 using HTMLNames::styleAttr; | 20 using HTMLNames::styleAttr; |
| 21 | 21 |
| 22 typedef bool TestParamRootLayerScrolling; | 22 typedef bool TestParamRootLayerScrolling; |
| 23 class SnapCoordinatorTest | 23 class SnapCoordinatorTest |
| 24 : public testing::TestWithParam<TestParamRootLayerScrolling>, | 24 : public testing::TestWithParam<TestParamRootLayerScrolling>, |
| 25 private ScopedRootLayerScrollingForTest { | 25 private ScopedRootLayerScrollingForTest { |
| 26 protected: | 26 protected: |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 Element& body = *document().body(); | 387 Element& body = *document().body(); |
| 388 Vector<double> result = snapOffsets(body, HorizontalScrollbar); | 388 Vector<double> result = snapOffsets(body, HorizontalScrollbar); |
| 389 EXPECT_EQ(5, result[0]); | 389 EXPECT_EQ(5, result[0]); |
| 390 EXPECT_EQ(10, result[1]); | 390 EXPECT_EQ(10, result[1]); |
| 391 result = snapOffsets(body, VerticalScrollbar); | 391 result = snapOffsets(body, VerticalScrollbar); |
| 392 EXPECT_EQ(6, result[0]); | 392 EXPECT_EQ(6, result[0]); |
| 393 EXPECT_EQ(11, result[1]); | 393 EXPECT_EQ(11, result[1]); |
| 394 } | 394 } |
| 395 | 395 |
| 396 } // namespace | 396 } // namespace |
| OLD | NEW |