{
"description": "trigger not attributed to an expired source",
"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://destination.test",
"source_event_id": "123",
// Clamped to one day (86400 seconds). Trailing zero included
// to demonstrate validity.
"expiry": 86390.0
}
}
}
]
},
// Should result in an event-level report as the expiry time was clamped
// to one day.
{
"timestamp": "86390000",
"registration_request": {
"context_origin": "https://destination.test"
},
"responses": [
{
"url": "https://reporter.test/register-trigger",
"response": {
"Attribution-Reporting-Register-Trigger": {
"event_trigger_data": [
{
"trigger_data": "0"
}
]
}
}
}
]
},
// Should not result in an event-level report as the source expired at
// one day.
{
"timestamp": "86400000",
"registration_request": {
"context_origin": "https://destination.test"
},
"responses": [
{
"url": "https://reporter.test/register-trigger",
"debug_permission": true,
"response": {
"Attribution-Reporting-Register-Trigger": {
"event_trigger_data": [
{
"trigger_data": "7"
}
],
"debug_reporting": true
}
}
}
]
},
{
"timestamp": "86401000",
"registration_request": {
"context_origin": "https://source.test",
"Attribution-Reporting-Eligible": "event-source"
},
"responses": [
{
"url": "https://reporter.test/register-source",
"response": {
"Attribution-Reporting-Register-Source": {
"destination": "https://destination.test",
"source_event_id": "456",
// Rounded to one day (86400 seconds).
"expiry": "88400",
"aggregation_keys": {
"a": "0x1"
}
}
}
}
]
},
{
"timestamp": "86401001",
"registration_request": {
"context_origin": "https://source.test",
"Attribution-Reporting-Eligible": "event-source"
},
"responses": [
{
"url": "https://reporter.test/register-source",
"response": {
"Attribution-Reporting-Register-Source": {
"destination": "https://another-destination.test",
"source_event_id": "654",
// Rounded to two days (172800 seconds).
"expiry": "172600"
}
}
}
]
},
{
"timestamp": "86402000",
"registration_request": {
"context_origin": "https://source.test",
"Attribution-Reporting-Eligible": "navigation-source"
},
"responses": [
{
"url": "https://another-reporter.test/register-source",
"response": {
"Attribution-Reporting-Register-Source": {
"destination": "https://destination.test",
"source_event_id": "789",
"expiry": "88400"
}
}
}
]
},
// Should not result in an aggregatable report as the expiry time was
// rounded to one day.
{
"timestamp": "172801000",
"registration_request": {
"context_origin": "https://destination.test"
},
"responses": [
{
"url": "https://reporter.test/register-trigger",
"debug_permission": true,
"response": {
"Attribution-Reporting-Register-Trigger": {
"aggregatable_trigger_data": [
{
"source_keys": ["a"],
"key_piece": "0x1"
}
],
"aggregatable_values": {
"a": 123
},
"debug_reporting": true
}
}
}
]
},
// Should result in an event-level report as the expiry time was not rounded.
{
"timestamp": "174801999",
"registration_request": {
"context_origin": "https://destination.test"
},
"responses": [
{
"url": "https://another-reporter.test/register-trigger",
"response": {
"Attribution-Reporting-Register-Trigger": {
"event_trigger_data": [
{
"trigger_data": "5"
}
]
}
}
}
]
},
// Should result in an event-level report as the expiry time was rounded
// to two days.
{
"timestamp": "259201000",
"registration_request": {
"context_origin": "https://another-destination.test"
},
"responses": [
{
"url": "https://reporter.test/register-trigger",
"response": {
"Attribution-Reporting-Register-Trigger": {
"event_trigger_data": [
{
"trigger_data": "1"
}
]
}
}
}
]
}
]
},
"output": {
"reports": [
{
"payload": {
"attribution_destination": "https://destination.test",
"randomized_trigger_rate": 0.0001372,
"scheduled_report_time": "86400",
"source_event_id": "123",
"source_type": "navigation",
"trigger_data": "0"
},
"report_time": "86400000",
"report_url": "https://reporter.test/.well-known/attribution-reporting/report-event-attribution"
},
{
"payload": [
{
"body": {
"attribution_destination": "https://destination.test"
},
"type": "trigger-no-matching-source"
}
],
"report_time": "86400000",
"report_url": "https://reporter.test/.well-known/attribution-reporting/debug/verbose"
},
{
"payload": [
{
"body": {
"attribution_destination": "https://destination.test"
},
"type": "trigger-no-matching-source"
}
],
"report_time": "172801000",
"report_url": "https://reporter.test/.well-known/attribution-reporting/debug/verbose"
},
{
"payload": {
"attribution_destination": "https://destination.test",
"randomized_trigger_rate": 0.0001372,
"scheduled_report_time": "174802",
"source_event_id": "789",
"source_type": "navigation",
"trigger_data": "5"
},
"report_time": "174802000",
"report_url": "https://another-reporter.test/.well-known/attribution-reporting/report-event-attribution"
},
{
"payload": {
"attribution_destination": "https://another-destination.test",
"randomized_trigger_rate": 0.0000025,
"scheduled_report_time": "259201",
"source_event_id": "654",
"source_type": "event",
"trigger_data": "1"
},
"report_time": "259201001",
"report_url": "https://reporter.test/.well-known/attribution-reporting/report-event-attribution"
}
]
}
}