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

{
  "description": "Source dropped due to storage limit",
  "api_config": {
    "max_sources_per_origin": "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"
              }
            }
          }
        ]
      },
      // Should be dropped due to storage limit regardless of the source type.
      {
        "timestamp": "1000",
        "registration_request": {
          "context_origin": "https://source.test",
          "Attribution-Reporting-Eligible": "event-source"
        },
        "responses": [
          {
            "url": "https://reporter.test/register-source",
            "debug_permission": true,
            "response": {
              "Attribution-Reporting-Register-Source": {
                "destination": "https://destination.test",
                "source_event_id": "222",
                "debug_reporting": true
              }
            }
          }
        ]
      },
      // Should be dropped due to storage limit regardless of the destination.
      {
        "timestamp": "2000",
        "registration_request": {
          "context_origin": "https://source.test",
          "Attribution-Reporting-Eligible": "navigation-source"
        },
        "responses": [
          {
            "url": "https://reporter.test/register-source",
            "debug_permission": true,
            "response": {
              "Attribution-Reporting-Register-Source": {
                "destination": "https://another-destination.test",
                "source_event_id": "333",
                "debug_reporting": true
              }
            }
          }
        ]
      },
      // Should be dropped due to storage limit regardless of the reporting origin.
      {
        "timestamp": "3000",
        "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": "444",
                "debug_reporting": true
              }
            }
          }
        ]
      },
      // Should be dropped as there is no matching source.
      {
        "timestamp": "4000",
        "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"
                  }
                ],
                "filters": {
                  "source_type": ["event"]
                }
              }
            }
          }
        ]
      },
      // Should be dropped as there is no matching source.
      {
        "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": "2"
                  }
                ]
              }
            }
          }
        ]
      },
      // Should be dropped as there is no matching source.
      {
        "timestamp": "6000",
        "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": "3"
                  }
                ]
              }
            }
          }
        ]
      },
      // Should be registered as the source origin is different.
      {
        "timestamp": "100000",
        "registration_request": {
          "context_origin": "https://example.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": "555"
              }
            }
          }
        ]
      },
      // Should result in an event-level report.
      {
        "timestamp": "101000",
        "registration_request": {
          "context_origin": "https://destination.test"
        },
        "responses": [
          {
            "url": "https://reporter.test/register-trigger",
            "response": {
              "Attribution-Reporting-Register-Trigger": {
                "event_trigger_data": [
                  {
                    "trigger_data": "4"
                  }
                ]
              }
            }
          }
        ]
      }
    ]
  },
  "output": {
    "reports": [
      {
        "payload": [
          {
            "body": {
              "attribution_destination": "https://destination.test",
              "limit": "1",
              "source_event_id": "222",
              "source_site": "https://source.test"
            },
            "type": "source-storage-limit"
          }
        ],
        "report_time": "1000",
        "report_url": "https://reporter.test/.well-known/attribution-reporting/debug/verbose"
      },
      {
        "payload": [
          {
            "body": {
              "attribution_destination": "https://another-destination.test",
              "limit": "1",
              "source_event_id": "333",
              "source_site": "https://source.test"
            },
            "type": "source-storage-limit"
          }
        ],
        "report_time": "2000",
        "report_url": "https://reporter.test/.well-known/attribution-reporting/debug/verbose"
      },
      {
        "payload": [
          {
            "body": {
              "attribution_destination": "https://destination.test",
              "limit": "1",
              "source_event_id": "444",
              "source_site": "https://source.test"
            },
            "type": "source-storage-limit"
          }
        ],
        "report_time": "3000",
        "report_url": "https://another-reporter.test/.well-known/attribution-reporting/debug/verbose"
      },
      {
        "payload": {
          "attribution_destination": "https://destination.test",
          "randomized_trigger_rate": 0.0024263,
          "scheduled_report_time": "172900",
          "source_event_id": "555",
          "source_type": "navigation",
          "trigger_data": "4"
        },
        "report_time": "172900000",
        "report_url": "https://reporter.test/.well-known/attribution-reporting/report-event-attribution"
      }
    ]
  }
}