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

{
  "description": "Different report time windows for event-level reports",
  "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",
                "event_report_window": "96400"
              }
            }
          }
        ]
      },
      {
        "timestamp": "1000",
        "registration_request": {
          "context_origin": "https://source.test",
          "Attribution-Reporting-Eligible": "navigation-source"
        },
        "responses": [
          {
            "url": "https://reporter2.test/register-source",
            "response": {
              "Attribution-Reporting-Register-Source": {
                "destination": "https://destination.test",
                "source_event_id": "456",
                "event_report_window": "182800"
              }
            }
          }
        ]
      },
      {
        "timestamp": "2000",
        "registration_request": {
          "context_origin": "https://source.test",
          "Attribution-Reporting-Eligible": "navigation-source"
        },
        "responses": [
          {
            "url": "https://reporter3.test/register-source",
            "response": {
              "Attribution-Reporting-Register-Source": {
                "destination": "https://destination.test",
                "source_event_id": "789",
                "expiry": "864000"
              }
            }
          }
        ]
      },
      {
        "timestamp": "3000",
        "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://destination2.test",
                "source_event_id": "666",
                "event_report_window": "182800"
              }
            }
          }
        ]
      },
      // Event source should report at event report window.
      {
        "timestamp": "4000",
        "registration_request": {
          "context_origin": "https://destination2.test"
        },
        "responses": [
          {
            "url": "https://reporter.test/register-trigger",
            "response": {
              "Attribution-Reporting-Register-Trigger": {
                "event_trigger_data": [
                  {
                    "trigger_data": "7"
                  }
                ]
              }
            }
          }
        ]
      },
      // Should report at event report window.
      {
        "timestamp": "96300000",
        "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"
                  }
                ]
              }
            }
          }
        ]
      },
      // trigger time == source time + 2 days - 1 ms, should report at 2 days
      // window.
      {
        "timestamp": "172800999",
        "registration_request": {
          "context_origin": "https://destination.test"
        },
        "responses": [
          {
            "url": "https://reporter2.test/register-trigger",
            "response": {
              "Attribution-Reporting-Register-Trigger": {
                "event_trigger_data": [
                  {
                    "trigger_data": "2"
                  }
                ]
              }
            }
          }
        ]
      },
      // trigger time == source time + 2 days, should report at event report
      // window.
      {
        "timestamp": "172801000",
        "registration_request": {
          "context_origin": "https://destination.test"
        },
        "responses": [
          {
            "url": "https://reporter2.test/register-trigger",
            "response": {
              "Attribution-Reporting-Register-Trigger": {
                "event_trigger_data": [
                  {
                    "trigger_data": "3"
                  }
                ]
              }
            }
          }
        ]
      },
      // Should report at 7 days window.
      {
        "timestamp": "604802000",
        "registration_request": {
          "context_origin": "https://destination.test"
        },
        "responses": [
          {
            "url": "https://reporter3.test/register-trigger",
            "response": {
              "Attribution-Reporting-Register-Trigger": {
                "event_trigger_data": [
                  {
                    "trigger_data": "4"
                  }
                ]
              }
            }
          }
        ]
      },
      // Should report at expiry time window.
      {
        "timestamp": "604802001",
        "registration_request": {
          "context_origin": "https://destination.test"
        },
        "responses": [
          {
            "url": "https://reporter3.test/register-trigger",
            "response": {
              "Attribution-Reporting-Register-Trigger": {
                "event_trigger_data": [
                  {
                    "trigger_data": "5"
                  }
                ]
              }
            }
          }
        ]
      }
    ]
  },
  "output": {
    "reports": [
      {
        "payload": {
          "attribution_destination": "https://destination.test",
          "randomized_trigger_rate": 0.0001372,
          "scheduled_report_time": "96400",
          "source_event_id": "123",
          "source_type": "navigation",
          "trigger_data": "1"
        },
        "report_url": "https://reporter.test/.well-known/attribution-reporting/report-event-attribution",
        "report_time": "96400000"
      },
      {
        "payload": {
          "attribution_destination": "https://destination.test",
          "randomized_trigger_rate": 0.0008051,
          "scheduled_report_time": "172801",
          "source_event_id": "456",
          "source_type": "navigation",
          "trigger_data": "2"
        },
        "report_url": "https://reporter2.test/.well-known/attribution-reporting/report-event-attribution",
        "report_time": "172801000"
      },
      {
        "payload": {
          "attribution_destination": "https://destination.test",
          "randomized_trigger_rate": 0.0008051,
          "scheduled_report_time": "182801",
          "source_event_id": "456",
          "source_type": "navigation",
          "trigger_data": "3"
        },
        "report_url": "https://reporter2.test/.well-known/attribution-reporting/report-event-attribution",
        "report_time": "182801000"
      },
      {
        "payload": {
          "attribution_destination": "https://destination2.test",
          "randomized_trigger_rate": 0.0000025,
          "scheduled_report_time": "182803",
          "source_event_id": "666",
          "source_type": "event",
          "trigger_data": "1"
        },
        "report_time": "182803000",
        "report_url": "https://reporter.test/.well-known/attribution-reporting/report-event-attribution"
      },
      {
        "payload": {
          "attribution_destination": "https://destination.test",
          "randomized_trigger_rate": 0.0024263,
          "scheduled_report_time": "864002",
          "source_event_id": "789",
          "source_type": "navigation",
          "trigger_data": "4"
        },
        "report_url": "https://reporter3.test/.well-known/attribution-reporting/report-event-attribution",
        "report_time": "864002000"
      },
      {
        "payload": {
          "attribution_destination": "https://destination.test",
          "randomized_trigger_rate": 0.0024263,
          "scheduled_report_time": "864002",
          "source_event_id": "789",
          "source_type": "navigation",
          "trigger_data": "5"
        },
        "report_time": "864002000",
        "report_url": "https://reporter3.test/.well-known/attribution-reporting/report-event-attribution"
      }
    ]
  }
}