[webkit-changes] [WebKit/WebKit] 80a13b: Add test coverage for the fix in https://webkit.or...

Wenson Hsieh noreply at github.com
Thu Aug 15 13:53:52 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 80a13b46642da01f5f3244332f1433ef468edb3e
      https://github.com/WebKit/WebKit/commit/80a13b46642da01f5f3244332f1433ef468edb3e
  Author: Wenson Hsieh <wenson_hsieh at apple.com>
  Date:   2024-08-15 (Thu, 15 Aug 2024)

  Changed paths:
    M Tools/TestWebKitAPI/Tests/mac/WKWebViewMacEditingTests.mm

  Log Message:
  -----------
  Add test coverage for the fix in https://webkit.org/b/278129
https://bugs.webkit.org/show_bug.cgi?id=278180
Followup to rdar://133304088

Reviewed by Abrar Rahman Protyasha.

Add an API test for bug #278129. See below for more details.

* Tools/TestWebKitAPI/Tests/mac/WKWebViewMacEditingTests.mm:
(-[SetMarkedTextWithNoAttributedStringTestCandidate initWithReplacementString:inRange:]):
(-[SetMarkedTextWithNoAttributedStringTestCandidate replacementString]):
(-[SetMarkedTextWithNoAttributedStringTestCandidate resultType]):
(-[SetMarkedTextWithNoAttributedStringTestCandidate range]):
(TestWebKitAPI::TEST(WKWebViewMacEditingTests, DoubleClickDoesNotSelectTrailingSpace)):
(TestWebKitAPI::TEST(WKWebViewMacEditingTests, DoNotCrashWhenInterpretingKeyEventWhileDeallocatingView)):
(TestWebKitAPI::TEST(WKWebViewMacEditingTests, ProcessSwapAfterSettingMarkedText)):
(TestWebKitAPI::TEST(WKWebViewMacEditingTests, DoNotRenderInlinePredictionsForRegularMarkedText)):

Add a new API test to exercise the fix in 282265 at main, by setting (non-inline-prediction) marked
text with an attributed string, and then verifying that the web view isn't blank as a result.

(TestWebKitAPI::TEST(WKWebViewMacEditingTests, InlinePredictionsShouldSuppressAutocorrection)):

Drive-by fix: wrap all of these tests in a `namespace TestWebKitAPI` so that we don't need to use
`TestWebKitAPI::` everywhere we use `Util`.

(TEST(WKWebViewMacEditingTests, DoubleClickDoesNotSelectTrailingSpace)): Deleted.
(TEST(WKWebViewMacEditingTests, DoNotCrashWhenCallingTextInputClientMethodsWhileDeallocatingView)): Deleted.
(TEST(WKWebViewMacEditingTests, DoNotCrashWhenInterpretingKeyEventWhileDeallocatingView)): Deleted.
(TEST(WKWebViewMacEditingTests, ProcessSwapAfterSettingMarkedText)): Deleted.
(TEST(WKWebViewMacEditingTests, InlinePredictionsShouldSurpressAutocorrection)): Deleted.

Drive-by fix: "Surpress" -> "Suppress".

(TEST(WKWebViewMacEditingTests, SetMarkedTextWithNoAttributedString)): Deleted.
(TEST(WKWebViewMacEditingTests, FirstRectForCharacterRange)): Deleted.
(TEST(WKWebViewMacEditingTests, FirstRectForCharacterRangeInTextArea)): Deleted.

Canonical link: https://commits.webkit.org/282308@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list