Commit ff9eac7c authored by Hiroshi Ichikawa's avatar Hiroshi Ichikawa Committed by Commit Bot

Delete CRWWebViewScrollViewProxyTest.MultipleWebViewScrollViewProxies.

This test tests a use case which is not really supported by
CRWWebViewScrollViewProxy. So I believe this should rather be deleted.

CRWWebViewScrollViewProxy doesn't really support setting up multiple
proxies for a single UIScrollView. If you try it with a real
UIScrollView, it hits an assertion here:
https://cs.chromium.org/chromium/src/ios/web/web_state/ui/crw_web_view_scroll_view_proxy.mm?l=73&rcl=c8f602e2f2dae5bdbde111f556474f3373c23a3d

This test currently passes just because it uses a mock UIScrollView.

Change-Id: Ib85ec49db033cd894f84d53a5053d1a006b1ff59
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1939139
Auto-Submit: Hiroshi Ichikawa <ichikawa@chromium.org>
Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Commit-Queue: Hiroshi Ichikawa <ichikawa@chromium.org>
Cr-Commit-Position: refs/heads/master@{#720824}
parent fb4676e5
...@@ -233,31 +233,6 @@ TEST_F(CRWWebViewScrollViewProxyTest, ReleasingAScrollView) { ...@@ -233,31 +233,6 @@ TEST_F(CRWWebViewScrollViewProxyTest, ReleasingAScrollView) {
[webViewScrollViewProxy_ setScrollView:nil]; [webViewScrollViewProxy_ setScrollView:nil];
} }
// Tests that multiple WebViewScrollViewProxies hold onto the same underlying
// UIScrollView
TEST_F(CRWWebViewScrollViewProxyTest, MultipleWebViewScrollViewProxies) {
[webViewScrollViewProxy_ setScrollView:mockScrollView_];
CRWWebViewScrollViewProxy* webViewScrollViewProxy1 =
[[CRWWebViewScrollViewProxy alloc] init];
[webViewScrollViewProxy1 setScrollView:mockScrollView_];
CRWWebViewScrollViewProxy* webViewScrollViewProxy2 =
[[CRWWebViewScrollViewProxy alloc] init];
[webViewScrollViewProxy2 setScrollView:mockScrollView_];
// Arbitrary point.
const CGPoint point = CGPointMake(10, 10);
[[[mockScrollView_ stub] andReturnValue:[NSValue valueWithCGPoint:point]]
contentOffset];
EXPECT_TRUE(
CGPointEqualToPoint(point, [webViewScrollViewProxy_ contentOffset]));
EXPECT_TRUE(
CGPointEqualToPoint(point, [webViewScrollViewProxy1 contentOffset]));
EXPECT_TRUE(
CGPointEqualToPoint(point, [webViewScrollViewProxy2 contentOffset]));
}
// Tests that CRWWebViewScrollViewProxy correctly delegates property setters to // Tests that CRWWebViewScrollViewProxy correctly delegates property setters to
// the underlying UIScrollView. // the underlying UIScrollView.
TEST_F(CRWWebViewScrollViewProxyTest, ScrollViewSetProperties) { TEST_F(CRWWebViewScrollViewProxyTest, ScrollViewSetProperties) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment