[webkit-changes] [WebKit/WebKit] 46590d: [UnifiedPDF] Opt-in to UnifiedPDF for layout tests...

Abrar Rahman Protyasha noreply at github.com
Thu Aug 29 00:59:42 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 46590da948cacd7778ed4774862fcdb0a7264ca2
      https://github.com/WebKit/WebKit/commit/46590da948cacd7778ed4774862fcdb0a7264ca2
  Author: Abrar Rahman Protyasha <a_protyasha at apple.com>
  Date:   2024-08-29 (Thu, 29 Aug 2024)

  Changed paths:
    M Source/WTF/wtf/PlatformEnableCocoa.h
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/UnifiedPDFTests.mm
    M Tools/WebKitTestRunner/TestOptions.cpp

  Log Message:
  -----------
  [UnifiedPDF] Opt-in to UnifiedPDF for layout tests in configurations where we support testing the feature
https://bugs.webkit.org/show_bug.cgi?id=278805
rdar://134876283

Reviewed by Megan Gardner.

The goal of this patch is to enable testing coverage for the UnifiedPDF
feature in configurations where we support testing it.

The idea for this patch stems from our manually opting out of API tests
on platforms where we do not want to test the feature, through the
TestWebKitAPI::shouldEnableUnifiedPDFForTesting() utility. Instead, this
patch generalizes that idea to an ENABLE(UNIFIED_PDF_FOR_TESTING)
platform enable macro.

Using this macro, we:
1. Conditionally override the UnifiedPDFEnabled web preference value in
   WKTR, thus opting in to the feature by default in configurations
   where we support testing the feature.
2. Provide a helper macro to write API tests for the Unified PDF
   feature, eliminating the boiler plate of early returning from API
   tests.

* Source/WTF/wtf/PlatformEnableCocoa.h:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/UnifiedPDFTests.mm:
(TestWebKitAPI::UNIFIED_PDF_TEST):
(TestWebKitAPI::shouldEnableUnifiedPDFForTesting): Deleted.
(TestWebKitAPI::TEST(UnifiedPDF, KeyboardScrollingInSinglePageMode)): Deleted.
(TestWebKitAPI::TEST(UnifiedPDF, SnapshotsPaintPageContent)): Deleted.
(TestWebKitAPI::TEST(UnifiedPDF, CopyEditingCommandOnEmptySelectionShouldNotCrash)): Deleted.
* Tools/WebKitTestRunner/TestOptions.cpp:
(WTR::TestOptions::defaults):

Canonical link: https://commits.webkit.org/282888@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