Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 90f6849617f00aa3e02bfd04742fb1dd14d24eea
      
https://github.com/WebKit/WebKit/commit/90f6849617f00aa3e02bfd04742fb1dd14d24eea
  Author: Wenson Hsieh <[email protected]>
  Date:   2023-05-17 (Wed, 17 May 2023)

  Changed paths:
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/RestoreScrollPosition.mm
    M Tools/TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm
    M Tools/TestWebKitAPI/cocoa/TestWKWebView.h
    M Tools/TestWebKitAPI/cocoa/TestWKWebView.mm

  Log Message:
  -----------
  [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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to