Title: [210143] trunk
Revision
210143
Author
[email protected]
Date
2016-12-23 17:14:59 -0800 (Fri, 23 Dec 2016)

Log Message

[iOS] Fix some crashing webarchive tests
https://bugs.webkit.org/show_bug.cgi?id=166470

Reviewed by Andreas Kling.

Tools:

Tests that use TestRunner.dumpDOMAsWebArchive() crashed on iOS due to a stub implementation
of WebArchiveDumpSupport in WebKitTestRunner. The Mac implementation works fine on iOS too,
so this change uses that on both platforms.

* WebKitTestRunner/Configurations/InjectedBundle.xcconfig: Removed
WebArchiveDumpSupportMac.mm from EXCLUDED_SOURCE_FILE_NAMES.
* WebKitTestRunner/InjectedBundle/cocoa/WebArchiveDumpSupportCocoa.mm: Renamed from
Tools/WebKitTestRunner/mac/WebArchiveDumpSupportMac.mm.
* WebKitTestRunner/PlatformMac.cmake:
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
* WebKitTestRunner/ios/WebArchiveDumpSupportIOS.mm: Removed.

LayoutTests:

Removed entries for previously crashing/failing tests.

* platform/ios-simulator-wk2/TestExpectations:
* platform/ios-simulator/TestExpectations:

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (210142 => 210143)


--- trunk/LayoutTests/ChangeLog	2016-12-24 00:23:37 UTC (rev 210142)
+++ trunk/LayoutTests/ChangeLog	2016-12-24 01:14:59 UTC (rev 210143)
@@ -1,3 +1,15 @@
+2016-12-23  Andy Estes  <[email protected]>
+
+        [iOS] Fix some crashing webarchive tests
+        https://bugs.webkit.org/show_bug.cgi?id=166470
+
+        Reviewed by Andreas Kling.
+
+        Removed entries for previously crashing/failing tests.
+
+        * platform/ios-simulator-wk2/TestExpectations:
+        * platform/ios-simulator/TestExpectations:
+
 2016-12-23  Andreas Kling  <[email protected]>
 
         REGRESSION(r209865): Crash when navigating back to some pages with compositing layers.

Modified: trunk/LayoutTests/platform/ios-simulator/TestExpectations (210142 => 210143)


--- trunk/LayoutTests/platform/ios-simulator/TestExpectations	2016-12-24 00:23:37 UTC (rev 210142)
+++ trunk/LayoutTests/platform/ios-simulator/TestExpectations	2016-12-24 01:14:59 UTC (rev 210143)
@@ -1003,7 +1003,6 @@
 userscripts/user-script-plugin-document.html [ Failure ]
 
 # Webarchive tests that fail:
-webarchive/loading/video-in-webarchive.html [ Failure ]
 webarchive/test-css-url-resources-in-stylesheets.html [ Failure ]
 webarchive/test-css-url-resources-inline-styles.html [ Failure ]
 webarchive/test-link-rel-icon.html [ Failure ]

Modified: trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations (210142 => 210143)


--- trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations	2016-12-24 00:23:37 UTC (rev 210142)
+++ trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations	2016-12-24 01:14:59 UTC (rev 210143)
@@ -323,29 +323,9 @@
 # <rdar://problem/19223413> ASSERT(animatedTypes[0].properties.size() == 1) failed in SVGAnimatedTypeAnimator::constructFromBaseValue()
 svg/animations/unsupported-animate-element-attributes.svg
 
-# Webarchive tests that fail with stderr:
-webarchive/adopt-attribute-styled-body-webarchive.html
-webarchive/adopt-attribute-styled-node-webarchive.html
-webarchive/adopt-inline-styled-node-webarchive.html
-webarchive/archive-with-unencoded-url.html
-webarchive/test-body-background.html
-webarchive/test-css-url-resources-in-stylesheets.html
-webarchive/test-css-url-resources-inline-styles.html
-webarchive/test-duplicate-resources.html
-webarchive/test-frameset.html
-webarchive/test-img-src.html
-webarchive/test-input-src.html
-webarchive/test-object-data.html
-webarchive/test-table-background.html
-webarchive/test-td-background.html
-webarchive/test-xml-stylesheet.xml
-
 # Webarchive tests that fail:
 webarchive/archive-empty-frame-source.html [ Failure ]
 webarchive/doctype.html [ Failure ]
-webarchive/test-css-import.html [ Failure ]
-webarchive/test-link-href.html [ Failure ]
-webarchive/test-script-src.html [ Failure ]
 
 # HTTP tests that fail:
 http/tests/appcache/load-from-appcache-defer-resume-crash.html [ Failure ]

Modified: trunk/Tools/ChangeLog (210142 => 210143)


--- trunk/Tools/ChangeLog	2016-12-24 00:23:37 UTC (rev 210142)
+++ trunk/Tools/ChangeLog	2016-12-24 01:14:59 UTC (rev 210143)
@@ -1,3 +1,22 @@
+2016-12-23  Andy Estes  <[email protected]>
+
+        [iOS] Fix some crashing webarchive tests
+        https://bugs.webkit.org/show_bug.cgi?id=166470
+
+        Reviewed by Andreas Kling.
+
+        Tests that use TestRunner.dumpDOMAsWebArchive() crashed on iOS due to a stub implementation
+        of WebArchiveDumpSupport in WebKitTestRunner. The Mac implementation works fine on iOS too,
+        so this change uses that on both platforms.
+
+        * WebKitTestRunner/Configurations/InjectedBundle.xcconfig: Removed
+        WebArchiveDumpSupportMac.mm from EXCLUDED_SOURCE_FILE_NAMES.
+        * WebKitTestRunner/InjectedBundle/cocoa/WebArchiveDumpSupportCocoa.mm: Renamed from
+        Tools/WebKitTestRunner/mac/WebArchiveDumpSupportMac.mm.
+        * WebKitTestRunner/PlatformMac.cmake:
+        * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
+        * WebKitTestRunner/ios/WebArchiveDumpSupportIOS.mm: Removed.
+
 2016-12-22  Saam Barati  <[email protected]>
 
         WebAssembly: Silence the output of the spec-tests

Modified: trunk/Tools/WebKitTestRunner/Configurations/InjectedBundle.xcconfig (210142 => 210143)


--- trunk/Tools/WebKitTestRunner/Configurations/InjectedBundle.xcconfig	2016-12-24 00:23:37 UTC (rev 210142)
+++ trunk/Tools/WebKitTestRunner/Configurations/InjectedBundle.xcconfig	2016-12-24 01:14:59 UTC (rev 210143)
@@ -35,5 +35,5 @@
 OTHER_LDFLAGS_PLATFORM[sdk=iphone*] = -framework CFNetwork -framework CoreFoundation -framework CoreGraphics -framework Foundation -framework UIKit;
 OTHER_LDFLAGS_PLATFORM[sdk=macosx*] = -framework Carbon -framework Cocoa;
 
-EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*] = AccessibilityControllerMac.mm AccessibilityTextMarkerMac.mm AccessibilityUIElementMac.mm ActivateFonts.mm InjectedBundleMac.mm InjectedBundlePageMac.mm WebArchiveDumpSupportMac.mm;
+EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*] = AccessibilityControllerMac.mm AccessibilityTextMarkerMac.mm AccessibilityUIElementMac.mm ActivateFonts.mm InjectedBundleMac.mm InjectedBundlePageMac.mm;
 EXCLUDED_SOURCE_FILE_NAMES[sdk=macosx*] = *IOS.*;

Copied: trunk/Tools/WebKitTestRunner/InjectedBundle/cocoa/WebArchiveDumpSupportCocoa.mm (from rev 210142, trunk/Tools/WebKitTestRunner/mac/WebArchiveDumpSupportMac.mm) (0 => 210143)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/cocoa/WebArchiveDumpSupportCocoa.mm	                        (rev 0)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/cocoa/WebArchiveDumpSupportCocoa.mm	2016-12-24 01:14:59 UTC (rev 210143)
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2010-2016 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 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 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.
+ */
+
+#import "config.h"
+#import "WebArchiveDumpSupport.h"
+
+#import <CFNetwork/CFHTTPMessage.h>
+#import <Foundation/Foundation.h>
+#import <WebKit/WebHTMLRepresentation.h>
+#import <wtf/RetainPtr.h>
+
+extern "C" {
+
+enum CFURLCacheStoragePolicy {
+    kCFURLCacheStorageAllowed = 0,
+    kCFURLCacheStorageAllowedInMemoryOnly = 1,
+    kCFURLCacheStorageNotAllowed = 2
+};
+typedef enum CFURLCacheStoragePolicy CFURLCacheStoragePolicy;
+
+extern const CFStringRef kCFHTTPVersion1_1;
+
+CFURLResponseRef CFURLResponseCreate(CFAllocatorRef, CFURLRef, CFStringRef mimeType, SInt64 expectedContentLength, CFStringRef textEncodingName, CFURLCacheStoragePolicy recommendedPolicy);
+CFURLResponseRef CFURLResponseCreateWithHTTPResponse(CFAllocatorRef, CFURLRef, CFHTTPMessageRef httpResponse, CFURLCacheStoragePolicy recommendedPolicy);
+void CFURLResponseSetExpectedContentLength(CFURLResponseRef, SInt64 length);
+void CFURLResponseSetMIMEType(CFURLResponseRef, CFStringRef mimeType);
+
+}
+
+CFURLResponseRef createCFURLResponseFromResponseData(CFDataRef responseData)
+{
+    RetainPtr<NSKeyedUnarchiver> unarchiver = adoptNS([[NSKeyedUnarchiver alloc] initForReadingWithData:(NSData *)responseData]);
+    NSURLResponse *response = [unarchiver decodeObjectForKey:@"WebResourceResponse"]; // WebResourceResponseKey in WebResource.m
+    [unarchiver finishDecoding];
+
+    if (![response isKindOfClass:[NSHTTPURLResponse class]])
+        return CFURLResponseCreate(kCFAllocatorDefault, (CFURLRef)response.URL, (CFStringRef)response.MIMEType, response.expectedContentLength, (CFStringRef)response.textEncodingName, kCFURLCacheStorageAllowed);
+
+    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response;
+
+    // NSURLResponse is not toll-free bridged to CFURLResponse.
+    RetainPtr<CFHTTPMessageRef> httpMessage = adoptCF(CFHTTPMessageCreateResponse(kCFAllocatorDefault, httpResponse.statusCode, nullptr, kCFHTTPVersion1_1));
+
+    NSDictionary *headerFields = httpResponse.allHeaderFields;
+    for (NSString *headerField in [headerFields keyEnumerator])
+        CFHTTPMessageSetHeaderFieldValue(httpMessage.get(), (CFStringRef)headerField, (CFStringRef)[headerFields objectForKey:headerField]);
+
+    return CFURLResponseCreateWithHTTPResponse(kCFAllocatorDefault, (CFURLRef)response.URL, httpMessage.get(), kCFURLCacheStorageAllowed);
+}
+
+CFArrayRef supportedNonImageMIMETypes()
+{
+    return (CFArrayRef)[WebHTMLRepresentation supportedNonImageMIMETypes];
+}

Modified: trunk/Tools/WebKitTestRunner/PlatformMac.cmake (210142 => 210143)


--- trunk/Tools/WebKitTestRunner/PlatformMac.cmake	2016-12-24 00:23:37 UTC (rev 210142)
+++ trunk/Tools/WebKitTestRunner/PlatformMac.cmake	2016-12-24 01:14:59 UTC (rev 210143)
@@ -32,12 +32,12 @@
 )
 
 list(APPEND WebKitTestRunnerInjectedBundle_SOURCES
-    ${WEBKIT_TESTRUNNER_DIR}/mac/WebArchiveDumpSupportMac.mm
     ${WEBKIT_TESTRUNNER_DIR}/cocoa/CrashReporterInfo.mm
     ${WEBKIT_TESTRUNNER_DIR}/cf/WebArchiveDumpSupport.cpp
 
     ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/cocoa/ActivateFontsCocoa.mm
     ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/cocoa/InjectedBundlePageCocoa.mm
+    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/cocoa/WebArchiveDumpSupportCocoa.mm
 
     ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/mac/AccessibilityControllerMac.mm
     ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/mac/AccessibilityNotificationHandler.mm

Modified: trunk/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj (210142 => 210143)


--- trunk/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj	2016-12-24 00:23:37 UTC (rev 210142)
+++ trunk/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj	2016-12-24 01:14:59 UTC (rev 210143)
@@ -70,7 +70,6 @@
 		2E63ED911891ADAD002A7AFC /* PlatformWebViewIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2EE52D131890A9FB0010ED21 /* PlatformWebViewIOS.mm */; };
 		2E63ED921891ADAD002A7AFC /* TestControllerIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2EE52D141890A9FB0010ED21 /* TestControllerIOS.mm */; };
 		2E63ED941891ADAD002A7AFC /* mainIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2EE52D161890A9FB0010ED21 /* mainIOS.mm */; };
-		2E63ED9E1891AEC1002A7AFC /* WebArchiveDumpSupportIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2EE52D151890A9FB0010ED21 /* WebArchiveDumpSupportIOS.mm */; };
 		2E63EDA11891B291002A7AFC /* AccessibilityUIElementIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2E63ED781891ACE9002A7AFC /* AccessibilityUIElementIOS.mm */; };
 		2E63EDA61891BDC0002A7AFC /* TestRunner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCC9981711D3F51E0017BCA2 /* TestRunner.cpp */; };
 		2E749BF21891EBFA007FC175 /* EventSenderProxyIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2E63ED7A1891ACE9002A7AFC /* EventSenderProxyIOS.mm */; };
@@ -79,7 +78,7 @@
 		5641E2D014335E95008307E5 /* JSTextInputController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5641E2CE14335E95008307E5 /* JSTextInputController.cpp */; };
 		5664A49A14326384008881BE /* TextInputController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5664A49814326384008881BE /* TextInputController.cpp */; };
 		5670B8281386FCA5002EB355 /* EventSenderProxy.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5670B8271386FCA5002EB355 /* EventSenderProxy.mm */; };
-		5C45C30F17398E290079714E /* WebArchiveDumpSupportMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C45C30E17398E290079714E /* WebArchiveDumpSupportMac.mm */; };
+		5C45C30F17398E290079714E /* WebArchiveDumpSupportCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C45C30E17398E290079714E /* WebArchiveDumpSupportCocoa.mm */; };
 		5C45C31317398E480079714E /* WebArchiveDumpSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C45C31117398E480079714E /* WebArchiveDumpSupport.cpp */; };
 		6510A78211EC643800410867 /* AHEM____.TTF in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77711EC643800410867 /* AHEM____.TTF */; };
 		6510A78411EC643800410867 /* WebKitWeightWatcher100.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77911EC643800410867 /* WebKitWeightWatcher100.ttf */; };
@@ -252,7 +251,6 @@
 		2EE52CEA1890A9A80010ED21 /* WebKitTestRunnerApp-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "WebKitTestRunnerApp-Info.plist"; path = "WebKitTestRunnerApp/WebKitTestRunnerApp-Info.plist"; sourceTree = "<group>"; };
 		2EE52D131890A9FB0010ED21 /* PlatformWebViewIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlatformWebViewIOS.mm; sourceTree = "<group>"; };
 		2EE52D141890A9FB0010ED21 /* TestControllerIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TestControllerIOS.mm; sourceTree = "<group>"; };
-		2EE52D151890A9FB0010ED21 /* WebArchiveDumpSupportIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebArchiveDumpSupportIOS.mm; sourceTree = "<group>"; };
 		2EE52D161890A9FB0010ED21 /* mainIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = mainIOS.mm; path = ../ios/mainIOS.mm; sourceTree = "<group>"; };
 		3110BE0F15BA011400D216AC /* WebNotificationProvider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebNotificationProvider.h; sourceTree = "<group>"; };
 		3164C8EF15D1ADA100EF1FE0 /* WebNotificationProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebNotificationProvider.cpp; sourceTree = "<group>"; };
@@ -274,7 +272,7 @@
 		5670B8271386FCA5002EB355 /* EventSenderProxy.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = EventSenderProxy.mm; sourceTree = "<group>"; };
 		583913D014335E95008307E5 /* JSAccessibilityController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAccessibilityController.cpp; sourceTree = "<group>"; };
 		583913D114335E95008307E5 /* JSAccessibilityController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAccessibilityController.h; sourceTree = "<group>"; };
-		5C45C30E17398E290079714E /* WebArchiveDumpSupportMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebArchiveDumpSupportMac.mm; path = mac/WebArchiveDumpSupportMac.mm; sourceTree = SOURCE_ROOT; };
+		5C45C30E17398E290079714E /* WebArchiveDumpSupportCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebArchiveDumpSupportCocoa.mm; sourceTree = "<group>"; };
 		5C45C31117398E480079714E /* WebArchiveDumpSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebArchiveDumpSupport.cpp; path = cf/WebArchiveDumpSupport.cpp; sourceTree = SOURCE_ROOT; };
 		5C45C31217398E480079714E /* WebArchiveDumpSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebArchiveDumpSupport.h; path = cf/WebArchiveDumpSupport.h; sourceTree = SOURCE_ROOT; };
 		6510A77711EC643800410867 /* AHEM____.TTF */ = {isa = PBXFileReference; lastKnownFileType = file; name = "AHEM____.TTF"; path = "fonts/AHEM____.TTF"; sourceTree = "<group>"; };
@@ -508,6 +506,7 @@
 			children = (
 				65EB859F11EC67CC0034D300 /* ActivateFontsCocoa.mm */,
 				0FEB909E1905A776000FDBF3 /* InjectedBundlePageCocoa.mm */,
+				5C45C30E17398E290079714E /* WebArchiveDumpSupportCocoa.mm */,
 			);
 			path = cocoa;
 			sourceTree = "<group>";
@@ -595,7 +594,6 @@
 				2EE52D141890A9FB0010ED21 /* TestControllerIOS.mm */,
 				0FEBF85C1BB62D460028722D /* UIKitSPI.h */,
 				0F73B55B1BA89042004B3EF4 /* UIScriptControllerIOS.mm */,
-				2EE52D151890A9FB0010ED21 /* WebArchiveDumpSupportIOS.mm */,
 			);
 			path = ios;
 			sourceTree = "<group>";
@@ -617,7 +615,6 @@
 				29A8FCE4145F0464009045A6 /* AccessibilityTextMarkerRangeMac.mm */,
 				29210EAB144CACB200835BB5 /* AccessibilityUIElementMac.mm */,
 				BC8DAD771316D7B900EC96FC /* InjectedBundleMac.mm */,
-				5C45C30E17398E290079714E /* WebArchiveDumpSupportMac.mm */,
 			);
 			path = mac;
 			sourceTree = "<group>";
@@ -1040,8 +1037,7 @@
 				C0CE720B1247C93300BC0EC4 /* TestRunnerMac.mm in Sources */,
 				5664A49A14326384008881BE /* TextInputController.cpp in Sources */,
 				5C45C31317398E480079714E /* WebArchiveDumpSupport.cpp in Sources */,
-				2E63ED9E1891AEC1002A7AFC /* WebArchiveDumpSupportIOS.mm in Sources */,
-				5C45C30F17398E290079714E /* WebArchiveDumpSupportMac.mm in Sources */,
+				5C45C30F17398E290079714E /* WebArchiveDumpSupportCocoa.mm in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};

Deleted: trunk/Tools/WebKitTestRunner/ios/WebArchiveDumpSupportIOS.mm (210142 => 210143)


--- trunk/Tools/WebKitTestRunner/ios/WebArchiveDumpSupportIOS.mm	2016-12-24 00:23:37 UTC (rev 210142)
+++ trunk/Tools/WebKitTestRunner/ios/WebArchiveDumpSupportIOS.mm	2016-12-24 01:14:59 UTC (rev 210143)
@@ -1,41 +0,0 @@
-/*
-f* Copyright (C) 2014 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.
- */
-
-#import "config.h"
-#import "WebArchiveDumpSupport.h"
-
-#if PLATFORM(IOS)
-
-CFURLResponseRef createCFURLResponseFromResponseData(CFDataRef /*responseData*/)
-{
-    return 0;
-}
-
-CFArrayRef supportedNonImageMIMETypes()
-{
-    return 0;
-}
-
-#endif // PLATFORM(IOS)

Deleted: trunk/Tools/WebKitTestRunner/mac/WebArchiveDumpSupportMac.mm (210142 => 210143)


--- trunk/Tools/WebKitTestRunner/mac/WebArchiveDumpSupportMac.mm	2016-12-24 00:23:37 UTC (rev 210142)
+++ trunk/Tools/WebKitTestRunner/mac/WebArchiveDumpSupportMac.mm	2016-12-24 01:14:59 UTC (rev 210143)
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2010 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 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 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.
- */
-
-#import "config.h"
-#import "WebArchiveDumpSupport.h"
-
-#import <CFNetwork/CFHTTPMessage.h>
-#import <Foundation/Foundation.h>
-#import <WebKit/WebHTMLRepresentation.h>
-#import <wtf/RetainPtr.h>
-
-extern "C" {
-
-enum CFURLCacheStoragePolicy {
-  kCFURLCacheStorageAllowed = 0,
-  kCFURLCacheStorageAllowedInMemoryOnly = 1,
-  kCFURLCacheStorageNotAllowed = 2
-};
-typedef enum CFURLCacheStoragePolicy CFURLCacheStoragePolicy;
-
-extern const CFStringRef kCFHTTPVersion1_1;
-
-CFURLResponseRef CFURLResponseCreate(CFAllocatorRef alloc, CFURLRef URL, CFStringRef mimeType, SInt64 expectedContentLength, CFStringRef textEncodingName, CFURLCacheStoragePolicy recommendedPolicy);
-CFURLResponseRef CFURLResponseCreateWithHTTPResponse(CFAllocatorRef alloc, CFURLRef URL, CFHTTPMessageRef httpResponse, CFURLCacheStoragePolicy recommendedPolicy);
-void CFURLResponseSetExpectedContentLength(CFURLResponseRef response, SInt64 length);
-void CFURLResponseSetMIMEType(CFURLResponseRef response, CFStringRef mimeType);
-
-}
-
-CFURLResponseRef createCFURLResponseFromResponseData(CFDataRef responseData)
-{
-    // Decode NSURLResponse
-    RetainPtr<NSKeyedUnarchiver> unarchiver = adoptNS([[NSKeyedUnarchiver alloc] initForReadingWithData:(NSData *)responseData]);
-    NSURLResponse *response = [unarchiver.get() decodeObjectForKey:@"WebResourceResponse"]; // WebResourceResponseKey in WebResource.m
-    [unarchiver.get() finishDecoding];
-
-    if (![response isKindOfClass:[NSHTTPURLResponse class]])
-        return CFURLResponseCreate(kCFAllocatorDefault, (CFURLRef)[response URL], (CFStringRef)[response MIMEType], [response expectedContentLength], (CFStringRef)[response textEncodingName], kCFURLCacheStorageAllowed);
-
-    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response;
-
-    // NSURLResponse is not toll-free bridged to CFURLResponse.
-    RetainPtr<CFHTTPMessageRef> httpMessage = adoptCF(CFHTTPMessageCreateResponse(kCFAllocatorDefault, [httpResponse statusCode], 0, kCFHTTPVersion1_1));
-
-    NSDictionary *headerFields = [httpResponse allHeaderFields];
-    for (NSString *headerField in [headerFields keyEnumerator])
-        CFHTTPMessageSetHeaderFieldValue(httpMessage.get(), (CFStringRef)headerField, (CFStringRef)[headerFields objectForKey:headerField]);
-
-    return CFURLResponseCreateWithHTTPResponse(kCFAllocatorDefault, (CFURLRef)[response URL], httpMessage.get(), kCFURLCacheStorageAllowed);
-}
-
-CFArrayRef supportedNonImageMIMETypes()
-{
-    return (CFArrayRef)[WebHTMLRepresentation supportedNonImageMIMETypes];
-}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to