| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "config.h" | |
| 6 #include "core/frame/RootFrameViewport.h" | 5 #include "core/frame/RootFrameViewport.h" |
| 7 | 6 |
| 8 #include "core/layout/ScrollAlignment.h" | 7 #include "core/layout/ScrollAlignment.h" |
| 9 #include "platform/geometry/DoubleRect.h" | 8 #include "platform/geometry/DoubleRect.h" |
| 10 #include "platform/geometry/LayoutRect.h" | 9 #include "platform/geometry/LayoutRect.h" |
| 11 #include "platform/scroll/ScrollableArea.h" | 10 #include "platform/scroll/ScrollableArea.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 12 |
| 14 #define EXPECT_POINT_EQ(expected, actual) \ | 13 #define EXPECT_POINT_EQ(expected, actual) \ |
| 15 do { \ | 14 do { \ |
| (...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 rootFrameViewport->setScrollPosition(DoublePoint(40, 40), UserScroll); | 486 rootFrameViewport->setScrollPosition(DoublePoint(40, 40), UserScroll); |
| 488 EXPECT_POINT_EQ(DoublePoint(40, 40), visualViewport->scrollPositionDouble())
; | 487 EXPECT_POINT_EQ(DoublePoint(40, 40), visualViewport->scrollPositionDouble())
; |
| 489 EXPECT_POINT_EQ(DoublePoint(0, 0), layoutViewport->scrollPositionDouble()); | 488 EXPECT_POINT_EQ(DoublePoint(0, 0), layoutViewport->scrollPositionDouble()); |
| 490 | 489 |
| 491 rootFrameViewport->setScrollPosition(DoublePoint(60, 60), ProgrammaticScroll
); | 490 rootFrameViewport->setScrollPosition(DoublePoint(60, 60), ProgrammaticScroll
); |
| 492 EXPECT_POINT_EQ(DoublePoint(50, 50), visualViewport->scrollPositionDouble())
; | 491 EXPECT_POINT_EQ(DoublePoint(50, 50), visualViewport->scrollPositionDouble())
; |
| 493 EXPECT_POINT_EQ(DoublePoint(10, 10), layoutViewport->scrollPositionDouble())
; | 492 EXPECT_POINT_EQ(DoublePoint(10, 10), layoutViewport->scrollPositionDouble())
; |
| 494 } | 493 } |
| 495 | 494 |
| 496 } // namespace blink | 495 } // namespace blink |
| OLD | NEW |