WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
223238
PCM: Test infrastructure for sending attribution reports to attribution website too
https://bugs.webkit.org/show_bug.cgi?id=223238
Summary
PCM: Test infrastructure for sending attribution reports to attribution websi...
John Wilander
Reported
2021-03-15 21:25:16 PDT
We need the ability to set two different reporting endpoints in testing of PCM when it sends attribution reports to attribution website too.
Attachments
Patch
(39.84 KB, patch)
2021-03-15 21:45 PDT
,
John Wilander
no flags
Details
Formatted Diff
Diff
Patch
(40.90 KB, patch)
2021-03-16 09:27 PDT
,
John Wilander
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2021-03-15 21:25:40 PDT
<
rdar://problem/75462031
>
John Wilander
Comment 2
2021-03-15 21:45:30 PDT
Created
attachment 423296
[details]
Patch
John Wilander
Comment 3
2021-03-16 09:27:11 PDT
Created
attachment 423339
[details]
Patch
John Wilander
Comment 4
2021-03-16 10:20:13 PDT
The timed out api-mac test is unrelated.
Brent Fulgham
Comment 5
2021-03-16 11:43:23 PDT
Comment on
attachment 423339
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=423339&action=review
r=me
> LayoutTests/http/tests/contentextensions/block-private-click-measurement.html:18 > + testRunner.setPrivateClickMeasurementAttributionReportURLsForTesting("
http://127.0.0.1:8000/privateClickMeasurement/resources/conversionReport.php
", "
http://localhost:8000/privateClickMeasurement/resources/conversionReport.php
");
It's too bad we don't have two separate endpoints (conversionReportForAttribution.php or something)
John Wilander
Comment 6
2021-03-16 11:44:47 PDT
(In reply to Brent Fulgham from
comment #5
)
> Comment on
attachment 423339
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=423339&action=review
> > r=me > > > LayoutTests/http/tests/contentextensions/block-private-click-measurement.html:18 > > + testRunner.setPrivateClickMeasurementAttributionReportURLsForTesting("
http://127.0.0.1:8000/privateClickMeasurement/resources/conversionReport.php
", "
http://localhost:8000/privateClickMeasurement/resources/conversionReport.php
"); > > It's too bad we don't have two separate endpoints > (conversionReportForAttribution.php or something)
Yeah, I wanted that when Jiewen started reusing the same PHP file for multiple things. We should revisit it. Thanks, Brent!
John Wilander
Comment 7
2021-03-16 13:21:57 PDT
Comment on
attachment 423339
[details]
Patch Trying the cq again.
EWS
Comment 8
2021-03-16 13:57:09 PDT
Committed
r274513
: <
https://commits.webkit.org/r274513
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 423339
[details]
.
Darin Adler
Comment 9
2021-03-16 15:06:46 PDT
Comment on
attachment 423339
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=423339&action=review
> Tools/WebKitTestRunner/TestInvocation.cpp:1358 > + auto sourceURL = WKURLCreateWithUTF8CString(toWTFString(stringValue(testDictionary, "SourceURLString")).utf8().data()); > + auto attributeOnURL = WKURLCreateWithUTF8CString(toWTFString(stringValue(testDictionary, "AttributeOnURLString")).utf8().data());
Need adoptWK here so these don’t leak.
John Wilander
Comment 10
2021-03-16 15:13:51 PDT
(In reply to Darin Adler from
comment #9
)
> Comment on
attachment 423339
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=423339&action=review
> > > Tools/WebKitTestRunner/TestInvocation.cpp:1358 > > + auto sourceURL = WKURLCreateWithUTF8CString(toWTFString(stringValue(testDictionary, "SourceURLString")).utf8().data()); > > + auto attributeOnURL = WKURLCreateWithUTF8CString(toWTFString(stringValue(testDictionary, "AttributeOnURLString")).utf8().data()); > > Need adoptWK here so these don’t leak.
I willfully admit that I'm not great with these conversions and API types. When I use adoptWK here I get: error: no viable conversion from 'WebKit::WKRetainPtr<const OpaqueWKURL *>' to 'WKURLRef' (aka 'const OpaqueWKURL *') What is the right course of action? Thanks!
Darin Adler
Comment 11
2021-03-16 15:15:58 PDT
Comment on
attachment 423339
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=423339&action=review
>>> Tools/WebKitTestRunner/TestInvocation.cpp:1358 >>> + auto attributeOnURL = WKURLCreateWithUTF8CString(toWTFString(stringValue(testDictionary, "AttributeOnURLString")).utf8().data()); >> >> Need adoptWK here so these don’t leak. > > I willfully admit that I'm not great with these conversions and API types. When I use adoptWK here I get: > error: no viable conversion from 'WebKit::WKRetainPtr<const OpaqueWKURL *>' to 'WKURLRef' (aka 'const OpaqueWKURL *') > > What is the right course of action? Thanks!
You also have to add .get() where they are used: TestController::singleton().setPrivateClickMeasurementAttributionReportURLsForTesting(sourceURL.get(), attributeOnURL.get()); Doing that should get rid of those errors.
John Wilander
Comment 12
2021-03-16 15:19:48 PDT
(In reply to Darin Adler from
comment #11
)
> Comment on
attachment 423339
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=423339&action=review
> > >>> Tools/WebKitTestRunner/TestInvocation.cpp:1358 > >>> + auto attributeOnURL = WKURLCreateWithUTF8CString(toWTFString(stringValue(testDictionary, "AttributeOnURLString")).utf8().data()); > >> > >> Need adoptWK here so these don’t leak. > > > > I willfully admit that I'm not great with these conversions and API types. When I use adoptWK here I get: > > error: no viable conversion from 'WebKit::WKRetainPtr<const OpaqueWKURL *>' to 'WKURLRef' (aka 'const OpaqueWKURL *') > > > > What is the right course of action? Thanks! > > You also have to add .get() where they are used: > > > TestController::singleton(). > setPrivateClickMeasurementAttributionReportURLsForTesting(sourceURL.get(), > attributeOnURL.get()); > > Doing that should get rid of those errors.
Got it. I will land a follow-up patch shortly. OK if I state you as reviewer?
Darin Adler
Comment 13
2021-03-16 15:28:05 PDT
(In reply to John Wilander from
comment #12
)
> Got it. I will land a follow-up patch shortly. OK if I state you as reviewer?
Sure. Sometimes people just write "Suggested by" instead of "Reviewed by" in cases like this.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug