Unreviewed test fix after r222779.
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Oct 2017 17:29:12 +0000 (17:29 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Oct 2017 17:29:12 +0000 (17:29 +0000)
* testing/cocoa/WebArchiveDumpSupport.mm:
(WebCoreTestSupport::createCFURLResponseFromResponseData): Setting NSSecureCoding in this test code should be
done based on build system, just like it is in the actual WebArchive handling code.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@222786 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/testing/cocoa/WebArchiveDumpSupport.mm

index 4c6315a..8ff2471 100644 (file)
@@ -1,3 +1,11 @@
+2017-10-03  Brent Fulgham  <bfulgham@apple.com>
+
+        Unreviewed test fix after r222779.
+
+        * testing/cocoa/WebArchiveDumpSupport.mm:
+        (WebCoreTestSupport::createCFURLResponseFromResponseData): Setting NSSecureCoding in this test code should be
+        done based on build system, just like it is in the actual WebArchive handling code.
+
 2017-10-03  Youenn Fablet  <youenn@apple.com>
 
         Clean-up RealtimeIncomingVideoSource
index b33bc50..2086408 100644 (file)
@@ -41,13 +41,14 @@ namespace WebCoreTestSupport {
 static CFURLResponseRef createCFURLResponseFromResponseData(CFDataRef responseData)
 {
     RetainPtr<NSKeyedUnarchiver> unarchiver = adoptNS([[NSKeyedUnarchiver alloc] initForReadingWithData:(NSData *)responseData]);
-    [unarchiver setRequiresSecureCoding:YES];
     NSURLResponse *response;
-    @try {
 #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || PLATFORM(IOS)
-        // Because of <rdar://problem/34063313> we can't use this for decoding in older OS's.
+    // Because of <rdar://problem/34063313> we can't use this for decoding in older OS's.
+    [unarchiver setRequiresSecureCoding:YES];
+    @try {
         response = [unarchiver decodeObjectOfClass:[NSURLResponse class] forKey:@"WebResourceResponse"]; // WebResourceResponseKey in WebResource.m
 #else
+    @try {
         response = [unarchiver decodeObjectForKey:@"WebResourceResponse"]; // WebResourceResponseKey in WebResource.m
 #endif
         [unarchiver finishDecoding];