Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Side by Side Diff: Source/core/frame/RootFrameViewportTest.cpp

Issue 1195803003: Report accurate Overscroll on handleWheel. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fixed unittest failures Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/frame/RootFrameViewport.cpp ('k') | Source/core/frame/Settings.in » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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" 5 #include "config.h"
6 6
7 #include "core/frame/RootFrameViewport.h" 7 #include "core/frame/RootFrameViewport.h"
8 8
9 #include "core/layout/ScrollAlignment.h" 9 #include "core/layout/ScrollAlignment.h"
10 #include "platform/geometry/DoubleRect.h" 10 #include "platform/geometry/DoubleRect.h"
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 -500, -500, 488 -500, -500,
489 0, 0, 489 0, 0,
490 ScrollByPixelWheelEvent, 490 ScrollByPixelWheelEvent,
491 false, false, false, false); 491 false, false, false, false);
492 492
493 ScrollResult result = rootFrameViewport->handleWheel(wheelEvent); 493 ScrollResult result = rootFrameViewport->handleWheel(wheelEvent);
494 494
495 EXPECT_TRUE(result.didScroll()); 495 EXPECT_TRUE(result.didScroll());
496 EXPECT_POINT_EQ(DoublePoint(50, 50), visualViewport.scrollPositionDouble()); 496 EXPECT_POINT_EQ(DoublePoint(50, 50), visualViewport.scrollPositionDouble());
497 EXPECT_POINT_EQ(DoublePoint(100, 200), layoutViewport.scrollPositionDouble() ); 497 EXPECT_POINT_EQ(DoublePoint(100, 200), layoutViewport.scrollPositionDouble() );
498 EXPECT_EQ(-350, result.unusedScrollDeltaX); 498 EXPECT_EQ(350, result.unusedScrollDeltaX);
499 EXPECT_EQ(-250, result.unusedScrollDeltaY); 499 EXPECT_EQ(250, result.unusedScrollDeltaY);
500 } 500 }
501 501
502 } // namespace blink 502 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/RootFrameViewport.cpp ('k') | Source/core/frame/Settings.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698