Title: [271858] branches/safari-611-branch
Revision
271858
Author
alanc...@apple.com
Date
2021-01-25 14:13:50 -0800 (Mon, 25 Jan 2021)

Log Message

Cherry-pick r271799. rdar://problem/73581832

    PCM: Use different well-known locations for triggering and reporting attribution
    https://bugs.webkit.org/show_bug.cgi?id=220902
    <rdar://problem/73550632>

    Reviewed by Brent Fulgham.

    The discussion in W3C Privacy CG concluded that we should use distinct
    well-known URL paths for websites triggering attribution and for the
    browser reporting attribution
    (https://github.com/privacycg/private-click-measurement/issues/59).

    This patch changes the one location to these two:
    /.well-known/private-click-measurement/trigger-attribution
    /.well-known/private-click-measurement/report-attribution

    Source/WebCore:

    Existing tests updated.

    * loader/PrivateClickMeasurement.cpp:
    (WebCore::PrivateClickMeasurement::parseAttributionRequest):
    (WebCore::PrivateClickMeasurement::reportURL const):

    Tools:

    * TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp:
    (TestWebKitAPI::TEST):
    * TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
    (TestWebKitAPI::TEST):

    LayoutTests:

    * http/tests/privateClickMeasurement/resources/redirectToConversion.php:
    * http/tests/privateClickMeasurement/resources/redirectToConversionOnIPAddress.php:

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

Modified Paths

Diff

Modified: branches/safari-611-branch/LayoutTests/ChangeLog (271857 => 271858)


--- branches/safari-611-branch/LayoutTests/ChangeLog	2021-01-25 22:13:44 UTC (rev 271857)
+++ branches/safari-611-branch/LayoutTests/ChangeLog	2021-01-25 22:13:50 UTC (rev 271858)
@@ -1,5 +1,67 @@
 2021-01-25  Alan Coon  <alanc...@apple.com>
 
+        Cherry-pick r271799. rdar://problem/73581832
+
+    PCM: Use different well-known locations for triggering and reporting attribution
+    https://bugs.webkit.org/show_bug.cgi?id=220902
+    <rdar://problem/73550632>
+    
+    Reviewed by Brent Fulgham.
+    
+    The discussion in W3C Privacy CG concluded that we should use distinct
+    well-known URL paths for websites triggering attribution and for the
+    browser reporting attribution
+    (https://github.com/privacycg/private-click-measurement/issues/59).
+    
+    This patch changes the one location to these two:
+    /.well-known/private-click-measurement/trigger-attribution
+    /.well-known/private-click-measurement/report-attribution
+    
+    Source/WebCore:
+    
+    Existing tests updated.
+    
+    * loader/PrivateClickMeasurement.cpp:
+    (WebCore::PrivateClickMeasurement::parseAttributionRequest):
+    (WebCore::PrivateClickMeasurement::reportURL const):
+    
+    Tools:
+    
+    * TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp:
+    (TestWebKitAPI::TEST):
+    * TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
+    (TestWebKitAPI::TEST):
+    
+    LayoutTests:
+    
+    * http/tests/privateClickMeasurement/resources/redirectToConversion.php:
+    * http/tests/privateClickMeasurement/resources/redirectToConversionOnIPAddress.php:
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271799 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-01-25  John Wilander  <wilan...@apple.com>
+
+            PCM: Use different well-known locations for triggering and reporting attribution
+            https://bugs.webkit.org/show_bug.cgi?id=220902
+            <rdar://problem/73550632>
+
+            Reviewed by Brent Fulgham.
+
+            The discussion in W3C Privacy CG concluded that we should use distinct
+            well-known URL paths for websites triggering attribution and for the
+            browser reporting attribution
+            (https://github.com/privacycg/private-click-measurement/issues/59).
+
+            This patch changes the one location to these two:
+            /.well-known/private-click-measurement/trigger-attribution
+            /.well-known/private-click-measurement/report-attribution
+
+            * http/tests/privateClickMeasurement/resources/redirectToConversion.php:
+            * http/tests/privateClickMeasurement/resources/redirectToConversionOnIPAddress.php:
+
+2021-01-25  Alan Coon  <alanc...@apple.com>
+
         Cherry-pick r271618. rdar://problem/73477509
 
     REGRESSION(r266695) Range control with custom track width sized incorrectly

Modified: branches/safari-611-branch/LayoutTests/http/tests/privateClickMeasurement/resources/redirectToConversion.php (271857 => 271858)


--- branches/safari-611-branch/LayoutTests/http/tests/privateClickMeasurement/resources/redirectToConversion.php	2021-01-25 22:13:44 UTC (rev 271857)
+++ branches/safari-611-branch/LayoutTests/http/tests/privateClickMeasurement/resources/redirectToConversion.php	2021-01-25 22:13:50 UTC (rev 271858)
@@ -2,8 +2,8 @@
 header("HTTP/1.1 302 Found");
 header("Cache-Control: no-cache, no-store, must-revalidate");
 if (isset($_GET["conversionData"]) && isset($_GET["priority"])) {
-  header("Location: /.well-known/private-click-measurement/" . $_GET["conversionData"] . "/" . $_GET["priority"]);
+  header("Location: /.well-known/private-click-measurement/trigger-attribution/" . $_GET["conversionData"] . "/" . $_GET["priority"]);
 } else if (isset($_GET["conversionData"])) {
-  header("Location: /.well-known/private-click-measurement/" . $_GET["conversionData"]);
+  header("Location: /.well-known/private-click-measurement/trigger-attribution/" . $_GET["conversionData"]);
 }
 ?>

Modified: branches/safari-611-branch/LayoutTests/http/tests/privateClickMeasurement/resources/redirectToConversionOnIPAddress.php (271857 => 271858)


--- branches/safari-611-branch/LayoutTests/http/tests/privateClickMeasurement/resources/redirectToConversionOnIPAddress.php	2021-01-25 22:13:44 UTC (rev 271857)
+++ branches/safari-611-branch/LayoutTests/http/tests/privateClickMeasurement/resources/redirectToConversionOnIPAddress.php	2021-01-25 22:13:50 UTC (rev 271858)
@@ -1,8 +1,8 @@
 <?php
 header("HTTP/1.0 302 Found");
 if (isset($_GET["conversionData"]) && isset($_GET["priority"])) {
-  header("Location: https://127.0.0.1:8000/.well-known/private-click-measurement/" . $_GET["conversionData"] . "/" . $_GET["priority"]);
+  header("Location: https://127.0.0.1:8000/.well-known/private-click-measurement/trigger-attribution/" . $_GET["conversionData"] . "/" . $_GET["priority"]);
 } else if (isset($_GET["conversionData"])) {
-  header("Location: https://127.0.0.1:8000/.well-known/private-click-measurement/" . $_GET["conversionData"]);
+  header("Location: https://127.0.0.1:8000/.well-known/private-click-measurement/trigger-attribution/" . $_GET["conversionData"]);
 }
 ?>

Modified: branches/safari-611-branch/Source/WebCore/ChangeLog (271857 => 271858)


--- branches/safari-611-branch/Source/WebCore/ChangeLog	2021-01-25 22:13:44 UTC (rev 271857)
+++ branches/safari-611-branch/Source/WebCore/ChangeLog	2021-01-25 22:13:50 UTC (rev 271858)
@@ -1,5 +1,70 @@
 2021-01-25  Alan Coon  <alanc...@apple.com>
 
+        Cherry-pick r271799. rdar://problem/73581832
+
+    PCM: Use different well-known locations for triggering and reporting attribution
+    https://bugs.webkit.org/show_bug.cgi?id=220902
+    <rdar://problem/73550632>
+    
+    Reviewed by Brent Fulgham.
+    
+    The discussion in W3C Privacy CG concluded that we should use distinct
+    well-known URL paths for websites triggering attribution and for the
+    browser reporting attribution
+    (https://github.com/privacycg/private-click-measurement/issues/59).
+    
+    This patch changes the one location to these two:
+    /.well-known/private-click-measurement/trigger-attribution
+    /.well-known/private-click-measurement/report-attribution
+    
+    Source/WebCore:
+    
+    Existing tests updated.
+    
+    * loader/PrivateClickMeasurement.cpp:
+    (WebCore::PrivateClickMeasurement::parseAttributionRequest):
+    (WebCore::PrivateClickMeasurement::reportURL const):
+    
+    Tools:
+    
+    * TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp:
+    (TestWebKitAPI::TEST):
+    * TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
+    (TestWebKitAPI::TEST):
+    
+    LayoutTests:
+    
+    * http/tests/privateClickMeasurement/resources/redirectToConversion.php:
+    * http/tests/privateClickMeasurement/resources/redirectToConversionOnIPAddress.php:
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271799 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-01-25  John Wilander  <wilan...@apple.com>
+
+            PCM: Use different well-known locations for triggering and reporting attribution
+            https://bugs.webkit.org/show_bug.cgi?id=220902
+            <rdar://problem/73550632>
+
+            Reviewed by Brent Fulgham.
+
+            The discussion in W3C Privacy CG concluded that we should use distinct
+            well-known URL paths for websites triggering attribution and for the
+            browser reporting attribution
+            (https://github.com/privacycg/private-click-measurement/issues/59).
+
+            This patch changes the one location to these two:
+            /.well-known/private-click-measurement/trigger-attribution
+            /.well-known/private-click-measurement/report-attribution
+
+            Existing tests updated.
+
+            * loader/PrivateClickMeasurement.cpp:
+            (WebCore::PrivateClickMeasurement::parseAttributionRequest):
+            (WebCore::PrivateClickMeasurement::reportURL const):
+
+2021-01-25  Alan Coon  <alanc...@apple.com>
+
         Cherry-pick r271618. rdar://problem/73477509
 
     REGRESSION(r266695) Range control with custom track width sized incorrectly

Modified: branches/safari-611-branch/Source/WebCore/loader/PrivateClickMeasurement.cpp (271857 => 271858)


--- branches/safari-611-branch/Source/WebCore/loader/PrivateClickMeasurement.cpp	2021-01-25 22:13:44 UTC (rev 271857)
+++ branches/safari-611-branch/Source/WebCore/loader/PrivateClickMeasurement.cpp	2021-01-25 22:13:50 UTC (rev 271858)
@@ -36,7 +36,8 @@
 
 namespace WebCore {
 
-static const char privateClickMeasurementPathPrefix[] = "/.well-known/private-click-measurement/";
+static const char privateClickMeasurementTriggerAttributionPath[] = "/.well-known/private-click-measurement/trigger-attribution/";
+static const char privateClickMeasurementReportAttributionPath[] = "/.well-known/private-click-measurement/report-attribution/";
 const size_t privateClickMeasurementAttributionTriggerDataPathSegmentSize = 2;
 const size_t privateClickMeasurementPriorityPathSegmentSize = 2;
 
@@ -58,7 +59,7 @@
 Expected<PrivateClickMeasurement::AttributionTriggerData, String> PrivateClickMeasurement::parseAttributionRequest(const URL& redirectURL)
 {
     auto path = StringView(redirectURL.string()).substring(redirectURL.pathStart(), redirectURL.pathEnd() - redirectURL.pathStart());
-    if (path.isEmpty() || !path.startsWith(privateClickMeasurementPathPrefix))
+    if (path.isEmpty() || !path.startsWith(privateClickMeasurementTriggerAttributionPath))
         return makeUnexpected(nullString());
 
     if (!redirectURL.protocolIs("https") || redirectURL.hasCredentials() || redirectURL.hasQuery() || redirectURL.hasFragmentIdentifier())
@@ -65,7 +66,7 @@
         return makeUnexpected("[Private Click Measurement] Conversion was not accepted because the URL's protocol is not HTTPS or the URL contains one or more of username, password, query string, and fragment."_s);
 
 
-    auto prefixLength = sizeof(privateClickMeasurementPathPrefix) - 1;
+    auto prefixLength = sizeof(privateClickMeasurementTriggerAttributionPath) - 1;
     if (path.length() == prefixLength + privateClickMeasurementAttributionTriggerDataPathSegmentSize) {
         auto attributionTriggerDataUInt64 = path.substring(prefixLength, privateClickMeasurementAttributionTriggerDataPathSegmentSize).toUInt64Strict();
         if (!attributionTriggerDataUInt64 || *attributionTriggerDataUInt64 > AttributionTriggerData::MaxEntropy)
@@ -121,7 +122,7 @@
     StringBuilder builder;
     builder.appendLiteral("https://");
     builder.append(m_sourceSite.registrableDomain.string());
-    builder.appendLiteral(privateClickMeasurementPathPrefix);
+    builder.appendLiteral(privateClickMeasurementReportAttributionPath);
 
     URL url { URL(), builder.toString() };
     if (url.isValid())

Modified: branches/safari-611-branch/Tools/ChangeLog (271857 => 271858)


--- branches/safari-611-branch/Tools/ChangeLog	2021-01-25 22:13:44 UTC (rev 271857)
+++ branches/safari-611-branch/Tools/ChangeLog	2021-01-25 22:13:50 UTC (rev 271858)
@@ -1,5 +1,69 @@
 2021-01-25  Alan Coon  <alanc...@apple.com>
 
+        Cherry-pick r271799. rdar://problem/73581832
+
+    PCM: Use different well-known locations for triggering and reporting attribution
+    https://bugs.webkit.org/show_bug.cgi?id=220902
+    <rdar://problem/73550632>
+    
+    Reviewed by Brent Fulgham.
+    
+    The discussion in W3C Privacy CG concluded that we should use distinct
+    well-known URL paths for websites triggering attribution and for the
+    browser reporting attribution
+    (https://github.com/privacycg/private-click-measurement/issues/59).
+    
+    This patch changes the one location to these two:
+    /.well-known/private-click-measurement/trigger-attribution
+    /.well-known/private-click-measurement/report-attribution
+    
+    Source/WebCore:
+    
+    Existing tests updated.
+    
+    * loader/PrivateClickMeasurement.cpp:
+    (WebCore::PrivateClickMeasurement::parseAttributionRequest):
+    (WebCore::PrivateClickMeasurement::reportURL const):
+    
+    Tools:
+    
+    * TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp:
+    (TestWebKitAPI::TEST):
+    * TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
+    (TestWebKitAPI::TEST):
+    
+    LayoutTests:
+    
+    * http/tests/privateClickMeasurement/resources/redirectToConversion.php:
+    * http/tests/privateClickMeasurement/resources/redirectToConversionOnIPAddress.php:
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271799 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-01-25  John Wilander  <wilan...@apple.com>
+
+            PCM: Use different well-known locations for triggering and reporting attribution
+            https://bugs.webkit.org/show_bug.cgi?id=220902
+            <rdar://problem/73550632>
+
+            Reviewed by Brent Fulgham.
+
+            The discussion in W3C Privacy CG concluded that we should use distinct
+            well-known URL paths for websites triggering attribution and for the
+            browser reporting attribution
+            (https://github.com/privacycg/private-click-measurement/issues/59).
+
+            This patch changes the one location to these two:
+            /.well-known/private-click-measurement/trigger-attribution
+            /.well-known/private-click-measurement/report-attribution
+
+            * TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp:
+            (TestWebKitAPI::TEST):
+            * TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
+            (TestWebKitAPI::TEST):
+
+2021-01-25  Alan Coon  <alanc...@apple.com>
+
         Cherry-pick r271380. rdar://problem/73477386
 
     ASSERTION FAILED: !event || event.type == NSEventTypeLeftMouseDown || event.type == NSEventTypeRightMouseDown || event.type == NSEventTypeOtherMouseDown

Modified: branches/safari-611-branch/Tools/TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp (271857 => 271858)


--- branches/safari-611-branch/Tools/TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp	2021-01-25 22:13:44 UTC (rev 271857)
+++ branches/safari-611-branch/Tools/TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp	2021-01-25 22:13:50 UTC (rev 271858)
@@ -48,7 +48,7 @@
 
     auto attributionURL = attribution.reportURL();
     
-    ASSERT_EQ(attributionURL.string(), "https://webkit.org/.well-known/private-click-measurement/");
+    ASSERT_EQ(attributionURL.string(), "https://webkit.org/.well-known/private-click-measurement/report-attribution/");
 
     ASSERT_EQ(attribution.json()->toJSONString(), "{\"source_engagement_type\":\"click\",\"source_site\":\"webkit.org\",\"source_id\":0,\"attributed_on_site\":\"example.com\",\"trigger_data\":0,\"version\":1}");
 }
@@ -60,7 +60,7 @@
 
     auto attributionURL = attribution.reportURL();
     
-    ASSERT_EQ(attributionURL.string(), "https://webkit.org/.well-known/private-click-measurement/");
+    ASSERT_EQ(attributionURL.string(), "https://webkit.org/.well-known/private-click-measurement/report-attribution/");
 
     ASSERT_EQ(attribution.json()->toJSONString(), "{\"source_engagement_type\":\"click\",\"source_site\":\"webkit.org\",\"source_id\":192,\"attributed_on_site\":\"example.com\",\"trigger_data\":9,\"version\":1}");
 }
@@ -72,7 +72,7 @@
 
     auto attributionURL = attribution.reportURL();
     
-    ASSERT_EQ(attributionURL.string(), "https://webkit.org/.well-known/private-click-measurement/");
+    ASSERT_EQ(attributionURL.string(), "https://webkit.org/.well-known/private-click-measurement/report-attribution/");
 
     ASSERT_EQ(attribution.json()->toJSONString(), "{\"source_engagement_type\":\"click\",\"source_site\":\"webkit.org\",\"source_id\":255,\"attributed_on_site\":\"example.com\",\"trigger_data\":15,\"version\":1}");
 }
@@ -89,34 +89,34 @@
 
 TEST(PrivateClickMeasurement, ValidConversionURLs)
 {
-    const URL conversionURLWithoutPriority { { }, "https://webkit.org/.well-known/private-click-measurement/10"_s };
+    const URL conversionURLWithoutPriority { { }, "https://webkit.org/.well-known/private-click-measurement/trigger-attribution/10"_s };
     auto optionalConversion = PrivateClickMeasurement::parseAttributionRequest(conversionURLWithoutPriority);
     ASSERT_TRUE(optionalConversion);
     ASSERT_EQ(optionalConversion->data, (uint32_t)10);
 
-    const URL conversionURLWithoutPriorityMaxEntropy { { }, "https://webkit.org/.well-known/private-click-measurement/15"_s };
+    const URL conversionURLWithoutPriorityMaxEntropy { { }, "https://webkit.org/.well-known/private-click-measurement/trigger-attribution/15"_s };
     optionalConversion = PrivateClickMeasurement::parseAttributionRequest(conversionURLWithoutPriorityMaxEntropy);
     ASSERT_TRUE(optionalConversion);
     ASSERT_EQ(optionalConversion->data, (uint32_t)15);
     
-    const URL conversionURLWithoutPriorityAndLeadingZero { { }, "https://webkit.org/.well-known/private-click-measurement/02"_s };
+    const URL conversionURLWithoutPriorityAndLeadingZero { { }, "https://webkit.org/.well-known/private-click-measurement/trigger-attribution/02"_s };
     optionalConversion = PrivateClickMeasurement::parseAttributionRequest(conversionURLWithoutPriorityAndLeadingZero);
     ASSERT_TRUE(optionalConversion);
     ASSERT_EQ(optionalConversion->data, (uint32_t)2);
 
-    const URL conversionURLWithPriority { { }, "https://webkit.org/.well-known/private-click-measurement/10/12"_s };
+    const URL conversionURLWithPriority { { }, "https://webkit.org/.well-known/private-click-measurement/trigger-attribution/10/12"_s };
     optionalConversion = PrivateClickMeasurement::parseAttributionRequest(conversionURLWithPriority);
     ASSERT_TRUE(optionalConversion);
     ASSERT_EQ(optionalConversion->data, (uint32_t)10);
     ASSERT_EQ(optionalConversion->priority, (uint32_t)12);
 
-    const URL conversionURLWithPriorityMaxEntropy { { }, "https://webkit.org/.well-known/private-click-measurement/15/63"_s };
+    const URL conversionURLWithPriorityMaxEntropy { { }, "https://webkit.org/.well-known/private-click-measurement/trigger-attribution/15/63"_s };
     optionalConversion = PrivateClickMeasurement::parseAttributionRequest(conversionURLWithPriorityMaxEntropy);
     ASSERT_TRUE(optionalConversion);
     ASSERT_EQ(optionalConversion->data, (uint32_t)15);
     ASSERT_EQ(optionalConversion->priority, (uint32_t)63);
     
-    const URL conversionURLWithPriorityAndLeadingZero { { }, "https://webkit.org/.well-known/private-click-measurement/10/02"_s };
+    const URL conversionURLWithPriorityAndLeadingZero { { }, "https://webkit.org/.well-known/private-click-measurement/trigger-attribution/10/02"_s };
     optionalConversion = PrivateClickMeasurement::parseAttributionRequest(conversionURLWithPriorityAndLeadingZero);
     ASSERT_TRUE(optionalConversion);
     ASSERT_EQ(optionalConversion->data, (uint32_t)10);
@@ -175,55 +175,55 @@
 
 TEST(PrivateClickMeasurement, InvalidConversionURLs)
 {
-    const URL conversionURLWithSingleDigitConversionData { { }, "https://webkit.org/.well-known/private-click-measurement/2"_s };
+    const URL conversionURLWithSingleDigitConversionData { { }, "https://webkit.org/.well-known/private-click-measurement/trigger-attribution/2"_s };
     auto optionalConversion = PrivateClickMeasurement::parseAttributionRequest(conversionURLWithSingleDigitConversionData);
     ASSERT_FALSE(optionalConversion);
     
-    const URL conversionURLWithNonNumeralConversionData { { }, "https://webkit.org/.well-known/private-click-measurement/2s"_s };
+    const URL conversionURLWithNonNumeralConversionData { { }, "https://webkit.org/.well-known/private-click-measurement/trigger-attribution/2s"_s };
     optionalConversion = PrivateClickMeasurement::parseAttributionRequest(conversionURLWithNonNumeralConversionData);
     ASSERT_FALSE(optionalConversion);
 
-    const URL conversionURLWithNegativeConversionData { { }, "https://webkit.org/.well-known/private-click-measurement/-2"_s };
+    const URL conversionURLWithNegativeConversionData { { }, "https://webkit.org/.well-known/private-click-measurement/trigger-attribution/-2"_s };
     optionalConversion = PrivateClickMeasurement::parseAttributionRequest(conversionURLWithNegativeConversionData);
     ASSERT_FALSE(optionalConversion);
 
-    const URL conversionURLWithTooLargeConversionData { { }, "https://webkit.org/.well-known/private-click-measurement/16"_s };
+    const URL conversionURLWithTooLargeConversionData { { }, "https://webkit.org/.well-known/private-click-measurement/trigger-attribution/16"_s };
     optionalConversion = PrivateClickMeasurement::parseAttributionRequest(conversionURLWithTooLargeConversionData);
     ASSERT_FALSE(optionalConversion);
 
-    const URL conversionURLWithSingleDigitPriority { { }, "https://webkit.org/.well-known/private-click-measurement/10/2"_s };
+    const URL conversionURLWithSingleDigitPriority { { }, "https://webkit.org/.well-known/private-click-measurement/trigger-attribution/10/2"_s };
     optionalConversion = PrivateClickMeasurement::parseAttributionRequest(conversionURLWithSingleDigitPriority);
     ASSERT_FALSE(optionalConversion);
     
-    const URL conversionURLWithNonNumeralPriority { { }, "https://webkit.org/.well-known/private-click-measurement/10/2s"_s };
+    const URL conversionURLWithNonNumeralPriority { { }, "https://webkit.org/.well-known/private-click-measurement/trigger-attribution/10/2s"_s };
     optionalConversion = PrivateClickMeasurement::parseAttributionRequest(conversionURLWithNonNumeralPriority);
     ASSERT_FALSE(optionalConversion);
     
-    const URL conversionURLWithNegativePriority { { }, "https://webkit.org/.well-known/private-click-measurement/10/-2"_s };
+    const URL conversionURLWithNegativePriority { { }, "https://webkit.org/.well-known/private-click-measurement/trigger-attribution/10/-2"_s };
     optionalConversion = PrivateClickMeasurement::parseAttributionRequest(conversionURLWithNegativePriority);
     ASSERT_FALSE(optionalConversion);
     
-    const URL conversionURLWithTooLargePriority { { }, "https://webkit.org/.well-known/private-click-measurement/10/64"_s };
+    const URL conversionURLWithTooLargePriority { { }, "https://webkit.org/.well-known/private-click-measurement/trigger-attribution/10/64"_s };
     optionalConversion = PrivateClickMeasurement::parseAttributionRequest(conversionURLWithTooLargePriority);
     ASSERT_FALSE(optionalConversion);
 
-    const URL conversionURLWithTooLargeConversionDataAndPriority { { }, "https://webkit.org/.well-known/private-click-measurement/16/22"_s };
+    const URL conversionURLWithTooLargeConversionDataAndPriority { { }, "https://webkit.org/.well-known/private-click-measurement/trigger-attribution/16/22"_s };
     optionalConversion = PrivateClickMeasurement::parseAttributionRequest(conversionURLWithTooLargeConversionDataAndPriority);
     ASSERT_FALSE(optionalConversion);
 
-    const URL conversionURLWithTooLargeConversionDataAndTooLargePriority { { }, "https://webkit.org/.well-known/private-click-measurement/16/64"_s };
+    const URL conversionURLWithTooLargeConversionDataAndTooLargePriority { { }, "https://webkit.org/.well-known/private-click-measurement/trigger-attribution/16/64"_s };
     optionalConversion = PrivateClickMeasurement::parseAttributionRequest(conversionURLWithTooLargeConversionDataAndTooLargePriority);
     ASSERT_FALSE(optionalConversion);
 
-    const URL conversionURLWithExtraLeadingSlash = { { }, "https://webkit.org/.well-known/private-click-measurement//10/12"_s };
+    const URL conversionURLWithExtraLeadingSlash = { { }, "https://webkit.org/.well-known/private-click-measurement/trigger-attribution//10/12"_s };
     optionalConversion = PrivateClickMeasurement::parseAttributionRequest(conversionURLWithExtraLeadingSlash);
     ASSERT_FALSE(optionalConversion);
 
-    const URL conversionURLWithExtraTrailingSlash = { { }, "https://webkit.org/.well-known/private-click-measurement/10/12/"_s };
+    const URL conversionURLWithExtraTrailingSlash = { { }, "https://webkit.org/.well-known/private-click-measurement/trigger-attribution/10/12/"_s };
     optionalConversion = PrivateClickMeasurement::parseAttributionRequest(conversionURLWithExtraTrailingSlash);
     ASSERT_FALSE(optionalConversion);
 
-    const URL conversionURLWithTrailingQuestionMark = { { }, "https://webkit.org/.well-known/private-click-measurement/10/12?"_s };
+    const URL conversionURLWithTrailingQuestionMark = { { }, "https://webkit.org/.well-known/private-click-measurement/trigger-attribution/10/12?"_s };
     optionalConversion = PrivateClickMeasurement::parseAttributionRequest(conversionURLWithTrailingQuestionMark);
     ASSERT_FALSE(optionalConversion);
 }
@@ -231,46 +231,46 @@
 TEST(PrivateClickMeasurement, InvalidConversionWithDisallowedURLComponents)
 {
     // Protocol.
-    const URL conversionURLWithHttpProtocol { { }, "http://webkit.org/.well-known/private-click-measurement/2"_s };
+    const URL conversionURLWithHttpProtocol { { }, "http://webkit.org/.well-known/private-click-measurement/trigger-attribution/2"_s };
     auto optionalConversion = PrivateClickMeasurement::parseAttributionRequest(conversionURLWithHttpProtocol);
     ASSERT_FALSE(optionalConversion);
 
-    const URL conversionURLWithWssProtocol { { }, "wss://webkit.org/.well-known/private-click-measurement/2"_s };
+    const URL conversionURLWithWssProtocol { { }, "wss://webkit.org/.well-known/private-click-measurement/trigger-attribution/2"_s };
     optionalConversion = PrivateClickMeasurement::parseAttributionRequest(conversionURLWithWssProtocol);
     ASSERT_FALSE(optionalConversion);
 
-    const URL conversionURLWithFileProtocol { { }, "file:///.well-known/private-click-measurement/2"_s };
+    const URL conversionURLWithFileProtocol { { }, "file:///.well-known/private-click-measurement/trigger-attribution/2"_s };
     optionalConversion = PrivateClickMeasurement::parseAttributionRequest(conversionURLWithFileProtocol);
     ASSERT_FALSE(optionalConversion);
 
     // Username and password.
-    const URL conversionURLWithUserName { { }, "https://u...@webkit.org/.well-known/private-click-measurement/2"_s };
+    const URL conversionURLWithUserName { { }, "https://u...@webkit.org/.well-known/private-click-measurement/trigger-attribution/2"_s };
     optionalConversion = PrivateClickMeasurement::parseAttributionRequest(conversionURLWithUserName);
     ASSERT_FALSE(optionalConversion);
 
-    const URL conversionURLWithPassword = { { }, "https://:p...@webkit.org/.well-known/private-click-measurement/10/12"_s };
+    const URL conversionURLWithPassword = { { }, "https://:p...@webkit.org/.well-known/private-click-measurement/trigger-attribution/10/12"_s };
     optionalConversion = PrivateClickMeasurement::parseAttributionRequest(conversionURLWithPassword);
     ASSERT_FALSE(optionalConversion);
 
-    const URL conversionURLWithUsernameAndPassword = { { }, "https://user:p...@webkit.org/.well-known/private-click-measurement/10/12"_s };
+    const URL conversionURLWithUsernameAndPassword = { { }, "https://user:p...@webkit.org/.well-known/private-click-measurement/trigger-attribution/10/12"_s };
     optionalConversion = PrivateClickMeasurement::parseAttributionRequest(conversionURLWithUsernameAndPassword);
     ASSERT_FALSE(optionalConversion);
 
     // Query string.
-    const URL conversionURLWithTrailingQuestionMark = { { }, "https://webkit.org/.well-known/private-click-measurement/10/12?"_s };
+    const URL conversionURLWithTrailingQuestionMark = { { }, "https://webkit.org/.well-known/private-click-measurement/trigger-attribution/10/12?"_s };
     optionalConversion = PrivateClickMeasurement::parseAttributionRequest(conversionURLWithTrailingQuestionMark);
     ASSERT_FALSE(optionalConversion);
 
-    const URL conversionURLWithQueryString = { { }, "https://webkit.org/.well-known/private-click-measurement/10/12?extra=data"_s };
+    const URL conversionURLWithQueryString = { { }, "https://webkit.org/.well-known/private-click-measurement/trigger-attribution/10/12?extra=data"_s };
     optionalConversion = PrivateClickMeasurement::parseAttributionRequest(conversionURLWithQueryString);
     ASSERT_FALSE(optionalConversion);
     
     // Fragment.
-    const URL conversionURLWithTrailingHash = { { }, "https://webkit.org/.well-known/private-click-measurement/10/12#"_s };
+    const URL conversionURLWithTrailingHash = { { }, "https://webkit.org/.well-known/private-click-measurement/trigger-attribution/10/12#"_s };
     optionalConversion = PrivateClickMeasurement::parseAttributionRequest(conversionURLWithTrailingHash);
     ASSERT_FALSE(optionalConversion);
 
-    const URL conversionURLWithFragment = { { }, "https://webkit.org/.well-known/private-click-measurement/10/12#fragment"_s };
+    const URL conversionURLWithFragment = { { }, "https://webkit.org/.well-known/private-click-measurement/trigger-attribution/10/12#fragment"_s };
     optionalConversion = PrivateClickMeasurement::parseAttributionRequest(conversionURLWithFragment);
     ASSERT_FALSE(optionalConversion);
 }

Modified: branches/safari-611-branch/Tools/TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm (271857 => 271858)


--- branches/safari-611-branch/Tools/TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm	2021-01-25 22:13:44 UTC (rev 271857)
+++ branches/safari-611-branch/Tools/TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm	2021-01-25 22:13:50 UTC (rev 271858)
@@ -75,11 +75,11 @@
             connection.receiveHTTPRequest([connection] (Vector<char>&& request1) {
                 EXPECT_TRUE(strnstr(request1.data(), "GET /conversionRequestBeforeRedirect HTTP/1.1\r\n", request1.size()));
                 const char* redirect = "HTTP/1.1 302 Found\r\n"
-                    "Location: /.well-known/private-click-measurement/12\r\n"
+                    "Location: /.well-known/private-click-measurement/trigger-attribution/12\r\n"
                     "Content-Length: 0\r\n\r\n";
                 connection.send(redirect, [connection] {
                     connection.receiveHTTPRequest([connection] (Vector<char>&& request2) {
-                        EXPECT_TRUE(strnstr(request2.data(), "GET /.well-known/private-click-measurement/12 HTTP/1.1\r\n", request2.size()));
+                        EXPECT_TRUE(strnstr(request2.data(), "GET /.well-known/private-click-measurement/trigger-attribution/12 HTTP/1.1\r\n", request2.size()));
                         const char* response = "HTTP/1.1 200 OK\r\n"
                             "Content-Length: 0\r\n\r\n";
                         connection.send(response);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to