-[WKWebViewConfiguration copyWithZone] doesn't copy _groupIdentifier
authorjeffm@apple.com <jeffm@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Dec 2017 00:18:47 +0000 (00:18 +0000)
committerjeffm@apple.com <jeffm@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Dec 2017 00:18:47 +0000 (00:18 +0000)
https://bugs.webkit.org/show_bug.cgi?id=180504

Reviewed by Geoffrey Garen.

Source/WebKit:

* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration copyWithZone:]):
Copy _groupIdentifier.

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/WKWebViewConfiguration.mm:
Add a test to verify that the _groupIdentifier is copied.

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

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewConfiguration.mm

index 0455d57..48df393 100644 (file)
@@ -1,3 +1,14 @@
+2017-12-06  Jeff Miller  <jeffm@apple.com>
+
+        -[WKWebViewConfiguration copyWithZone] doesn't copy _groupIdentifier
+        https://bugs.webkit.org/show_bug.cgi?id=180504
+
+        Reviewed by Geoffrey Garen.
+
+        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
+        (-[WKWebViewConfiguration copyWithZone:]):
+        Copy _groupIdentifier.
+
 2017-12-06  David Quesada  <david_quesada@apple.com>
 
         [Web App Manifest] Add SPI for fetching the manifest
index 44bab68..cdce4e6 100644 (file)
@@ -361,6 +361,8 @@ static _WKDragLiftDelay toDragLiftDelay(NSUInteger value)
     configuration->_legacyEncryptedMediaAPIEnabled = self->_legacyEncryptedMediaAPIEnabled;
     configuration->_allowMediaContentTypesRequiringHardwareSupportAsFallback = self->_allowMediaContentTypesRequiringHardwareSupportAsFallback;
 
+    configuration->_groupIdentifier = adoptNS([self->_groupIdentifier copyWithZone:zone]);
+
     return configuration;
 }
 
index 3589bdf..9423eed 100644 (file)
@@ -1,3 +1,13 @@
+2017-12-06  Jeff Miller  <jeffm@apple.com>
+
+        -[WKWebViewConfiguration copyWithZone] doesn't copy _groupIdentifier
+        https://bugs.webkit.org/show_bug.cgi?id=180504
+
+        Reviewed by Geoffrey Garen.
+
+        * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewConfiguration.mm:
+        Add a test to verify that the _groupIdentifier is copied.
+
 2017-12-06  David Quesada  <david_quesada@apple.com>
 
         [Web App Manifest] Add SPI for fetching the manifest
index 851e14b..af66674 100644 (file)
@@ -66,4 +66,13 @@ TEST(WebKit, InvalidConfiguration)
 #pragma clang diagnostic pop
 }
 
+TEST(WebKit, ConfigurationGroupIdentifierIsCopied)
+{
+    auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
+    [configuration _setGroupIdentifier:@"TestGroupIdentifier"];
+
+    auto configuationCopy = adoptNS([configuration copy]);
+    EXPECT_STREQ([configuration _groupIdentifier].UTF8String, [configuationCopy _groupIdentifier].UTF8String);
+}
+
 #endif // WK_API_ENABLED