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

Unified Diff: ios/web/web_state/ui/crw_web_view_scroll_view_proxy_unittest.mm

Issue 2868333005: Add CRWWebViewScrollViewProxy.decelerating (Closed)
Patch Set: Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web/web_state/ui/crw_web_view_scroll_view_proxy.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/ui/crw_web_view_scroll_view_proxy_unittest.mm
diff --git a/ios/web/web_state/ui/crw_web_view_scroll_view_proxy_unittest.mm b/ios/web/web_state/ui/crw_web_view_scroll_view_proxy_unittest.mm
index f1c17ddd0eba61a293c0936db6f4d0e1fd21da3c..f5dee07164824b506989673afe8b3c37fe577d81 100644
--- a/ios/web/web_state/ui/crw_web_view_scroll_view_proxy_unittest.mm
+++ b/ios/web/web_state/ui/crw_web_view_scroll_view_proxy_unittest.mm
@@ -102,6 +102,12 @@ TEST_F(CRWWebViewScrollViewProxyTest, testScrollViewPresent) {
frame];
EXPECT_TRUE(CGRectEqualToRect(frame, [webViewScrollViewProxy_ frame]));
+ [[[mockScrollView_ expect] andReturnValue:@YES] isDecelerating];
+ EXPECT_TRUE([webViewScrollViewProxy_ isDecelerating]);
+
+ [[[mockScrollView_ expect] andReturnValue:@NO] isDecelerating];
+ EXPECT_FALSE([webViewScrollViewProxy_ isDecelerating]);
+
[[[mockScrollView_ expect] andReturnValue:@YES] isDragging];
EXPECT_TRUE([webViewScrollViewProxy_ isDragging]);
@@ -123,6 +129,7 @@ TEST_F(CRWWebViewScrollViewProxyTest, testScrollViewAbsent) {
EXPECT_TRUE(
CGSizeEqualToSize(CGSizeZero, [webViewScrollViewProxy_ contentSize]));
EXPECT_TRUE(CGRectEqualToRect(CGRectZero, [webViewScrollViewProxy_ frame]));
+ EXPECT_FALSE([webViewScrollViewProxy_ isDecelerating]);
EXPECT_FALSE([webViewScrollViewProxy_ isDragging]);
// Make sure setting the properties is fine too.
« no previous file with comments | « ios/web/web_state/ui/crw_web_view_scroll_view_proxy.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698