chromium/content/test/data/attribution_reporting/interop/event_level_storage_limit.json

{
  "description": "Event-level report not created due to storage limit",
  "api_config": {
    "max_event_level_reports_per_destination": "1"
  },
  "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": "111",
                "aggregation_keys": {
                  "a": "0x1"
                }
              }
            }
          }
        ]
      },
      {
        "timestamp": "1000",
        "registration_request": {
          "context_origin": "https://source.test",
          "Attribution-Reporting-Eligible": "navigation-source"
        },
        "responses": [
          {
            "url": "https://another-reporter.test/register-source",
            "debug_permission": true,
            "response": {
              "Attribution-Reporting-Register-Source": {
                "destination": "https://destination.test",
                "source_event_id": "222",
                "aggregation_keys": {
                  "a": "0x2"
                }
              }
            }
          }
        ]
      },
      {
        "timestamp": "2000",
        "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://another-destination.test",
                "source_event_id": "333",
                "aggregation_keys": {
                  "a": "0x3"
                }
              }
            }
          }
        ]
      },
      {
        "timestamp": "3000",
        "registration_request": {
          "context_origin": "https://destination.test"
        },
        "responses": [
          {
            "url": "https://reporter.test/register-trigger",
            "response": {
              "Attribution-Reporting-Register-Trigger": {
                "event_trigger_data": [
                  {
                    "trigger_data": "1"
                  }
                ],
                "aggregatable_trigger_data": [
                  {
                    "source_keys": ["a"],
                    "key_piece": "0x10"
                  }
                ],
                "aggregatable_values": {
                  "a": 111
                }
              }
            }
          }
        ]
      },
      // Should not result in an event-level report due to storage limit
      // regardless of reporting origin.
      {
        "timestamp": "4000",
        "registration_request": {
          "context_origin": "https://example.destination.test"
        },
        "responses": [
          {
            "url": "https://another-reporter.test/register-trigger",
            "debug_permission": true,
            "response": {
              "Attribution-Reporting-Register-Trigger": {
                "debug_reporting": true,
                "event_trigger_data": [
                  {
                    "trigger_data": "2"
                  }
                ],
                "aggregatable_trigger_data": [
                  {
                    "source_keys": ["a"],
                    "key_piece": "0x20"
                  }
                ],
                "aggregatable_values": {
                  "a": 222
                }
              }
            }
          }
        ]
      },
      // Should result in an event-level report as the destination site is
      // different.
      {
        "timestamp": "5000",
        "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": "3"
                  }
                ],
                "aggregatable_trigger_data": [
                  {
                    "source_keys": ["a"],
                    "key_piece": "0x30"
                  }
                ],
                "aggregatable_values": {
                  "a": 333
                }
              }
            }
          }
        ]
      }
    ]
  },
  "output": {
    "reports": [
      {
        "payload": [
          {
            "body": {
              "attribution_destination": "https://destination.test",
              "limit": "1",
              "source_event_id": "222",
              "source_site": "https://source.test"
            },
            "type": "trigger-event-storage-limit"
          }
        ],
        "report_time": "4000",
        "report_url": "https://another-reporter.test/.well-known/attribution-reporting/debug/verbose"
      },
      {
        "payload": {
          "aggregation_coordinator_origin": "https://coordinator.test",
          "histograms": [
            {
              "id": "0",
              "key": "0x11",
              "value": 111
            }
          ],
          "shared_info": {
            "api": "attribution-reporting",
            "attribution_destination": "https://destination.test",
            "reporting_origin": "https://reporter.test",
            "scheduled_report_time": "3603",
            "version": "1.0"
          }
        },
        "report_time": "3603000",
        "report_url": "https://reporter.test/.well-known/attribution-reporting/report-aggregate-attribution"
      },
      {
        "payload": {
          "aggregation_coordinator_origin": "https://coordinator.test",
          "histograms": [
            {
              "id": "0",
              "key": "0x22",
              "value": 222
            }
          ],
          "shared_info": {
            "api": "attribution-reporting",
            "attribution_destination": "https://destination.test",
            "reporting_origin": "https://another-reporter.test",
            "scheduled_report_time": "3604",
            "version": "1.0"
          }
        },
        "report_time": "3604000",
        "report_url": "https://another-reporter.test/.well-known/attribution-reporting/report-aggregate-attribution"
      },
      {
        "payload": {
          "aggregation_coordinator_origin": "https://coordinator.test",
          "histograms": [
            {
              "id": "0",
              "key": "0x33",
              "value": 333
            }
          ],
          "shared_info": {
            "api": "attribution-reporting",
            "attribution_destination": "https://another-destination.test",
            "reporting_origin": "https://reporter.test",
            "scheduled_report_time": "3605",
            "version": "1.0"
          }
        },
        "report_time": "3605000",
        "report_url": "https://reporter.test/.well-known/attribution-reporting/report-aggregate-attribution"
      },
      {
        "payload": {
          "attribution_destination": "https://destination.test",
          "randomized_trigger_rate": 0.0024263,
          "scheduled_report_time": "172800",
          "source_event_id": "111",
          "source_type": "navigation",
          "trigger_data": "1"
        },
        "report_url": "https://reporter.test/.well-known/attribution-reporting/report-event-attribution",
        "report_time": "172800000"
      },
      {
        "payload": {
          "attribution_destination": "https://another-destination.test",
          "randomized_trigger_rate": 0.0024263,
          "scheduled_report_time": "172802",
          "source_event_id": "333",
          "source_type": "navigation",
          "trigger_data": "3"
        },
        "report_time": "172802000",
        "report_url": "https://reporter.test/.well-known/attribution-reporting/report-event-attribution"
      }
    ]
  }
}