OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/ScrollAnchor.h" | 5 #include "core/layout/ScrollAnchor.h" |
6 | 6 |
7 #include "core/dom/ClientRect.h" | 7 #include "core/dom/ClientRect.h" |
8 #include "core/frame/VisualViewport.h" | 8 #include "core/frame/VisualViewport.h" |
9 #include "core/layout/LayoutBox.h" | 9 #include "core/layout/LayoutBox.h" |
10 #include "core/layout/LayoutTestHelper.h" | 10 #include "core/layout/LayoutTestHelper.h" |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 | 427 |
428 ScrollableArea* viewport = LayoutViewport(); | 428 ScrollableArea* viewport = LayoutViewport(); |
429 ScrollLayoutViewport(ScrollOffset(0, 150)); | 429 ScrollLayoutViewport(ScrollOffset(0, 150)); |
430 | 430 |
431 // This will trigger printing and layout. | 431 // This will trigger printing and layout. |
432 PrintContext::NumberOfPages(GetDocument().GetFrame(), FloatSize(500, 500)); | 432 PrintContext::NumberOfPages(GetDocument().GetFrame(), FloatSize(500, 500)); |
433 | 433 |
434 EXPECT_EQ(150, viewport->ScrollOffsetInt().Height()); | 434 EXPECT_EQ(150, viewport->ScrollOffsetInt().Height()); |
435 EXPECT_EQ(nullptr, GetScrollAnchor(viewport).AnchorObject()); | 435 EXPECT_EQ(nullptr, GetScrollAnchor(viewport).AnchorObject()); |
436 } | 436 } |
437 | 437 } // namespace blink |
438 } | |
OLD | NEW |