Bug 241342 - REGRESSION: [iOS] TestWebKitAPI.HSTS.ThirdParty is consistently failing
Summary: REGRESSION: [iOS] TestWebKitAPI.HSTS.ThirdParty is consistently failing
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Karl Rackler
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-06-06 11:48 PDT by Ryan Haddad
Modified: 2022-06-09 14:41 PDT (History)
6 users (show)

See Also:


Attachments
Patch (1.80 KB, patch)
2022-06-09 10:23 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Haddad 2022-06-06 11:48:01 PDT
TestWebKitAPI.HSTS.ThirdParty
        
        /Volumes/Data/worker/Apple-iOS-15-Simulator-Release-Build/build/Tools/TestWebKitAPI/Tests/WebKitCocoa/HSTS.mm:117
        Expected equality of these values:
          [webView _test_waitForAlert]
            Which is: " "
          "http://example.com/ hi"
        
        
        /Volumes/Data/worker/Apple-iOS-15-Simulator-Release-Build/build/Tools/TestWebKitAPI/Tests/WebKitCocoa/HSTS.mm:118
        Expected equality of these values:
          httpServer.totalRequests()
            Which is: 1
          2u
            Which is: 2

https://results.webkit.org/?suite=api-tests&test=TestWebKitAPI.HSTS.ThirdParty
Comment 1 Radar WebKit Bug Importer 2022-06-06 11:48:10 PDT
<rdar://problem/94448628>
Comment 2 Ryan Haddad 2022-06-06 12:03:29 PDT
This test makes requests to example.com, maybe it is the same as https://bugs.webkit.org/show_bug.cgi?id=241233?
Comment 3 Karl Rackler 2022-06-08 14:15:05 PDT
I have disabled this test for iOS while this issue is investigated.
Comment 4 Karl Rackler 2022-06-08 14:20:15 PDT
Pull request: https://github.com/WebKit/WebKit/pull/1392
Comment 5 EWS 2022-06-08 16:06:11 PDT
Test gardening commit r295398 (251404@main): <https://commits.webkit.org/251404@main>

Reviewed commits have been landed. Closing PR #1392 and removing active labels.
Comment 6 Alex Christensen 2022-06-08 21:24:49 PDT
Aha!  determineITPStateInternal is returning true on macOS and false on iOS, which causes ITP to be enabled by default on macOS but not iOS, which causes the HSTS mitigation to happen on macOS but not iOS.  The code is fine, the test needs to just enable ITP everywhere.
Comment 7 Alex Christensen 2022-06-09 10:23:36 PDT
Created attachment 460136 [details]
Patch
Comment 8 EWS 2022-06-09 14:41:53 PDT
Committed r295437 (251443@main): <https://commits.webkit.org/251443@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 460136 [details].