[Connection Allowlist] Stop waiting in reporting tests. [chromium/src : main]

0 views
Skip to first unread message

Mike West (Gerrit)

unread,
Jul 23, 2026, 4:11:45 AM (4 days ago) Jul 23
to Antonio Sartori, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
Attention needed from Antonio Sartori

Mike West added 1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Mike West . resolved

WDYT about this potential improvement to some tests, Antonio?

Open in Gerrit

Related details

Attention is currently required from:
  • Antonio Sartori
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I1e17655904d5bcb9bb11718b132e43525259dbb2
Gerrit-Change-Number: 8136619
Gerrit-PatchSet: 1
Gerrit-Owner: Mike West <mk...@chromium.org>
Gerrit-Reviewer: Antonio Sartori <antonio...@chromium.org>
Gerrit-Reviewer: Mike West <mk...@chromium.org>
Gerrit-Attention: Antonio Sartori <antonio...@chromium.org>
Gerrit-Comment-Date: Thu, 23 Jul 2026 08:11:25 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Antonio Sartori (Gerrit)

unread,
Jul 23, 2026, 4:27:07 AM (4 days ago) Jul 23
to Mike West, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
Attention needed from Mike West

Antonio Sartori added 1 comment

File third_party/blink/web_tests/external/wpt/reporting/resources/report-helper.js
Line 15, Patchset 1 (Latest):
async function pollReportsUntil(endpoint, id, condition, timeout = 3000,
interval = 100) {
Antonio Sartori . unresolved

(nit) reusing `t.step_wait_func` is probably preferred, also because it takes into account the timeout multiplier

cf. https://web-platform-tests.org/writing-tests/testharness-api.html#Test.step_wait_func

Open in Gerrit

Related details

Attention is currently required from:
  • Mike West
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I1e17655904d5bcb9bb11718b132e43525259dbb2
    Gerrit-Change-Number: 8136619
    Gerrit-PatchSet: 1
    Gerrit-Owner: Mike West <mk...@chromium.org>
    Gerrit-Reviewer: Antonio Sartori <antonio...@chromium.org>
    Gerrit-Reviewer: Mike West <mk...@chromium.org>
    Gerrit-Attention: Mike West <mk...@chromium.org>
    Gerrit-Comment-Date: Thu, 23 Jul 2026 08:26:52 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Mike West (Gerrit)

    unread,
    Jul 23, 2026, 6:05:13 AM (4 days ago) Jul 23
    to Antonio Sartori, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
    Attention needed from Antonio Sartori

    Mike West added 1 comment

    File third_party/blink/web_tests/external/wpt/reporting/resources/report-helper.js
    Line 15, Patchset 1 (Latest):
    async function pollReportsUntil(endpoint, id, condition, timeout = 3000,
    interval = 100) {
    Antonio Sartori . unresolved

    (nit) reusing `t.step_wait_func` is probably preferred, also because it takes into account the timeout multiplier

    cf. https://web-platform-tests.org/writing-tests/testharness-api.html#Test.step_wait_func

    Mike West

    Hrm. New to me! :)

    Do you have thoughts about how you'd structure this? That is, I guess we could pass the test object in here and use `t.step_wait_func` as part of this function? Or do you expect the callsites to wrap this method call in that helper?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Antonio Sartori
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I1e17655904d5bcb9bb11718b132e43525259dbb2
    Gerrit-Change-Number: 8136619
    Gerrit-PatchSet: 1
    Gerrit-Owner: Mike West <mk...@chromium.org>
    Gerrit-Reviewer: Antonio Sartori <antonio...@chromium.org>
    Gerrit-Reviewer: Mike West <mk...@chromium.org>
    Gerrit-Attention: Antonio Sartori <antonio...@chromium.org>
    Gerrit-Comment-Date: Thu, 23 Jul 2026 10:05:00 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Antonio Sartori <antonio...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Antonio Sartori (Gerrit)

    unread,
    Jul 23, 2026, 6:12:59 AM (4 days ago) Jul 23
    to Mike West, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
    Attention needed from Mike West

    Antonio Sartori added 1 comment

    File third_party/blink/web_tests/external/wpt/reporting/resources/report-helper.js
    Line 15, Patchset 1 (Latest):
    async function pollReportsUntil(endpoint, id, condition, timeout = 3000,
    interval = 100) {
    Antonio Sartori . unresolved

    (nit) reusing `t.step_wait_func` is probably preferred, also because it takes into account the timeout multiplier

    cf. https://web-platform-tests.org/writing-tests/testharness-api.html#Test.step_wait_func

    Mike West

    Hrm. New to me! :)

    Do you have thoughts about how you'd structure this? That is, I guess we could pass the test object in here and use `t.step_wait_func` as part of this function? Or do you expect the callsites to wrap this method call in that helper?

    Antonio Sartori

    yes, I was thinking about something like the following.

    There is a change in behavior though, because this will throw, instead of returning the reports, if the timeout expires. I guess it's still fine for your purpose. If not, let's stick to your code.

    ```
    async function pollReportsUntil(t, endpoint, id, condition, timeout = 3000,
    interval = 100) {
    return t.step_wait(
    async function() {
    const reports = await pollReports(endpoint, id);
    if (condition(reports)) {
    return reports;
    }
    },
    "Deadline exceeded and no reports received.",
    timeout,
    interval
    });
    }
    ```
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Mike West
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I1e17655904d5bcb9bb11718b132e43525259dbb2
    Gerrit-Change-Number: 8136619
    Gerrit-PatchSet: 1
    Gerrit-Owner: Mike West <mk...@chromium.org>
    Gerrit-Reviewer: Antonio Sartori <antonio...@chromium.org>
    Gerrit-Reviewer: Mike West <mk...@chromium.org>
    Gerrit-Attention: Mike West <mk...@chromium.org>
    Gerrit-Comment-Date: Thu, 23 Jul 2026 10:12:42 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Mike West <mk...@chromium.org>
    Comment-In-Reply-To: Antonio Sartori <antonio...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Mike West (Gerrit)

    unread,
    Jul 24, 2026, 4:19:27 AM (3 days ago) Jul 24
    to Antonio Sartori, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
    Attention needed from Antonio Sartori

    Mike West added 1 comment

    File third_party/blink/web_tests/external/wpt/reporting/resources/report-helper.js
    Mike West

    Unfortunately, `step_wait` (and `step_wait_func` that it depends upon) don't return the value. They resolve a promise if the value returned is truthy. So `return reports` doesn't hand the set of reports back to the caller, but just resolves a promise with `undefined`. (See https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/external/wpt/wasm/core/js/harness/testharness.js;drc=85c57e0ffa499cdab1105f2336722f474ce9457c;l=3123 and https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/external/wpt/wasm/core/js/harness/testharness.js;drc=85c57e0ffa499cdab1105f2336722f474ce9457c;l=3032. I need the results, as we have tests verifying allowed requests (which shouldn't generate reports) and blocked requests (which should), so I need the actual value `pollReports()` eventually produces.

    I dug around a bit more in testharness, but I didn't find anything that would help. Given that, I think the code currently here is better than status quo, but I do agree it would be better to use the timeout multiplier... it doesn't look like that's exposed outside the `Tests` object in testharness, which I don't think I have access to. :/

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Antonio Sartori
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I1e17655904d5bcb9bb11718b132e43525259dbb2
    Gerrit-Change-Number: 8136619
    Gerrit-PatchSet: 1
    Gerrit-Owner: Mike West <mk...@chromium.org>
    Gerrit-Reviewer: Antonio Sartori <antonio...@chromium.org>
    Gerrit-Reviewer: Mike West <mk...@chromium.org>
    Gerrit-Attention: Antonio Sartori <antonio...@chromium.org>
    Gerrit-Comment-Date: Fri, 24 Jul 2026 08:19:09 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Antonio Sartori (Gerrit)

    unread,
    1:57 AM (2 hours ago) 1:57 AM
    to Mike West, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
    Attention needed from Mike West

    Antonio Sartori voted and added 1 comment

    Votes added by Antonio Sartori

    Code-Review+1

    1 comment

    File third_party/blink/web_tests/external/wpt/reporting/resources/report-helper.js
    Line 15, Patchset 1 (Latest):
    async function pollReportsUntil(endpoint, id, condition, timeout = 3000,
    interval = 100) {
    Antonio Sartori . resolved

    (nit) reusing `t.step_wait_func` is probably preferred, also because it takes into account the timeout multiplier

    cf. https://web-platform-tests.org/writing-tests/testharness-api.html#Test.step_wait_func

    Mike West

    Hrm. New to me! :)

    Do you have thoughts about how you'd structure this? That is, I guess we could pass the test object in here and use `t.step_wait_func` as part of this function? Or do you expect the callsites to wrap this method call in that helper?

    Antonio Sartori

    yes, I was thinking about something like the following.

    There is a change in behavior though, because this will throw, instead of returning the reports, if the timeout expires. I guess it's still fine for your purpose. If not, let's stick to your code.

    ```
    async function pollReportsUntil(t, endpoint, id, condition, timeout = 3000,
    interval = 100) {
    return t.step_wait(
    async function() {
    const reports = await pollReports(endpoint, id);
    if (condition(reports)) {
    return reports;
    }
    },
    "Deadline exceeded and no reports received.",
    timeout,
    interval
    });
    }
    ```
    Mike West

    Unfortunately, `step_wait` (and `step_wait_func` that it depends upon) don't return the value. They resolve a promise if the value returned is truthy. So `return reports` doesn't hand the set of reports back to the caller, but just resolves a promise with `undefined`. (See https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/external/wpt/wasm/core/js/harness/testharness.js;drc=85c57e0ffa499cdab1105f2336722f474ce9457c;l=3123 and https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/external/wpt/wasm/core/js/harness/testharness.js;drc=85c57e0ffa499cdab1105f2336722f474ce9457c;l=3032. I need the results, as we have tests verifying allowed requests (which shouldn't generate reports) and blocked requests (which should), so I need the actual value `pollReports()` eventually produces.

    I dug around a bit more in testharness, but I didn't find anything that would help. Given that, I think the code currently here is better than status quo, but I do agree it would be better to use the timeout multiplier... it doesn't look like that's exposed outside the `Tests` object in testharness, which I don't think I have access to. :/

    Antonio Sartori

    Uh, sad... but ok. Sounds good. Sorry for the extra work I generated...

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Mike West
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I1e17655904d5bcb9bb11718b132e43525259dbb2
      Gerrit-Change-Number: 8136619
      Gerrit-PatchSet: 1
      Gerrit-Owner: Mike West <mk...@chromium.org>
      Gerrit-Reviewer: Antonio Sartori <antonio...@chromium.org>
      Gerrit-Reviewer: Mike West <mk...@chromium.org>
      Gerrit-Attention: Mike West <mk...@chromium.org>
      Gerrit-Comment-Date: Mon, 27 Jul 2026 05:56:47 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages