Commit 529b40e1 authored by Kurt Horimoto's avatar Kurt Horimoto Committed by Commit Bot

[iOS] Remove iOS9 ifdefs from FullscreenScrollEndAnimator.

Bug: none
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I5c19a4f3cdc8cdf00ade25bf76280fbb957f071d
Reviewed-on: https://chromium-review.googlesource.com/802622
Commit-Queue: Kurt Horimoto <kkhorimoto@chromium.org>
Reviewed-by: default avatarMark Cogan <marq@chromium.org>
Reviewed-by: default avatarJustin Cohen <justincohen@chromium.org>
Reviewed-by: default avatarKurt Horimoto <kkhorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520984}
parent a9574fb4
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#if defined(__IPHONE_10_0) && (__IPHONE_OS_VERSION_MIN_ALLOWED >= __IPHONE_10_0)
// When a scroll event ends, the toolbar should be either completely hidden or // When a scroll event ends, the toolbar should be either completely hidden or
// completely visible. If a scroll ends and the toolbar is partly visible, this // completely visible. If a scroll ends and the toolbar is partly visible, this
// animator will be provided to UI elements to animate its state to a hidden or // animator will be provided to UI elements to animate its state to a hidden or
...@@ -29,17 +28,8 @@ ...@@ -29,17 +28,8 @@
- (instancetype)initWithDuration:(NSTimeInterval)duration - (instancetype)initWithDuration:(NSTimeInterval)duration
timingParameters:(id<UITimingCurveProvider>)parameters timingParameters:(id<UITimingCurveProvider>)parameters
NS_UNAVAILABLE; NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
@end @end
#else
// Dummy object.
// TODO(crbug.com/768876): Remove this class and the #if guards once iOS9
// support is dropped.
@interface FullscreenScrollEndAnimator : NSObject
@end
#endif // __IPHONE_10_0
#endif // IOS_CLEAN_CHROME_BROWSER_UI_FULLSCREEN_FULLSCREEN_SCROLL_END_ANIMATOR_H_ #endif // IOS_CLEAN_CHROME_BROWSER_UI_FULLSCREEN_FULLSCREEN_SCROLL_END_ANIMATOR_H_
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#error "This file requires ARC support." #error "This file requires ARC support."
#endif #endif
#if defined(__IPHONE_10_0) && (__IPHONE_OS_VERSION_MIN_ALLOWED >= __IPHONE_10_0)
@interface FullscreenScrollEndTimingCurveProvider @interface FullscreenScrollEndTimingCurveProvider
: NSObject<UITimingCurveProvider> { : NSObject<UITimingCurveProvider> {
std::unique_ptr<gfx::CubicBezier> _bezier; std::unique_ptr<gfx::CubicBezier> _bezier;
...@@ -114,10 +113,3 @@ ...@@ -114,10 +113,3 @@
} }
@end @end
#else
@implementation FullscreenScrollEndAnimator
@end
#endif // __IPHONE_10_0
...@@ -80,8 +80,10 @@ TEST_F(FullscreenUIUpdaterTest, EnabledDisabled) { ...@@ -80,8 +80,10 @@ TEST_F(FullscreenUIUpdaterTest, EnabledDisabled) {
// Tests that the updater sends the animator to the UI element. // Tests that the updater sends the animator to the UI element.
TEST_F(FullscreenUIUpdaterTest, ScrollEnd) { TEST_F(FullscreenUIUpdaterTest, ScrollEnd) {
ASSERT_FALSE(element().animator); ASSERT_FALSE(element().animator);
// Create a test animator. The start progress of 0.0 is a dummy value, as the
// animator's progress properties are unused in this test.
FullscreenScrollEndAnimator* const kAnimator = FullscreenScrollEndAnimator* const kAnimator =
[[FullscreenScrollEndAnimator alloc] init]; [[FullscreenScrollEndAnimator alloc] initWithStartProgress:0.0];
observer()->FullscreenScrollEventEnded(nullptr, kAnimator); observer()->FullscreenScrollEventEnded(nullptr, kAnimator);
EXPECT_EQ(element().animator, kAnimator); EXPECT_EQ(element().animator, kAnimator);
} }
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