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

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

Issue 1056983004: OverscrollGlow for mainThread-{BLINK CHANGES} (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased to latest Created 5 years, 6 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/input/EventHandler.h » ('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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 486
487 PlatformWheelEvent wheelEvent( 487 PlatformWheelEvent wheelEvent(
488 IntPoint(10, 10), IntPoint(10, 10), 488 IntPoint(10, 10), IntPoint(10, 10),
489 -500, -500, 489 -500, -500,
490 0, 0, 490 0, 0,
491 ScrollByPixelWheelEvent, 491 ScrollByPixelWheelEvent,
492 false, false, false, false); 492 false, false, false, false);
493 493
494 ScrollResult result = rootFrameViewport->handleWheel(wheelEvent); 494 ScrollResult result = rootFrameViewport->handleWheel(wheelEvent);
495 495
496 EXPECT_TRUE(result.didScroll); 496 EXPECT_TRUE(result.didScroll());
497 EXPECT_POINT_EQ(DoublePoint(50, 50), visualViewport.scrollPositionDouble()); 497 EXPECT_POINT_EQ(DoublePoint(50, 50), visualViewport.scrollPositionDouble());
498 EXPECT_POINT_EQ(DoublePoint(100, 200), layoutViewport.scrollPositionDouble() ); 498 EXPECT_POINT_EQ(DoublePoint(100, 200), layoutViewport.scrollPositionDouble() );
499 EXPECT_EQ(-350, result.unusedScrollDeltaX); 499 EXPECT_EQ(-350, result.unusedScrollDeltaX);
500 EXPECT_EQ(-250, result.unusedScrollDeltaY); 500 EXPECT_EQ(-250, result.unusedScrollDeltaY);
501 } 501 }
502 502
503 } // namespace blink 503 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/RootFrameViewport.cpp ('k') | Source/core/input/EventHandler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698