[Cocoa] UTI from MIME type cache can be removed after r258915
https://bugs.webkit.org/show_bug.cgi?id=209787

Unreviewed rollout of r257828.

Source/WebCore:

In r257828, a UTI from MIME type cache was added to avoid connecting to a launch services daemon in the
WebContent process, but after <https://trac.webkit.org/changeset/258915> this cache is not strictly needed
anymore, since r258915 solves the problem of avoiding to connect to the daemon in a general way.


* platform/network/mac/UTIUtilities.h:
* platform/network/mac/UTIUtilities.mm:
(WebCore::UTIFromMIMETypeCachePolicy::createValueForKey):
(WebCore::mapUTIFromMIMEType): Deleted.
(WebCore::additionalMIMETypes): Deleted.
(WebCore::createUTIFromMIMETypeMap): Deleted.
(WebCore::setUTIFromMIMETypeMap): Deleted.
* testing/Internals.cpp:
(WebCore::Internals::getUTIFromMIMEType): Deleted.
* testing/Internals.h:
* testing/Internals.idl:
* testing/Internals.mm:
(WebCore::Internals::getUTIFromMIMEType): Deleted.

Source/WebKit:


* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

Tools:


* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/UTIFromMIMEType.mm: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@259374 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index bbbb217..f16dac0 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,28 @@
+2020-04-01  Per Arne Vollan  <pvollan@apple.com>
+
+        [Cocoa] UTI from MIME type cache can be removed after r258915
+        https://bugs.webkit.org/show_bug.cgi?id=209787
+
+        Unreviewed rollout of r257828.
+
+        In r257828, a UTI from MIME type cache was added to avoid connecting to a launch services daemon in the
+        WebContent process, but after <https://trac.webkit.org/changeset/258915> this cache is not strictly needed
+        anymore, since r258915 solves the problem of avoiding to connect to the daemon in a general way.
+
+        * platform/network/mac/UTIUtilities.h:
+        * platform/network/mac/UTIUtilities.mm:
+        (WebCore::UTIFromMIMETypeCachePolicy::createValueForKey):
+        (WebCore::mapUTIFromMIMEType): Deleted.
+        (WebCore::additionalMIMETypes): Deleted.
+        (WebCore::createUTIFromMIMETypeMap): Deleted.
+        (WebCore::setUTIFromMIMETypeMap): Deleted.
+        * testing/Internals.cpp:
+        (WebCore::Internals::getUTIFromMIMEType): Deleted.
+        * testing/Internals.h:
+        * testing/Internals.idl:
+        * testing/Internals.mm:
+        (WebCore::Internals::getUTIFromMIMEType): Deleted.
+
 2020-04-01  Chris Dumez  <cdumez@apple.com>
 
         http/tests/navigation/page-cache-fontfaceset.html is flaky crashing
diff --git a/Source/WebCore/platform/network/mac/UTIUtilities.h b/Source/WebCore/platform/network/mac/UTIUtilities.h
index 09ab09f..5d1895f 100644
--- a/Source/WebCore/platform/network/mac/UTIUtilities.h
+++ b/Source/WebCore/platform/network/mac/UTIUtilities.h
@@ -25,7 +25,7 @@
 
 #pragma once
 
-#include <wtf/text/WTFString.h>
+#import <wtf/Forward.h>
 
 namespace WebCore {
 
@@ -34,7 +34,4 @@
 WEBCORE_EXPORT String UTIFromMIMEType(const String&);
 bool isDeclaredUTI(const String&);
 WEBCORE_EXPORT String UTIFromTag(const String& tagClass, const String& tag, const String& conformingToUTI);
-
-WEBCORE_EXPORT void setUTIFromMIMETypeMap(HashMap<String, String>&&);
-WEBCORE_EXPORT const HashMap<String, String>& createUTIFromMIMETypeMap();
 }
diff --git a/Source/WebCore/platform/network/mac/UTIUtilities.mm b/Source/WebCore/platform/network/mac/UTIUtilities.mm
index 3d2acfc..ba98d28 100644
--- a/Source/WebCore/platform/network/mac/UTIUtilities.mm
+++ b/Source/WebCore/platform/network/mac/UTIUtilities.mm
@@ -26,7 +26,6 @@
 #import "config.h"
 #import "UTIUtilities.h"
 
-#import "MIMETypeRegistry.h"
 #import <wtf/MainThread.h>
 #import <wtf/TinyLRUCache.h>
 #import <wtf/text/StringHash.h>
@@ -42,8 +41,6 @@
 #define ADDITIONAL_UTI_MAPPINGS
 #endif
 
-#define EMPTY_MIME_TYPE_STRING "emptyMimeType"_s
-
 namespace WebCore {
 
 String MIMETypeFromUTI(const String& uti)
@@ -117,30 +114,14 @@
     return mapEntry->value;
 }
 
-static Optional<HashMap<String, String>>& mapUTIFromMIMEType()
-{
-    static NeverDestroyed<Optional<HashMap<String, String>>> map;
-    return map;
-}
-
 struct UTIFromMIMETypeCachePolicy : TinyLRUCachePolicy<String, String> {
 public:
     static String createValueForKey(const String& mimeType)
     {
-        String key = mimeType;
-        if (mapUTIFromMIMEType().hasValue()) {
-            if (key.isEmpty())
-                key = EMPTY_MIME_TYPE_STRING;
-            const auto& it = mapUTIFromMIMEType()->find(key);
-            if (it != mapUTIFromMIMEType()->end())
-                return it->value;
-            WTFLogAlways("UTI for MIME type %s not found.", key.utf8().data());
-            return UTIFromUnknownMIMEType(key);
-        }
-        auto type = adoptCF(UTTypeCreatePreferredIdentifierForTag(kUTTagClassMIMEType, key.createCFString().get(), 0));
+        auto type = adoptCF(UTTypeCreatePreferredIdentifierForTag(kUTTagClassMIMEType, mimeType.createCFString().get(), 0));
         if (type)
             return type.get();
-        return UTIFromUnknownMIMEType(key);
+        return UTIFromUnknownMIMEType(mimeType);
     }
 };
 
@@ -167,39 +148,4 @@
     return String(u.get());
 }
 
-static const Vector<String>& additionalMIMETypes()
-{
-    static NeverDestroyed<Vector<String>> mimeTypes = std::initializer_list<String> {
-        "application/zip"_s,
-    };
-    return mimeTypes;
-}
-
-const HashMap<String, String>& createUTIFromMIMETypeMap()
-{
-    static NeverDestroyed<HashMap<String, String>> map = [] {
-        HashMap<String, String> cache;
-        for (auto mimeType : MIMETypeRegistry::supportedImageMIMETypes())
-            cache.add(mimeType, UTIFromMIMEType(mimeType));
-        for (auto mimeType : MIMETypeRegistry::supportedNonImageMIMETypes())
-            cache.add(mimeType, UTIFromMIMEType(mimeType));
-        for (auto mimeType : MIMETypeRegistry::unsupportedTextMIMETypes())
-            cache.add(mimeType, UTIFromMIMEType(mimeType));
-        for (auto mimeType : MIMETypeRegistry::supportedMediaMIMETypes())
-            cache.add(mimeType, UTIFromMIMEType(mimeType));
-        for (auto mimeType : MIMETypeRegistry::pdfMIMETypes())
-            cache.add(mimeType, UTIFromMIMEType(mimeType));
-        for (auto mimeType : additionalMIMETypes())
-            cache.add(mimeType, UTIFromMIMEType(mimeType));
-        cache.add(EMPTY_MIME_TYPE_STRING, UTIFromMIMEType(emptyString()));
-        return cache;
-    }();
-    return map;
-}
-
-void setUTIFromMIMETypeMap(HashMap<String, String>&& map)
-{
-    mapUTIFromMIMEType() = WTFMove(map);
-}
-
 }
diff --git a/Source/WebCore/testing/Internals.cpp b/Source/WebCore/testing/Internals.cpp
index 945ddfd..5fbc8e4 100644
--- a/Source/WebCore/testing/Internals.cpp
+++ b/Source/WebCore/testing/Internals.cpp
@@ -5532,11 +5532,6 @@
     return emptyString();
 }
 
-String Internals::getUTIFromMIMEType(const String&)
-{
-    return emptyString();
-}
-
 String Internals::getUTIFromTag(const String&, const String&, const String&)
 {
     return emptyString();
diff --git a/Source/WebCore/testing/Internals.h b/Source/WebCore/testing/Internals.h
index 124f0ec..fe4b579 100644
--- a/Source/WebCore/testing/Internals.h
+++ b/Source/WebCore/testing/Internals.h
@@ -952,7 +952,6 @@
 
     String mediaMIMETypeForExtension(const String& extension);
 
-    String getUTIFromMIMEType(const String& mimeType);
     String getUTIFromTag(const String& tagClass, const String& tag, const String& conformingToUTI);
 
     bool supportsPictureInPicture();
diff --git a/Source/WebCore/testing/Internals.idl b/Source/WebCore/testing/Internals.idl
index 6de2685..4f9cda4e 100644
--- a/Source/WebCore/testing/Internals.idl
+++ b/Source/WebCore/testing/Internals.idl
@@ -856,7 +856,6 @@
 
     DOMString mediaMIMETypeForExtension(DOMString extension);
 
-    DOMString getUTIFromMIMEType(DOMString mimeType);
     DOMString getUTIFromTag(DOMString tagClass, DOMString tag, DOMString conformingToUTI);
 
     boolean supportsPictureInPicture();
diff --git a/Source/WebCore/testing/Internals.mm b/Source/WebCore/testing/Internals.mm
index 20a4648..f89416c 100644
--- a/Source/WebCore/testing/Internals.mm
+++ b/Source/WebCore/testing/Internals.mm
@@ -102,11 +102,6 @@
     return encodedString;
 }
 
-String Internals::getUTIFromMIMEType(const String& mimeType)
-{
-    return UTIFromMIMEType(mimeType);
-}
-
 String Internals::getUTIFromTag(const String& tagClass, const String& tag, const String& conformingToUTI)
 {
     return UTIFromTag(tagClass, tag, conformingToUTI);
diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog
index 19a70eb..cd21430 100644
--- a/Source/WebKit/ChangeLog
+++ b/Source/WebKit/ChangeLog
@@ -1,5 +1,21 @@
 2020-04-01  Per Arne Vollan  <pvollan@apple.com>
 
+        [Cocoa] UTI from MIME type cache can be removed after r258915
+        https://bugs.webkit.org/show_bug.cgi?id=209787
+
+        Unreviewed rollout of r257828.
+
+        * Shared/WebProcessCreationParameters.cpp:
+        (WebKit::WebProcessCreationParameters::encode const):
+        (WebKit::WebProcessCreationParameters::decode):
+        * Shared/WebProcessCreationParameters.h:
+        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+        (WebKit::WebProcessPool::platformInitializeWebProcess):
+        * WebProcess/cocoa/WebProcessCocoa.mm:
+        (WebKit::WebProcess::platformInitializeWebProcess):
+
+2020-04-01  Per Arne Vollan  <pvollan@apple.com>
+
         [macOS] Deny mach-lookup access to "com.apple.lsd.mapdb" in sandbox
         https://bugs.webkit.org/show_bug.cgi?id=209814
 
diff --git a/Source/WebKit/Shared/WebProcessCreationParameters.cpp b/Source/WebKit/Shared/WebProcessCreationParameters.cpp
index 9dcfe9ba..c969a65 100644
--- a/Source/WebKit/Shared/WebProcessCreationParameters.cpp
+++ b/Source/WebKit/Shared/WebProcessCreationParameters.cpp
@@ -172,7 +172,6 @@
     encoder << mapDBExtensionHandle;
     encoder << systemHasBattery;
     encoder << mimeTypesMap;
-    encoder << mapUTIFromMIMEType;
 #endif
 
 #if PLATFORM(IOS_FAMILY)
@@ -475,12 +474,6 @@
     if (!mimeTypesMap)
         return false;
     parameters.mimeTypesMap = WTFMove(*mimeTypesMap);
-
-    Optional<HashMap<String, String>> mapUTIFromMIMEType;
-    decoder >> mapUTIFromMIMEType;
-    if (!mapUTIFromMIMEType)
-        return false;
-    parameters.mapUTIFromMIMEType = WTFMove(*mapUTIFromMIMEType);
 #endif
 
 #if PLATFORM(IOS_FAMILY)
diff --git a/Source/WebKit/Shared/WebProcessCreationParameters.h b/Source/WebKit/Shared/WebProcessCreationParameters.h
index 1160d6b..bf43cfc 100644
--- a/Source/WebKit/Shared/WebProcessCreationParameters.h
+++ b/Source/WebKit/Shared/WebProcessCreationParameters.h
@@ -213,7 +213,6 @@
     Optional<SandboxExtension::Handle> mapDBExtensionHandle;
     bool systemHasBattery { false };
     Optional<HashMap<String, Vector<String>, ASCIICaseInsensitiveHash>> mimeTypesMap;
-    HashMap<String, String> mapUTIFromMIMEType;
 #endif
 
 #if PLATFORM(IOS_FAMILY)
diff --git a/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm b/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
index abdf894..1261026 100644
--- a/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
+++ b/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
@@ -405,7 +405,6 @@
     }
     parameters.systemHasBattery = systemHasBattery();
     parameters.mimeTypesMap = commonMimeTypesMap();
-    parameters.mapUTIFromMIMEType = createUTIFromMIMETypeMap();
 
     SandboxExtension::Handle mapDBHandle;
     SandboxExtension::createHandleForMachLookup("com.apple.lsd.mapdb", WTF::nullopt, mapDBHandle, SandboxExtension::Flags::NoReport);
diff --git a/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm b/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
index 94aead9..f22c025 100644
--- a/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
+++ b/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
@@ -285,8 +285,6 @@
 
     if (parameters.mimeTypesMap)
         overriddenMimeTypesMap() = WTFMove(parameters.mimeTypesMap);
-
-    setUTIFromMIMETypeMap(WTFMove(parameters.mapUTIFromMIMEType));
 #endif
 
 #if PLATFORM(IOS_FAMILY)
diff --git a/Tools/ChangeLog b/Tools/ChangeLog
index f25bbc5..3993fbb 100644
--- a/Tools/ChangeLog
+++ b/Tools/ChangeLog
@@ -1,3 +1,13 @@
+2020-04-01  Per Arne Vollan  <pvollan@apple.com>
+
+        [Cocoa] UTI from MIME type cache can be removed after r258915
+        https://bugs.webkit.org/show_bug.cgi?id=209787
+
+        Unreviewed rollout of r257828.
+
+        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+        * TestWebKitAPI/Tests/WebKit/UTIFromMIMEType.mm: Removed.
+
 2020-04-01  Jonathan Bedard  <jbedard@apple.com>
 
         run-javascriptcore-tests: runJSCStressTests shouldn't exit the program
diff --git a/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj b/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
index ede3f1b..b6521cc 100644
--- a/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
+++ b/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
@@ -887,7 +887,6 @@
 		C15CBB3023F1FF1A00300CC7 /* BacklightLevelNotification.mm in Sources */ = {isa = PBXBuildFile; fileRef = C15CBB2F23F1FF1A00300CC7 /* BacklightLevelNotification.mm */; };
 		C15CBB3F23FB177A00300CC7 /* PreferenceChanges.mm in Sources */ = {isa = PBXBuildFile; fileRef = C15CBB3E23FB177A00300CC7 /* PreferenceChanges.mm */; };
 		C1692DCA23D10DAE006E88F7 /* Battery.mm in Sources */ = {isa = PBXBuildFile; fileRef = C1692DC923D10DAE006E88F7 /* Battery.mm */; };
-		C194E31D2409DF43002939ED /* UTIFromMIMEType.mm in Sources */ = {isa = PBXBuildFile; fileRef = C194E31C2409DF43002939ED /* UTIFromMIMEType.mm */; };
 		C20F88A72295B96700D610FA /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C20F88A62295B96700D610FA /* CoreText.framework */; };
 		C22FA32B228F8708009D7988 /* TextWidth.mm in Sources */ = {isa = PBXBuildFile; fileRef = C22FA32A228F8708009D7988 /* TextWidth.mm */; };
 		C22FA32D228F8AEB009D7988 /* TextWidth.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = C22FA32C228F877A009D7988 /* TextWidth.html */; };
@@ -2465,7 +2464,6 @@
 		C15CBB2F23F1FF1A00300CC7 /* BacklightLevelNotification.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = BacklightLevelNotification.mm; sourceTree = "<group>"; };
 		C15CBB3E23FB177A00300CC7 /* PreferenceChanges.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PreferenceChanges.mm; sourceTree = "<group>"; };
 		C1692DC923D10DAE006E88F7 /* Battery.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = Battery.mm; sourceTree = "<group>"; };
-		C194E31C2409DF43002939ED /* UTIFromMIMEType.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = UTIFromMIMEType.mm; sourceTree = "<group>"; };
 		C1D8EE212028E8E3008EB141 /* WebProcessTerminate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebProcessTerminate.mm; sourceTree = "<group>"; };
 		C20F88A62295B96700D610FA /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; };
 		C22FA32A228F8708009D7988 /* TextWidth.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = TextWidth.mm; sourceTree = "<group>"; };
@@ -2928,7 +2926,6 @@
 				E325C90623E3870200BC7D3B /* PictureInPictureSupport.mm */,
 				C15CBB3E23FB177A00300CC7 /* PreferenceChanges.mm */,
 				C149D54F242E9844003EBB12 /* SleepDisabler.mm */,
-				C194E31C2409DF43002939ED /* UTIFromMIMEType.mm */,
 				E3CAAA4B2415505100CED2E2 /* UTIFromTag.mm */,
 				0F139E751A423A5300F590F5 /* WeakObjCPtr.mm */,
 			);
@@ -5134,7 +5131,6 @@
 				07F4E92E20AF59E2002E3803 /* UserMediaSimulateFailedSandbox.mm in Sources */,
 				7CCE7F181A411AE600447C4C /* UserMessage.cpp in Sources */,
 				2EB242B821D4140B0055C1C0 /* UseSelectionAsFindString.mm in Sources */,
-				C194E31D2409DF43002939ED /* UTIFromMIMEType.mm in Sources */,
 				E3CAAA4C2415505100CED2E2 /* UTIFromTag.mm in Sources */,
 				7C83E03A1D0A602700FEBCF3 /* UtilitiesCocoa.mm in Sources */,
 				7C83E0C61D0A654E00FEBCF3 /* VideoControlsManager.mm in Sources */,
diff --git a/Tools/TestWebKitAPI/Tests/WebKit/UTIFromMIMEType.mm b/Tools/TestWebKitAPI/Tests/WebKit/UTIFromMIMEType.mm
deleted file mode 100644
index 3f7365c..0000000
--- a/Tools/TestWebKitAPI/Tests/WebKit/UTIFromMIMEType.mm
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2020 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#if WK_HAVE_C_SPI
-
-#import "PlatformUtilities.h"
-#import "TestWKWebView.h"
-#import <WebCore/MIMETypeRegistry.h>
-#import <WebCore/UTIUtilities.h>
-
-TEST(WebKit, UTIFromMIMEType)
-{
-    auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
-    WKRetainPtr<WKContextRef> context = adoptWK(TestWebKitAPI::Util::createContextForInjectedBundleTest("InternalsInjectedBundleTest"));
-    configuration.get().processPool = (WKProcessPool *)context.get();
-    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 300, 300) configuration:configuration.get() addToWindow:YES]);
-
-    for (auto& mimeType : WebCore::MIMETypeRegistry::supportedImageMIMETypes()) {
-        auto js = [NSString stringWithFormat:@"window.internals.getUTIFromMIMEType(\"%s\")", mimeType.utf8().data()];
-
-        auto uti = [webView stringByEvaluatingJavaScript:js];
-
-        ASSERT_TRUE(WebCore::UTIFromMIMEType(mimeType) == String(uti));
-    }
-}
-
-#endif // WK_HAVE_C_SPI