Skip to content
Permalink
Browse files
Re-enable HEIC tests
https://bugs.webkit.org/show_bug.cgi?id=240843
<rdar://90658250>

Reviewed by Per Arne Vollan.

Re-enable HEIC tests as although we are not supporting them in web content, we
want to re-enable them as the process they are testing is still being used in
Mail and other apps.

* LayoutTests/fast/images/heic-as-background-image-expected.html: Added.
* LayoutTests/fast/images/heic-as-background-image.html: Added.
* LayoutTests/fast/images/resources/green-400x400.heic: Added.
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac/TestExpectations:
* Source/WebCore/platform/RuntimeApplicationChecks.h:
* Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm:
(WebCore::CocoaApplication::isWebkitTestRunner):
* Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):

Canonical link: https://commits.webkit.org/250930@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294764 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
nmoucht committed May 24, 2022
1 parent 48fd255 commit b926cd42a8d2909b0e3b42140726c75679ba85f8
Showing 9 changed files with 43 additions and 10 deletions.
@@ -2110,6 +2110,7 @@ fast/images/gif-loop-count.html [ ImageOnlyFailure ]
# HEIF images are only supported on macOS and iOS post Mojave
fast/images/animated-heics-draw.html [ Skip ]
fast/images/animated-heics-verify.html [ Skip ]
fast/images/heic-as-background-image.html [ Skip ]

# WebP images are only supported on macOS and iOS post Catalina
fast/images/webp-as-image.html [ Skip ]
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<style>
.green-box {
width: 100px;
height: 100px;
background-color: green;
}
</style>
<body>
<div class="green-box"></div>
</body>

@@ -0,0 +1,11 @@
<!DOCTYPE html><!-- webkit-test-runner [ additionalSupportedImageTypes=public.heic;public.heics ] -->
<style>
.green-box {
width: 100px;
height: 100px;
background: url("resources/green-400x400.heic") 200px 200px;
}
</style>
<body>
<div class="green-box"></div>
</body>
Binary file not shown.
@@ -71,6 +71,11 @@ imported/w3c/web-platform-tests/speech-api/ [ Pass ]
accessibility
perf/accessibility-title-ui-element.html

# webkit.org/b/240843
fast/images/heic-as-background-image.html [ Pass ]
fast/images/animated-heics-verify.html [ Pass ]
fast/images/animated-heics-draw.html [ Pass ]

# No fullscreen API on iOS
fullscreen
http/tests/fullscreen
@@ -2962,10 +2967,6 @@ fast/forms/auto-fill-button/caps-lock-indicator-should-be-visible-after-hiding-a
fast/forms/auto-fill-button/caps-lock-indicator-should-not-be-visible-when-auto-fill-strong-password-button-is-visible.html [ Pass ]
fast/forms/password-scrolled-after-caps-lock-toggled.html [ Pass ]

# <rdar://problem/88980849>
fast/images/animated-heics-draw.html [ Skip ]
fast/images/animated-heics-verify.html [ Skip ]

# <rdar://problem/45056204> REGRESSION (iOS 13): Three cookie layout tests failing
http/wpt/beacon/cors/cors-preflight-cookie.html [ Failure ]

@@ -89,6 +89,11 @@ imported/w3c/web-platform-tests/speech-api [ Pass ]
# End platform-specific directories.
#//////////////////////////////////////////////////////////////////////////////////////////

# webkit.org/b/240843
fast/images/animated-heics-draw.html [ Pass ]
fast/images/animated-heics-verify.html [ Pass ]
fast/images/heic-as-background-image.html [ Pass ]

# <rdar://problem/5647952> fast/events/mouseout-on-window.html needs mac DRT to issue mouse out events
fast/events/mouseout-on-window.html [ Failure ]

@@ -1458,10 +1463,6 @@ webaudio/oscillator-sine.html [ Skip ]

webkit.org/b/190882 animations/change-one-anim.html [ Pass Failure ]

# <rdar://problem/88980849>
fast/images/animated-heics-draw.html [ Skip ]
fast/images/animated-heics-verify.html [ Skip ]

# <rdar://problem/40172428>
fast/text/woff2.html [ Pass ImageOnlyFailure ]

@@ -70,6 +70,7 @@ WEBCORE_EXPORT void clearApplicationBundleIdentifierTestingOverride();
namespace CocoaApplication {

WEBCORE_EXPORT bool isIBooks();
WEBCORE_EXPORT bool isWebkitTestRunner();

}

@@ -102,6 +102,12 @@ static bool applicationBundleIsEqualTo(const String& bundleIdentifierString)
return isIBooks;
}

bool CocoaApplication::isWebkitTestRunner()
{
static bool isWebkitTestRunner = applicationBundleIsEqualTo("com.apple.WebKit.WebKitTestRunner"_s);
return isWebkitTestRunner;
}

#if PLATFORM(MAC)

bool MacApplication::isSafari()
@@ -398,13 +398,13 @@ static AccessibilityPreferences accessibilityPreferences()

#if HAVE(VIDEO_RESTRICTED_DECODING)
#if PLATFORM(MAC)
if (MacApplication::isAppleMail()) {
if (MacApplication::isAppleMail() || CocoaApplication::isWebkitTestRunner()) {
if (auto trustdExtensionHandle = SandboxExtension::createHandleForMachLookup("com.apple.trustd.agent"_s, std::nullopt))
parameters.trustdExtensionHandle = WTFMove(*trustdExtensionHandle);
parameters.restrictImageAndVideoDecoders = true;
}
#else
parameters.restrictImageAndVideoDecoders = IOSApplication::isMobileMail() || IOSApplication::isMailCompositionService();
parameters.restrictImageAndVideoDecoders = IOSApplication::isMobileMail() || IOSApplication::isMailCompositionService() || CocoaApplication::isWebkitTestRunner();
#endif // PLATFORM(MAC)
#endif // HAVE(VIDEO_RESTRICTED_DECODING)

0 comments on commit b926cd4

Please sign in to comment.