Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[iOS] Several API tests fail when run against an iPhone 12 simulator
https://bugs.webkit.org/show_bug.cgi?id=256860 rdar://109230218 Reviewed by Aditya Keerthi. Adjust several API tests and test infrastructure to be more robust to underlying platform changes, and also ensure consistent test results when running a subset of API tests against notchless vs. notched iPhone models when using `TestWKWebView`, by normalizing the safe area insets to 0 by default. * Tools/TestWebKitAPI/Tests/WebKitCocoa/RestoreScrollPosition.mm: (-[RestoreScrollPositionWithLargeContentInsetWebView safeAreaInsets]): Deleted. Remove this subclass entirely, and instead use the new `-setOverrideTopSafeAreaInset:` helper. * Tools/TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm: (-[TestWKWebView waitForCaretVisibility:]): Make this test robust against platform differences on iOS in caret UI and whether or not we zoom upon focusing an element, by making these tests check for the presence or absence of the caret rather than specific caret rects. This was the original intent of the API test added in 203447@main, anyways. (-[TestWKWebView waitForCaretViewFrameToBecome:]): Deleted. * Tools/TestWebKitAPI/cocoa/TestWKWebView.h: * Tools/TestWebKitAPI/cocoa/TestWKWebView.mm: (-[TestWKWebView initWithFrame:configuration:addToWindow:]): (-[TestWKWebView overrideSafeAreaInset]): (-[TestWKWebView setOverrideSafeAreaInset:]): (-[TestWKWebView safeAreaInsets]): Canonical link: https://commits.webkit.org/264150@main
- Loading branch information
Showing
4 changed files
with
38 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters