Add more test coverage for aggregatable debug reporting on trigger
registrations Change-Id: I6a17ecfa5a613dc7127d1cef65043c4305ee15c1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6017671 Reviewed-by: Andrew Paseltiner <apaseltiner@chromium.org> Commit-Queue: Nan Lin <linnan@chromium.org> Cr-Commit-Position: refs/heads/main@{#1382548}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
65d1a7239a
commit
2c05d700df
content/test
@ -6011,6 +6011,7 @@ data/attribution_reporting/interop/aggregatable_contributions_creation.json
|
||||
data/attribution_reporting/interop/aggregatable_contributions_with_filtering_ids.json
|
||||
data/attribution_reporting/interop/aggregatable_debug_reports.json
|
||||
data/attribution_reporting/interop/aggregatable_debug_reports_limits.json
|
||||
data/attribution_reporting/interop/aggregatable_debug_reports_trigger.json
|
||||
data/attribution_reporting/interop/aggregatable_debug_reports_with_filtering_ids.json
|
||||
data/attribution_reporting/interop/aggregatable_dedup_key.json
|
||||
data/attribution_reporting/interop/aggregatable_large_key.json
|
||||
|
386
content/test/data/attribution_reporting/interop/aggregatable_debug_reports_trigger.json
Normal file
386
content/test/data/attribution_reporting/interop/aggregatable_debug_reports_trigger.json
Normal file
@ -0,0 +1,386 @@
|
||||
{
|
||||
"description": "Aggregatable debug reports creation for trigger registrations",
|
||||
"api_config": {
|
||||
"needs_aggregatable_debug": true
|
||||
},
|
||||
"input": {
|
||||
"registrations": [
|
||||
{
|
||||
"timestamp": "0",
|
||||
"registration_request": {
|
||||
"context_origin": "https://source.test",
|
||||
"Attribution-Reporting-Eligible": "navigation-source"
|
||||
},
|
||||
"responses": [
|
||||
{
|
||||
"url": "https://reporter.test/register-source",
|
||||
"response": {
|
||||
"Attribution-Reporting-Register-Source": {
|
||||
"destination": "https://destination1.test"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": "1",
|
||||
"registration_request": {
|
||||
"context_origin": "https://source.test",
|
||||
"Attribution-Reporting-Eligible": "navigation-source"
|
||||
},
|
||||
"responses": [
|
||||
{
|
||||
"url": "https://reporter.test/register-source",
|
||||
"response": {
|
||||
"Attribution-Reporting-Register-Source": {
|
||||
"destination": "https://destination2.test",
|
||||
"aggregatable_debug_reporting": {
|
||||
"budget": 1024,
|
||||
"key_piece": "0x1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// No matching source and has matching debug type, creates an
|
||||
// aggregatable debug report.
|
||||
{
|
||||
"timestamp": "2",
|
||||
"registration_request": {
|
||||
"context_origin": "https://destination3.test"
|
||||
},
|
||||
"responses": [
|
||||
{
|
||||
"url": "https://reporter.test/register-trigger",
|
||||
"response": {
|
||||
"Attribution-Reporting-Register-Trigger": {
|
||||
"aggregatable_values": {
|
||||
"a": 1
|
||||
},
|
||||
"aggregatable_debug_reporting": {
|
||||
"key_piece": "0x2",
|
||||
"debug_data": [
|
||||
{
|
||||
"types": ["trigger-no-matching-source"],
|
||||
"key_piece": "0x4",
|
||||
"value": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// No matching source and no matching debug type, creates a null
|
||||
// aggregatable debug report.
|
||||
{
|
||||
"timestamp": "3",
|
||||
"registration_request": {
|
||||
"context_origin": "https://destination3.test"
|
||||
},
|
||||
"responses": [
|
||||
{
|
||||
"url": "https://reporter.test/register-trigger",
|
||||
"response": {
|
||||
"Attribution-Reporting-Register-Trigger": {
|
||||
"aggregatable_values": {
|
||||
"a": 1
|
||||
},
|
||||
"aggregatable_debug_reporting": {
|
||||
"key_piece": "0x2",
|
||||
"debug_data": [
|
||||
{
|
||||
"types": ["trigger-aggregate-no-contributions"],
|
||||
"key_piece": "0x4",
|
||||
"value": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// Aggregatable debug reporting not configured for the matched source and
|
||||
// no matching debug type, creates a null aggregatable debug report.
|
||||
{
|
||||
"timestamp": "4",
|
||||
"registration_request": {
|
||||
"context_origin": "https://destination1.test"
|
||||
},
|
||||
"responses": [
|
||||
{
|
||||
"url": "https://reporter.test/register-trigger",
|
||||
"response": {
|
||||
"Attribution-Reporting-Register-Trigger": {
|
||||
"aggregatable_values": {
|
||||
"a": 1
|
||||
},
|
||||
"aggregatable_debug_reporting": {
|
||||
"key_piece": "0x2",
|
||||
"debug_data": [
|
||||
{
|
||||
"types": ["trigger-no-matching-source"],
|
||||
"key_piece": "0x4",
|
||||
"value": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// Aggregatable debug reporting not configured for the matched source and
|
||||
// has matching debug type, creates a null aggregatable debug report.
|
||||
{
|
||||
"timestamp": "5",
|
||||
"registration_request": {
|
||||
"context_origin": "https://destination1.test"
|
||||
},
|
||||
"responses": [
|
||||
{
|
||||
"url": "https://reporter.test/register-trigger",
|
||||
"response": {
|
||||
"Attribution-Reporting-Register-Trigger": {
|
||||
"aggregatable_values": {
|
||||
"a": 1
|
||||
},
|
||||
"aggregatable_debug_reporting": {
|
||||
"key_piece": "0x2",
|
||||
"debug_data": [
|
||||
{
|
||||
"types": ["trigger-aggregate-no-contributions"],
|
||||
"key_piece": "0x4",
|
||||
"value": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// Aggregatable debug reporting configured for the matched source and no
|
||||
// matching debug type, creates a null aggregatable debug report.
|
||||
{
|
||||
"timestamp": "6",
|
||||
"registration_request": {
|
||||
"context_origin": "https://destination2.test"
|
||||
},
|
||||
"responses": [
|
||||
{
|
||||
"url": "https://reporter.test/register-trigger",
|
||||
"response": {
|
||||
"Attribution-Reporting-Register-Trigger": {
|
||||
"aggregatable_values": {
|
||||
"a": 1
|
||||
},
|
||||
"aggregatable_debug_reporting": {
|
||||
"key_piece": "0x2",
|
||||
"debug_data": [
|
||||
{
|
||||
"types": ["trigger-no-matching-source"],
|
||||
"key_piece": "0x4",
|
||||
"value": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// Aggregatable debug reporting configured for the matched source and has
|
||||
// matching debug type, creates an aggregatable debug report.
|
||||
{
|
||||
"timestamp": "7",
|
||||
"registration_request": {
|
||||
"context_origin": "https://destination2.test"
|
||||
},
|
||||
"responses": [
|
||||
{
|
||||
"url": "https://reporter.test/register-trigger",
|
||||
"response": {
|
||||
"Attribution-Reporting-Register-Trigger": {
|
||||
"aggregatable_values": {
|
||||
"a": 1
|
||||
},
|
||||
"aggregatable_debug_reporting": {
|
||||
"key_piece": "0x2",
|
||||
"debug_data": [
|
||||
{
|
||||
"types": ["trigger-aggregate-no-contributions"],
|
||||
"key_piece": "0x4",
|
||||
"value": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// Aggregatable debug reporting not configured for the source and the
|
||||
// trigger, no aggregatable debug report is created.
|
||||
{
|
||||
"timestamp": "8",
|
||||
"registration_request": {
|
||||
"context_origin": "https://destination1.test"
|
||||
},
|
||||
"responses": [
|
||||
{
|
||||
"url": "https://reporter.test/register-trigger",
|
||||
"response": {
|
||||
"Attribution-Reporting-Register-Trigger": {
|
||||
"aggregatable_values": {
|
||||
"a": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// Aggregatable debug reporting configured for the source but not for the
|
||||
// trigger, no aggregatable debug report is created.
|
||||
{
|
||||
"timestamp": "9",
|
||||
"registration_request": {
|
||||
"context_origin": "https://destination2.test"
|
||||
},
|
||||
"responses": [
|
||||
{
|
||||
"url": "https://reporter.test/register-trigger",
|
||||
"response": {
|
||||
"Attribution-Reporting-Register-Trigger": {
|
||||
"aggregatable_values": {
|
||||
"a": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"output": {
|
||||
"reports": [
|
||||
{
|
||||
"payload": {
|
||||
"aggregation_coordinator_origin": "https://coordinator.test",
|
||||
"histograms": [ {
|
||||
"id": "0",
|
||||
"key": "0x6",
|
||||
"value": 1
|
||||
} ],
|
||||
"shared_info": {
|
||||
"api": "attribution-reporting-debug",
|
||||
"attribution_destination": "https://destination3.test",
|
||||
"reporting_origin": "https://reporter.test",
|
||||
"scheduled_report_time": "0",
|
||||
"version": "1.0"
|
||||
}
|
||||
},
|
||||
"report_time": "2",
|
||||
"report_url": "https://reporter.test/.well-known/attribution-reporting/debug/report-aggregate-debug"
|
||||
},
|
||||
{
|
||||
"payload": {
|
||||
"aggregation_coordinator_origin": "https://coordinator.test",
|
||||
"histograms": [ {
|
||||
"id": "0",
|
||||
"key": "0x0",
|
||||
"value": 0
|
||||
} ],
|
||||
"shared_info": {
|
||||
"api": "attribution-reporting-debug",
|
||||
"attribution_destination": "https://destination3.test",
|
||||
"reporting_origin": "https://reporter.test",
|
||||
"scheduled_report_time": "0",
|
||||
"version": "1.0"
|
||||
}
|
||||
},
|
||||
"report_time": "3",
|
||||
"report_url": "https://reporter.test/.well-known/attribution-reporting/debug/report-aggregate-debug"
|
||||
},
|
||||
{
|
||||
"payload": {
|
||||
"aggregation_coordinator_origin": "https://coordinator.test",
|
||||
"histograms": [ {
|
||||
"id": "0",
|
||||
"key": "0x0",
|
||||
"value": 0
|
||||
} ],
|
||||
"shared_info": {
|
||||
"api": "attribution-reporting-debug",
|
||||
"attribution_destination": "https://destination1.test",
|
||||
"reporting_origin": "https://reporter.test",
|
||||
"scheduled_report_time": "0",
|
||||
"version": "1.0"
|
||||
}
|
||||
},
|
||||
"report_time": "4",
|
||||
"report_url": "https://reporter.test/.well-known/attribution-reporting/debug/report-aggregate-debug"
|
||||
},
|
||||
{
|
||||
"payload": {
|
||||
"aggregation_coordinator_origin": "https://coordinator.test",
|
||||
"histograms": [ {
|
||||
"id": "0",
|
||||
"key": "0x0",
|
||||
"value": 0
|
||||
} ],
|
||||
"shared_info": {
|
||||
"api": "attribution-reporting-debug",
|
||||
"attribution_destination": "https://destination1.test",
|
||||
"reporting_origin": "https://reporter.test",
|
||||
"scheduled_report_time": "0",
|
||||
"version": "1.0"
|
||||
}
|
||||
},
|
||||
"report_time": "5",
|
||||
"report_url": "https://reporter.test/.well-known/attribution-reporting/debug/report-aggregate-debug"
|
||||
},
|
||||
{
|
||||
"payload": {
|
||||
"aggregation_coordinator_origin": "https://coordinator.test",
|
||||
"histograms": [ {
|
||||
"id": "0",
|
||||
"key": "0x0",
|
||||
"value": 0
|
||||
} ],
|
||||
"shared_info": {
|
||||
"api": "attribution-reporting-debug",
|
||||
"attribution_destination": "https://destination2.test",
|
||||
"reporting_origin": "https://reporter.test",
|
||||
"scheduled_report_time": "0",
|
||||
"version": "1.0"
|
||||
}
|
||||
},
|
||||
"report_time": "6",
|
||||
"report_url": "https://reporter.test/.well-known/attribution-reporting/debug/report-aggregate-debug"
|
||||
},
|
||||
{
|
||||
"payload": {
|
||||
"aggregation_coordinator_origin": "https://coordinator.test",
|
||||
"histograms": [ {
|
||||
"id": "0",
|
||||
"key": "0x7",
|
||||
"value": 1
|
||||
} ],
|
||||
"shared_info": {
|
||||
"api": "attribution-reporting-debug",
|
||||
"attribution_destination": "https://destination2.test",
|
||||
"reporting_origin": "https://reporter.test",
|
||||
"scheduled_report_time": "0",
|
||||
"version": "1.0"
|
||||
}
|
||||
},
|
||||
"report_time": "7",
|
||||
"report_url": "https://reporter.test/.well-known/attribution-reporting/debug/report-aggregate-debug"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user