Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 5d77774e94782f6e2feb16c78cc1555c416816b3
https://github.com/WebKit/WebKit/commit/5d77774e94782f6e2feb16c78cc1555c416816b3
Author: Cole Carley <[email protected]>
Date: 2026-08-18 (Tue, 18 Aug 2026)
Changed paths:
M Source/WebCore/platform/glib/UserAgentQuirks.cpp
M Tools/TestWebKitAPI/CMakeLists.txt
M Tools/TestWebKitAPI/PlatformGTK.cmake
M Tools/TestWebKitAPI/PlatformWPE.cmake
M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
A Tools/TestWebKitAPI/Tests/WebCore/Quirks.cpp
R Tools/TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp
A Tools/TestWebKitAPI/Tests/WebCore/glib/UserAgentQuirks.cpp
Log Message:
-----------
Add API tests for user agent override quirks
https://bugs.webkit.org/show_bug.cgi?id=321973
rdar://185153208
Reviewed by Zak Ridouh.
I am going to start making large changes to the quirking system. I want to be
sure
that my changes do not affect what quirks are active for which websites.
This patch adds API tests for the following static user agent quirks:
needsIPadMiniUserAgent, needsIPhoneUserAgent, and needsCustomUserAgentOverride.
I also moved Tools/TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp to
Tools/TestWebKitAPI/Tests/WebCore/glib/UserAgentQuirks.cpp.
Tests: Tools/TestWebKitAPI/Tests/WebCore/Quirks.cpp
Tools/TestWebKitAPI/Tests/WebCore/glib/UserAgentQuirks.cpp
* Source/WebCore/platform/glib/UserAgentQuirks.cpp:
* Tools/TestWebKitAPI/CMakeLists.txt:
* Tools/TestWebKitAPI/PlatformGTK.cmake:
* Tools/TestWebKitAPI/PlatformWPE.cmake:
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebCore/Quirks.cpp: Added.
(TestWebKitAPI::QuirksTest::SetUp):
(TestWebKitAPI::customUserAgentFor):
(TestWebKitAPI::TEST_F(QuirksTest, NeedsIPadMiniUserAgent)):
(TestWebKitAPI::TEST_F(QuirksTest, NeedsIPhoneUserAgent)):
(TestWebKitAPI::TEST_F(QuirksTest, NeedsCustomUserAgentOverrideNotAffected)):
(TestWebKitAPI::TEST_F(QuirksTest, NeedsCustomUserAgentOverrideOutlook)):
(TestWebKitAPI::TEST_F(QuirksTest, NeedsCustomUserAgentOverrideGroupCall)):
(TestWebKitAPI::TEST_F(QuirksTest,
NeedsCustomUserAgentOverrideIsRegistrableDomainGranularity)):
(TestWebKitAPI::TEST_F(QuirksTest,
NeedsCustomUserAgentOverrideRewritesBaseAgent)):
(TestWebKitAPI::TEST_F(QuirksTest,
NeedsCustomUserAgentOverrideAmazonPrimeVideo)):
* Tools/TestWebKitAPI/Tests/WebCore/glib/UserAgentQuirks.cpp: Renamed from
Tools/TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp.
(TestWebKitAPI::assertUserAgentForURLHasChromeBrowserQuirk):
(TestWebKitAPI::assertUserAgentForURLHasFirefoxBrowserQuirk):
(TestWebKitAPI::assertUserAgentForURLHasMacPlatformQuirk):
(TestWebKitAPI::assertUserAgentForURLHasAndroidQuirk):
(TestWebKitAPI::assertUserAgentForURLHasEmptyQuirk):
(TestWebKitAPI::assertUserAgentForURLHasNoQuirk):
(TestWebKitAPI::TEST(UserAgentTest, Quirks)):
Canonical link: https://commits.webkit.org/319391@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications