Adds test for debug reports. [chromium/src : main]

2 views
Skip to first unread message

Andrew Paseltiner (Gerrit)

unread,
Jun 23, 2022, 11:07:16 AM6/23/22
to Adarsh Murthy, blink-revie...@chromium.org, blink-...@chromium.org, chromium...@chromium.org

Attention is currently required from: Adarsh Murthy.

View Change

3 comments:

  • File third_party/blink/web_tests/wpt_internal/attribution-reporting/simple-event-level-report-test.sub.https.html:

    • Patch Set #2, Line 51:

      assert_equals(report.source_debug_key, '246');
      assert_equals(report.trigger_debug_key, '357');

      Maybe put `'246'` and `'357'` into `const` vars since they are used 3 times each?

    • Patch Set #2, Line 58: Collect debug reports.

      `'Debug report is received if source and trigger debug keys are set.'`

    • Patch Set #2, Line 37:

      attribution_reporting_promise_test(async t => {
      const cookie = 'ar_debug=1;Secure;HttpOnly;SameSite=None;Path=/';
      registerAttributionSrc('Attribution-Reporting-Register-Source', {
      source_event_id: '1',
      destination: `https://{{host}}`,
      debug_key: '246',
      }, cookie);
      registerAttributionSrc('Attribution-Reporting-Register-Trigger', {
      event_trigger_data: [{trigger_data: '0'}],
      debug_key: '357',
      }, cookie);
      const payload = await pollEventLevelReports();
      assert_equals(payload.reports.length, 1);
      const report = JSON.parse(payload.reports[0].body);
      assert_equals(report.source_debug_key, '246');
      assert_equals(report.trigger_debug_key, '357');
      const debugPayload = await pollEventLevelDebugReports();
      assert_equals(debugPayload.reports.length, 1);
      const debugReport = JSON.parse(debugPayload.reports[0].body);
      assert_equals(debugReport.source_debug_key, '246');
      assert_equals(debugReport.trigger_debug_key, '357');
      }, 'Collect debug reports.');

      Let's move this to its own test file, since it's not related to simple event level reports.

To view, visit change 3721875. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I488b5130564ea1e95ea9e648b4fd4bc26cea72dd
Gerrit-Change-Number: 3721875
Gerrit-PatchSet: 2
Gerrit-Owner: Adarsh Murthy <adarsh...@google.com>
Gerrit-CC: Andrew Paseltiner <apase...@chromium.org>
Gerrit-Attention: Adarsh Murthy <adarsh...@google.com>
Gerrit-Comment-Date: Thu, 23 Jun 2022 15:07:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

Blink W3C Test Autoroller (Gerrit)

unread,
Jun 23, 2022, 11:42:31 AM6/23/22
to Adarsh Murthy, blink-revie...@chromium.org, blink-...@chromium.org, Andrew Paseltiner, chromium...@chromium.org

Attention is currently required from: Adarsh Murthy.

Exportable changes to web-platform-tests were detected in this CL and a pull request in the upstream repo has been made: https://github.com/web-platform-tests/wpt/pull/34556.

When this CL lands, the bot will automatically merge the PR on GitHub if the required GitHub checks pass; otherwise, ecosystem-infra@ team will triage the failures and may contact you.

WPT Export docs:
https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md#Automatic-export-process

View Change

    To view, visit change 3721875. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I488b5130564ea1e95ea9e648b4fd4bc26cea72dd
    Gerrit-Change-Number: 3721875
    Gerrit-PatchSet: 2
    Gerrit-Owner: Adarsh Murthy <adarsh...@google.com>
    Gerrit-CC: Andrew Paseltiner <apase...@chromium.org>
    Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
    Gerrit-Attention: Adarsh Murthy <adarsh...@google.com>
    Gerrit-Comment-Date: Thu, 23 Jun 2022 15:42:23 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment

    Adarsh Murthy (Gerrit)

    unread,
    Jun 23, 2022, 4:10:03 PM6/23/22
    to blink-revie...@chromium.org, blink-...@chromium.org, Blink W3C Test Autoroller, Andrew Paseltiner, chromium...@chromium.org

    Attention is currently required from: Andrew Paseltiner.

    View Change

    3 comments:

    • File third_party/blink/web_tests/wpt_internal/attribution-reporting/simple-event-level-report-test.sub.https.html:

      • Patch Set #2, Line 51:

        assert_equals(report.source_debug_key, '246');
        assert_equals(report.trigger_debug_key, '357');

        Maybe put `'246'` and `'357'` into `const` vars since they are used 3 times each?

      • Done

      • Patch Set #2, Line 37:

        attribution_reporting_promise_test(async t => {
        const cookie = 'ar_debug=1;Secure;HttpOnly;SameSite=None;Path=/';
        registerAttributionSrc('Attribution-Reporting-Register-Source', {
        source_event_id: '1',
        destination: `https://{{host}}`,
        debug_key: '246',
        }, cookie);
        registerAttributionSrc('Attribution-Reporting-Register-Trigger', {
        event_trigger_data: [{trigger_data: '0'}],
        debug_key: '357',
        }, cookie);
        const payload = await pollEventLevelReports();
        assert_equals(payload.reports.length, 1);
        const report = JSON.parse(payload.reports[0].body);
        assert_equals(report.source_debug_key, '246');
        assert_equals(report.trigger_debug_key, '357');
        const debugPayload = await pollEventLevelDebugReports();
        assert_equals(debugPayload.reports.length, 1);
        const debugReport = JSON.parse(debugPayload.reports[0].body);
        assert_equals(debugReport.source_debug_key, '246');
        assert_equals(debugReport.trigger_debug_key, '357');
        }, 'Collect debug reports.');

        Let's move this to its own test file, since it's not related to simple event level reports.

      • Done

      • `'Debug report is received if source and trigger debug keys are set. […]

        Done

    To view, visit change 3721875. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I488b5130564ea1e95ea9e648b4fd4bc26cea72dd
    Gerrit-Change-Number: 3721875
    Gerrit-PatchSet: 2
    Gerrit-Owner: Adarsh Murthy <adarsh...@google.com>
    Gerrit-CC: Andrew Paseltiner <apase...@chromium.org>
    Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
    Gerrit-Attention: Andrew Paseltiner <apase...@chromium.org>
    Gerrit-Comment-Date: Thu, 23 Jun 2022 20:09:51 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Andrew Paseltiner <apase...@chromium.org>
    Gerrit-MessageType: comment

    Andrew Paseltiner (Gerrit)

    unread,
    Jun 23, 2022, 5:05:24 PM6/23/22
    to Adarsh Murthy, blink-revie...@chromium.org, blink-...@chromium.org, Blink W3C Test Autoroller, chromium...@chromium.org

    Attention is currently required from: Adarsh Murthy.

    View Change

    1 comment:

    To view, visit change 3721875. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I488b5130564ea1e95ea9e648b4fd4bc26cea72dd
    Gerrit-Change-Number: 3721875
    Gerrit-PatchSet: 3
    Gerrit-Owner: Adarsh Murthy <adarsh...@google.com>
    Gerrit-CC: Andrew Paseltiner <apase...@chromium.org>
    Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
    Gerrit-Attention: Adarsh Murthy <adarsh...@google.com>
    Gerrit-Comment-Date: Thu, 23 Jun 2022 21:05:15 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment

    Adarsh Murthy (Gerrit)

    unread,
    Jul 7, 2022, 11:02:51 AM7/7/22
    to blink-revie...@chromium.org, blink-...@chromium.org, Blink W3C Test Autoroller, Andrew Paseltiner, chromium...@chromium.org

    Attention is currently required from: Andrew Paseltiner.

    View Change

    1 comment:

    • Patchset:

      • Done

    To view, visit change 3721875. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I488b5130564ea1e95ea9e648b4fd4bc26cea72dd
    Gerrit-Change-Number: 3721875
    Gerrit-PatchSet: 4
    Gerrit-Owner: Adarsh Murthy <adarsh...@google.com>
    Gerrit-CC: Andrew Paseltiner <apase...@chromium.org>
    Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
    Gerrit-Attention: Andrew Paseltiner <apase...@chromium.org>
    Gerrit-Comment-Date: Thu, 07 Jul 2022 15:02:38 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No

    Andrew Paseltiner (Gerrit)

    unread,
    Jul 8, 2022, 11:58:07 AM7/8/22
    to Adarsh Murthy, blink-revie...@chromium.org, blink-...@chromium.org, Blink W3C Test Autoroller, chromium...@chromium.org

    Attention is currently required from: Adarsh Murthy.

    View Change

    3 comments:

    • File third_party/blink/web_tests/wpt_internal/attribution-reporting/event-level-debug-report-test.sub.https.html:

      • Patch Set #6, Line 11: registerAttributionSrc

        Please add an `await` here, since this function returns a promise.

      • Patch Set #6, Line 19: registerAttributionSrc

        Please add an `await` here, since this function returns a promise.

      • Patch Set #6, Line 31: const debugPayload = await pollEventLevelDebugReports();

        Please add a blank line above this one for readability.

    To view, visit change 3721875. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I488b5130564ea1e95ea9e648b4fd4bc26cea72dd
    Gerrit-Change-Number: 3721875
    Gerrit-PatchSet: 6
    Gerrit-Owner: Adarsh Murthy <adarsh...@google.com>
    Gerrit-CC: Andrew Paseltiner <apase...@chromium.org>
    Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
    Gerrit-Attention: Adarsh Murthy <adarsh...@google.com>
    Gerrit-Comment-Date: Fri, 08 Jul 2022 15:57:56 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment

    Adarsh Murthy (Gerrit)

    unread,
    Jul 8, 2022, 1:28:54 PM7/8/22
    to blink-revie...@chromium.org, blink-...@chromium.org, Blink W3C Test Autoroller, Andrew Paseltiner, chromium...@chromium.org

    Attention is currently required from: Andrew Paseltiner.

    View Change

    3 comments:

    • File third_party/blink/web_tests/wpt_internal/attribution-reporting/event-level-debug-report-test.sub.https.html:

      • Patch Set #6, Line 11: registerAttributionSrc

        Please add an `await` here, since this function returns a promise.

      • Done

      • Patch Set #6, Line 19: registerAttributionSrc

        Please add an `await` here, since this function returns a promise.

      • Done

      • Patch Set #6, Line 31: const debugPayload = await pollEventLevelDebugReports();

        Please add a blank line above this one for readability.

      • Done

    To view, visit change 3721875. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I488b5130564ea1e95ea9e648b4fd4bc26cea72dd
    Gerrit-Change-Number: 3721875
    Gerrit-PatchSet: 6
    Gerrit-Owner: Adarsh Murthy <adarsh...@google.com>
    Gerrit-CC: Andrew Paseltiner <apase...@chromium.org>
    Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
    Gerrit-Attention: Andrew Paseltiner <apase...@chromium.org>
    Gerrit-Comment-Date: Fri, 08 Jul 2022 17:28:43 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No

    Andrew Paseltiner (Gerrit)

    unread,
    Jul 8, 2022, 1:37:34 PM7/8/22
    to Adarsh Murthy, blink-revie...@chromium.org, blink-...@chromium.org, Blink W3C Test Autoroller, chromium...@chromium.org

    Attention is currently required from: Adarsh Murthy.

    Patch set 7:Quick-Run +1Code-Review +1Commit-Queue +1

    View Change

      To view, visit change 3721875. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I488b5130564ea1e95ea9e648b4fd4bc26cea72dd
      Gerrit-Change-Number: 3721875
      Gerrit-PatchSet: 7
      Gerrit-Owner: Adarsh Murthy <adarsh...@google.com>
      Gerrit-Reviewer: Andrew Paseltiner <apase...@chromium.org>
      Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
      Gerrit-Attention: Adarsh Murthy <adarsh...@google.com>
      Gerrit-Comment-Date: Fri, 08 Jul 2022 17:37:28 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      Gerrit-MessageType: comment

      Adarsh Murthy (Gerrit)

      unread,
      Jul 11, 2022, 12:59:16 PM7/11/22
      to blink-revie...@chromium.org, blink-...@chromium.org, Chromium LUCI CQ, Andrew Paseltiner, Blink W3C Test Autoroller, chromium...@chromium.org

      Attention is currently required from: Adarsh Murthy.

      Patch set 7:Commit-Queue +2

      View Change

        To view, visit change 3721875. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I488b5130564ea1e95ea9e648b4fd4bc26cea72dd
        Gerrit-Change-Number: 3721875
        Gerrit-PatchSet: 7
        Gerrit-Owner: Adarsh Murthy <adarsh...@google.com>
        Gerrit-Reviewer: Adarsh Murthy <adarsh...@google.com>
        Gerrit-Reviewer: Andrew Paseltiner <apase...@chromium.org>
        Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
        Gerrit-Attention: Adarsh Murthy <adarsh...@google.com>
        Gerrit-Comment-Date: Mon, 11 Jul 2022 16:59:08 +0000

        Chromium LUCI CQ (Gerrit)

        unread,
        Jul 11, 2022, 1:40:36 PM7/11/22
        to Adarsh Murthy, blink-revie...@chromium.org, blink-...@chromium.org, Andrew Paseltiner, Blink W3C Test Autoroller, chromium...@chromium.org

        Chromium LUCI CQ submitted this change.

        View Change


        Approvals: Adarsh Murthy: Commit Andrew Paseltiner: Looks good to me
        Adds test for debug reports.


        Adds debug event report endpoint.

        Bug: 1338942
        Change-Id: I488b5130564ea1e95ea9e648b4fd4bc26cea72dd
        Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3721875
        Reviewed-by: Andrew Paseltiner <apase...@chromium.org>
        Commit-Queue: Adarsh Murthy <adarsh...@google.com>
        Cr-Commit-Position: refs/heads/main@{#1022759}
        ---
        A third_party/blink/web_tests/external/wpt/.well-known/attribution-reporting/debug/report-event-attribution
        A third_party/blink/web_tests/wpt_internal/attribution-reporting/event-level-debug-report-test.sub.https.html
        M third_party/blink/web_tests/wpt_internal/attribution-reporting/resources/helpers.js
        3 files changed, 68 insertions(+), 0 deletions(-)


        To view, visit change 3721875. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I488b5130564ea1e95ea9e648b4fd4bc26cea72dd
        Gerrit-Change-Number: 3721875
        Gerrit-PatchSet: 8
        Gerrit-Owner: Adarsh Murthy <adarsh...@google.com>
        Gerrit-Reviewer: Adarsh Murthy <adarsh...@google.com>
        Gerrit-Reviewer: Andrew Paseltiner <apase...@chromium.org>
        Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
        Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
        Gerrit-MessageType: merged

        Blink W3C Test Autoroller (Gerrit)

        unread,
        Jul 11, 2022, 2:11:25 PM7/11/22
        to Adarsh Murthy, Chromium LUCI CQ, blink-revie...@chromium.org, blink-...@chromium.org, Andrew Paseltiner, chromium...@chromium.org

        The WPT PR for this CL has been merged upstream! https://github.com/web-platform-tests/wpt/pull/34556

        View Change

          To view, visit change 3721875. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I488b5130564ea1e95ea9e648b4fd4bc26cea72dd
          Gerrit-Change-Number: 3721875
          Gerrit-PatchSet: 8
          Gerrit-Owner: Adarsh Murthy <adarsh...@google.com>
          Gerrit-Reviewer: Adarsh Murthy <adarsh...@google.com>
          Gerrit-Reviewer: Andrew Paseltiner <apase...@chromium.org>
          Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
          Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
          Gerrit-Comment-Date: Mon, 11 Jul 2022 18:11:17 +0000
          Reply all
          Reply to author
          Forward
          0 new messages