Tests for DevTools protocol for DirectSocket events [chromium/src : main]

0 views
Skip to first unread message

Vlad Krot (Gerrit)

unread,
Apr 17, 2025, 7:01:37 AM4/17/25
to AyeAye, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, devtools-re...@chromium.org
Attention needed from Vlad Krot

Message from Vlad Krot

Set Ready For Review

Open in Gerrit

Related details

Attention is currently required from:
  • Vlad Krot
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Review
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: Iee23f619d115fbea02ae7071243339e5fd9db1f8
Gerrit-Change-Number: 6458767
Gerrit-PatchSet: 5
Gerrit-Owner: Vlad Krot <vk...@google.com>
Gerrit-Reviewer: Vlad Krot <vk...@google.com>
Gerrit-Attention: Vlad Krot <vk...@google.com>
Gerrit-Comment-Date: Thu, 17 Apr 2025 11:01:27 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Vlad Krot (Gerrit)

unread,
Apr 17, 2025, 8:21:30 AM4/17/25
to Dominic Farolino, Andrey Kosyakov, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, pwa-com...@google.com, blink-revie...@chromium.org, blink-...@chromium.org, devtools-re...@chromium.org
Attention needed from Andrey Kosyakov and Dominic Farolino

Vlad Krot added 1 comment

File third_party/blink/web_tests/VirtualTestSuites
Line 633, Patchset 5 (Latest): "prefix": "inspector-protocol-direct-sockets",
Vlad Krot . unresolved

Should I add this test suite to TestLists filters?
third_party/blink/web_tests/TestLists/rel-ready.blink_wpt_tests.filter
third_party/blink/web_tests/TestLists/content_shell.filter

Open in Gerrit

Related details

Attention is currently required from:
  • Andrey Kosyakov
  • Dominic Farolino
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    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: Iee23f619d115fbea02ae7071243339e5fd9db1f8
    Gerrit-Change-Number: 6458767
    Gerrit-PatchSet: 5
    Gerrit-Owner: Vlad Krot <vk...@google.com>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: Dominic Farolino <d...@chromium.org>
    Gerrit-Reviewer: Vlad Krot <vk...@google.com>
    Gerrit-Attention: Dominic Farolino <d...@chromium.org>
    Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Comment-Date: Thu, 17 Apr 2025 12:21:17 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Vlad Krot (Gerrit)

    unread,
    Apr 17, 2025, 8:22:23 AM4/17/25
    to Dominic Farolino, Andrey Kosyakov, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, pwa-com...@google.com, blink-revie...@chromium.org, blink-...@chromium.org, devtools-re...@chromium.org
    Gerrit-Comment-Date: Thu, 17 Apr 2025 12:22:06 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Vlad Krot (Gerrit)

    unread,
    Apr 17, 2025, 8:22:31 AM4/17/25
    to Dominic Farolino, Andrey Kosyakov, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, pwa-com...@google.com, blink-revie...@chromium.org, blink-...@chromium.org, devtools-re...@chromium.org
    Attention needed from Andrey Kosyakov and Dominic Farolino

    Vlad Krot added 1 comment

    File third_party/blink/web_tests/VirtualTestSuites
    Line 633, Patchset 5 (Latest): "prefix": "inspector-protocol-direct-sockets",
    Vlad Krot . resolved

    Should I add this test suite to TestLists filters?
    third_party/blink/web_tests/TestLists/rel-ready.blink_wpt_tests.filter
    third_party/blink/web_tests/TestLists/content_shell.filter

    Vlad Krot

    Acknowledged

    Gerrit-Comment-Date: Thu, 17 Apr 2025 12:22:19 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Vlad Krot <vk...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Andrey Kosyakov (Gerrit)

    unread,
    Apr 17, 2025, 1:07:17 PM4/17/25
    to Vlad Krot, Dominic Farolino, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, pwa-com...@google.com, blink-revie...@chromium.org, blink-...@chromium.org, devtools-re...@chromium.org
    Attention needed from Dominic Farolino and Vlad Krot

    Andrey Kosyakov added 12 comments

    File third_party/blink/web_tests/VirtualTestSuites
    Line 633, Patchset 5 (Latest): "prefix": "inspector-protocol-direct-sockets",
    Vlad Krot . resolved

    Should I add this test suite to TestLists filters?
    third_party/blink/web_tests/TestLists/rel-ready.blink_wpt_tests.filter
    third_party/blink/web_tests/TestLists/content_shell.filter

    Andrey Kosyakov

    No, these two are just for WPTs, which these tests are not.

    Line 638, Patchset 5 (Latest): "args": ["--isolated-context-origins=https://devtools.oopif.test"],
    Andrey Kosyakov . unresolved

    Can we just reuse the origin and the suite above? I.e. just add one more `bases` entry there and use https://web-platform.test?

    File third_party/blink/web_tests/http/tests/inspector-protocol/network/direct-sockets/resources/tcp-socket-abort.php
    Line 5, Patchset 5 (Latest):header("Origin-Agent-Cluster: ?0");
    Andrey Kosyakov . unresolved

    These aren't really required, are they? I mean, I tried removing them and the tests still pass, I think the command line switch is the only requirement.

    Line 16, Patchset 5 (Latest): async function openTCP() {
    Andrey Kosyakov . unresolved

    nit: instead of putting code into the server-side resources, we could have a single empty HTML with proper headers and evaluate the rest on the test side -- this way you would save on boilerplate and have all code required by test in a single place. And given the comment above, we could probably just navigate to `https://web-platform.test/inspector-protocol/resources/inspector-protocol-page.html` (i.e. a blank page from the right origin).

    File third_party/blink/web_tests/http/tests/inspector-protocol/network/direct-sockets/tcp-socket-abort.js
    Line 2, Patchset 5 (Latest): var {page, session, dp} = await testRunner.startURL(
    Andrey Kosyakov . unresolved

    nit: s/var/const/

    Line 6, Patchset 5 (Latest): testRunner.log('Test started');
    Andrey Kosyakov . unresolved

    Let's ditch extra progress messages (this one and the one below).

    Line 10, Patchset 5 (Latest): session.evaluateAsync('openTCP()');
    Andrey Kosyakov . unresolved
    ... so as per comment in the PHP file, this would be just
    ```
    session.evaluate(`
    new TCPSocket("127.0.0.1", 468, {
    noDelay: true, receiveBufferSize: 10011,
    sendBufferSize: 10022, keepAliveDelay: 10033, dnsQueryType: "ipv6"
    });
    `);
    ```
    (note no need for awaiting `clientSocket.opened` since you're not awaiting `evaluateAsync()` call either. And this is also why it can be just a `session.evaluate()`).
    Line 14, Patchset 5 (Latest): })();
    Andrey Kosyakov . unresolved

    just `const createdEventPromise = dp.Network.onceDirectTCPSocketCreated();`, please :-)

    File third_party/blink/web_tests/http/tests/inspector-protocol/network/direct-sockets/tcp-socket-chunk-error.js
    Line 2, Patchset 5 (Latest): var {page, session, dp} = await testRunner.startURL(
    Andrey Kosyakov . unresolved

    s/var/const/, please!

    Line 12, Patchset 5 (Latest): let createdEventPromise = (async () => {
    Andrey Kosyakov . unresolved

    ditto, just
    `const createdEventPromise = dp.Network.onceDirectTCPSocketCreated()` etc.

    File third_party/blink/web_tests/http/tests/inspector-protocol/network/direct-sockets/tcp-socket-success.js
    Line 2, Patchset 5 (Latest): var {page, session, dp} = await testRunner.startURL(
    Andrey Kosyakov . unresolved

    ditto

    Line 19, Patchset 5 (Latest): let createdEventPromise = (async () => {
    Andrey Kosyakov . unresolved

    ditto.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Dominic Farolino
    • Vlad Krot
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    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: Iee23f619d115fbea02ae7071243339e5fd9db1f8
    Gerrit-Change-Number: 6458767
    Gerrit-PatchSet: 5
    Gerrit-Owner: Vlad Krot <vk...@google.com>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: Dominic Farolino <d...@chromium.org>
    Gerrit-Reviewer: Vlad Krot <vk...@google.com>
    Gerrit-Attention: Vlad Krot <vk...@google.com>
    Gerrit-Attention: Dominic Farolino <d...@chromium.org>
    Gerrit-Comment-Date: Thu, 17 Apr 2025 17:07:04 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Vlad Krot (Gerrit)

    unread,
    Apr 18, 2025, 6:11:03 AM4/18/25
    to Dominic Farolino, Andrey Kosyakov, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, pwa-com...@google.com, blink-revie...@chromium.org, blink-...@chromium.org, devtools-re...@chromium.org
    Attention needed from Andrey Kosyakov and Dominic Farolino

    Vlad Krot added 11 comments

    File third_party/blink/web_tests/VirtualTestSuites
    Line 638, Patchset 5: "args": ["--isolated-context-origins=https://devtools.oopif.test"],
    Andrey Kosyakov . unresolved

    Can we just reuse the origin and the suite above? I.e. just add one more `bases` entry there and use https://web-platform.test?

    Vlad Krot

    It doesn't work with custom php page which is necessary at least for headers and for initiator (not strictly neccessary)

    File third_party/blink/web_tests/http/tests/inspector-protocol/network/direct-sockets/resources/tcp-socket-abort.php
    Line 5, Patchset 5:header("Origin-Agent-Cluster: ?0");
    Andrey Kosyakov . unresolved

    These aren't really required, are they? I mean, I tried removing them and the tests still pass, I think the command line switch is the only requirement.

    Vlad Krot

    Are you sure? I tried without those headers and it crashes. Maybe you have DCHECKS disabled?
    More over it might create troubles in the future, because IWA always expects these headers to be set.
    https://docs.google.com/document/d/1HfPh1UNdjhbPshkrQlIWPzOJ4DJsuJKzIS92-qoxKnI/edit?resourcekey=0-yad_ljSUblW7wQt0pZAphQ&tab=t.0
    `STDERR: [40822:1:0418/090635.373533:FATAL:third_party/blink/renderer/core/execution_context/agent.cc:108] DCHECK failed: is_isolated_context == value (0 vs. 1)`

    Line 16, Patchset 5: async function openTCP() {
    Andrey Kosyakov . unresolved

    nit: instead of putting code into the server-side resources, we could have a single empty HTML with proper headers and evaluate the rest on the test side -- this way you would save on boilerplate and have all code required by test in a single place. And given the comment above, we could probably just navigate to `https://web-platform.test/inspector-protocol/resources/inspector-protocol-page.html` (i.e. a blank page from the right origin).

    Vlad Krot

    Good idea, thanks!
    But for the success case we must use js in php, because it checks initiator. And if the code is loaded via evalJs then functionName and url for initiator are null.

    File third_party/blink/web_tests/http/tests/inspector-protocol/network/direct-sockets/tcp-socket-abort.js
    Line 2, Patchset 5: var {page, session, dp} = await testRunner.startURL(
    Andrey Kosyakov . resolved

    nit: s/var/const/

    Vlad Krot

    Done

    Line 6, Patchset 5: testRunner.log('Test started');
    Andrey Kosyakov . resolved

    Let's ditch extra progress messages (this one and the one below).

    Vlad Krot

    Done

    Line 10, Patchset 5: session.evaluateAsync('openTCP()');
    Andrey Kosyakov . resolved
    ... so as per comment in the PHP file, this would be just
    ```
    session.evaluate(`
    new TCPSocket("127.0.0.1", 468, {
    noDelay: true, receiveBufferSize: 10011,
    sendBufferSize: 10022, keepAliveDelay: 10033, dnsQueryType: "ipv6"
    });
    `);
    ```
    (note no need for awaiting `clientSocket.opened` since you're not awaiting `evaluateAsync()` call either. And this is also why it can be just a `session.evaluate()`).
    Vlad Krot

    Done

    Line 14, Patchset 5: })();
    Andrey Kosyakov . resolved

    just `const createdEventPromise = dp.Network.onceDirectTCPSocketCreated();`, please :-)

    Vlad Krot

    I thought that it prevents race condition if an event fired after there's a subscription to it.
    But I tested, it works the way you suggested.
    Btw, why there's no race condition?

    File third_party/blink/web_tests/http/tests/inspector-protocol/network/direct-sockets/tcp-socket-chunk-error.js
    Line 2, Patchset 5: var {page, session, dp} = await testRunner.startURL(
    Andrey Kosyakov . resolved

    s/var/const/, please!

    Vlad Krot

    Done

    Line 12, Patchset 5: let createdEventPromise = (async () => {
    Andrey Kosyakov . resolved

    ditto, just
    `const createdEventPromise = dp.Network.onceDirectTCPSocketCreated()` etc.

    Vlad Krot

    Done

    File third_party/blink/web_tests/http/tests/inspector-protocol/network/direct-sockets/tcp-socket-success.js
    Line 2, Patchset 5: var {page, session, dp} = await testRunner.startURL(
    Andrey Kosyakov . resolved

    ditto

    Vlad Krot

    Done

    Line 19, Patchset 5: let createdEventPromise = (async () => {
    Andrey Kosyakov . resolved

    ditto.

    Vlad Krot

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andrey Kosyakov
    • Dominic Farolino
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    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: Iee23f619d115fbea02ae7071243339e5fd9db1f8
    Gerrit-Change-Number: 6458767
    Gerrit-PatchSet: 5
    Gerrit-Owner: Vlad Krot <vk...@google.com>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: Dominic Farolino <d...@chromium.org>
    Gerrit-Reviewer: Vlad Krot <vk...@google.com>
    Gerrit-Attention: Dominic Farolino <d...@chromium.org>
    Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Comment-Date: Fri, 18 Apr 2025 10:10:51 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Andrey Kosyakov <ca...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Andrey Kosyakov (Gerrit)

    unread,
    Apr 18, 2025, 12:27:50 PM4/18/25
    to Vlad Krot, Dominic Farolino, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, pwa-com...@google.com, blink-revie...@chromium.org, blink-...@chromium.org, devtools-re...@chromium.org
    Attention needed from Dominic Farolino and Vlad Krot

    Andrey Kosyakov voted and added 4 comments

    Votes added by Andrey Kosyakov

    Code-Review+1

    4 comments

    Patchset-level comments
    File-level comment, Patchset 6 (Latest):
    Andrey Kosyakov . resolved

    Thanks, lgtm!

    File third_party/blink/web_tests/VirtualTestSuites
    Line 638, Patchset 5: "args": ["--isolated-context-origins=https://devtools.oopif.test"],
    Andrey Kosyakov . resolved

    Can we just reuse the origin and the suite above? I.e. just add one more `bases` entry there and use https://web-platform.test?

    Vlad Krot

    It doesn't work with custom php page which is necessary at least for headers and for initiator (not strictly neccessary)

    Andrey Kosyakov

    Acknowledged

    File third_party/blink/web_tests/http/tests/inspector-protocol/network/direct-sockets/resources/tcp-socket-abort.php
    Line 5, Patchset 5:header("Origin-Agent-Cluster: ?0");
    Andrey Kosyakov . unresolved

    These aren't really required, are they? I mean, I tried removing them and the tests still pass, I think the command line switch is the only requirement.

    Vlad Krot

    Are you sure? I tried without those headers and it crashes. Maybe you have DCHECKS disabled?
    More over it might create troubles in the future, because IWA always expects these headers to be set.
    https://docs.google.com/document/d/1HfPh1UNdjhbPshkrQlIWPzOJ4DJsuJKzIS92-qoxKnI/edit?resourcekey=0-yad_ljSUblW7wQt0pZAphQ&tab=t.0
    `STDERR: [40822:1:0418/090635.373533:FATAL:third_party/blink/renderer/core/execution_context/agent.cc:108] DCHECK failed: is_isolated_context == value (0 vs. 1)`

    Andrey Kosyakov

    Ah, indeed! Well, that's a bit [unfortunate](https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++.md#check_dcheck_and-notreached) to have a check like this as a DCHECK() -- this is not exactly an invariant.

    Line 16, Patchset 5: async function openTCP() {
    Andrey Kosyakov . unresolved

    nit: instead of putting code into the server-side resources, we could have a single empty HTML with proper headers and evaluate the rest on the test side -- this way you would save on boilerplate and have all code required by test in a single place. And given the comment above, we could probably just navigate to `https://web-platform.test/inspector-protocol/resources/inspector-protocol-page.html` (i.e. a blank page from the right origin).

    Vlad Krot

    Good idea, thanks!
    But for the success case we must use js in php, because it checks initiator. And if the code is loaded via evalJs then functionName and url for initiator are null.

    Andrey Kosyakov
    ```
    session.evaluate(`
    function openTCP() {
    ...
    }
    openTCP();
    //# sourceURL=tcp-socket-success.php
    `);
    ```

    would take care of this, but feel free to keep as is. Here's an [example](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/inspector-protocol/worker/worker-constructor-async-stacks.js;l=20).

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Dominic Farolino
    • Vlad Krot
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    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: Iee23f619d115fbea02ae7071243339e5fd9db1f8
    Gerrit-Change-Number: 6458767
    Gerrit-PatchSet: 6
    Gerrit-Owner: Vlad Krot <vk...@google.com>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: Dominic Farolino <d...@chromium.org>
    Gerrit-Reviewer: Vlad Krot <vk...@google.com>
    Gerrit-Attention: Vlad Krot <vk...@google.com>
    Gerrit-Attention: Dominic Farolino <d...@chromium.org>
    Gerrit-Comment-Date: Fri, 18 Apr 2025 16:27:39 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Vlad Krot <vk...@google.com>
    Comment-In-Reply-To: Andrey Kosyakov <ca...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Dominic Farolino (Gerrit)

    unread,
    Apr 19, 2025, 2:22:43 PM4/19/25
    to Vlad Krot, Andrey Kosyakov, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, pwa-com...@google.com, blink-revie...@chromium.org, blink-...@chromium.org, devtools-re...@chromium.org
    Attention needed from Vlad Krot

    Dominic Farolino added 1 comment

    File third_party/blink/web_tests/VirtualTestSuites
    Line 639, Patchset 6 (Latest): "expires": "never"
    Dominic Farolino . unresolved
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Vlad Krot
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    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: Iee23f619d115fbea02ae7071243339e5fd9db1f8
    Gerrit-Change-Number: 6458767
    Gerrit-PatchSet: 6
    Gerrit-Owner: Vlad Krot <vk...@google.com>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: Dominic Farolino <d...@chromium.org>
    Gerrit-Reviewer: Vlad Krot <vk...@google.com>
    Gerrit-Attention: Vlad Krot <vk...@google.com>
    Gerrit-Comment-Date: Sat, 19 Apr 2025 18:22:27 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Vlad Krot (Gerrit)

    unread,
    Apr 22, 2025, 7:06:20 AM4/22/25
    to Andrey Kosyakov, Dominic Farolino, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, pwa-com...@google.com, blink-revie...@chromium.org, blink-...@chromium.org, devtools-re...@chromium.org
    Attention needed from Dominic Farolino

    Vlad Krot added 3 comments

    File third_party/blink/web_tests/VirtualTestSuites
    Line 639, Patchset 6: "expires": "never"
    Dominic Farolino . unresolved

    Please see https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/VIRTUAL_OWNERS;l=31-32?q=VIRTUAL_OWNERS and add an explanation for this in the CL description.

    Vlad Krot

    I have added to explanation to the CL
    "The tests are never meant to expire, because they test stable DirectSocket API and Chrome Dev Tools Protocol integration. There are no plans to remove the features thus the tests must stay."

    File third_party/blink/web_tests/http/tests/inspector-protocol/network/direct-sockets/resources/tcp-socket-abort.php
    Line 5, Patchset 5:header("Origin-Agent-Cluster: ?0");
    Andrey Kosyakov . resolved

    These aren't really required, are they? I mean, I tried removing them and the tests still pass, I think the command line switch is the only requirement.

    Vlad Krot

    Are you sure? I tried without those headers and it crashes. Maybe you have DCHECKS disabled?
    More over it might create troubles in the future, because IWA always expects these headers to be set.
    https://docs.google.com/document/d/1HfPh1UNdjhbPshkrQlIWPzOJ4DJsuJKzIS92-qoxKnI/edit?resourcekey=0-yad_ljSUblW7wQt0pZAphQ&tab=t.0
    `STDERR: [40822:1:0418/090635.373533:FATAL:third_party/blink/renderer/core/execution_context/agent.cc:108] DCHECK failed: is_isolated_context == value (0 vs. 1)`

    Andrey Kosyakov

    Ah, indeed! Well, that's a bit [unfortunate](https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++.md#check_dcheck_and-notreached) to have a check like this as a DCHECK() -- this is not exactly an invariant.

    Vlad Krot

    agree. better to make as CHECK().

    Line 16, Patchset 5: async function openTCP() {
    Andrey Kosyakov . resolved

    nit: instead of putting code into the server-side resources, we could have a single empty HTML with proper headers and evaluate the rest on the test side -- this way you would save on boilerplate and have all code required by test in a single place. And given the comment above, we could probably just navigate to `https://web-platform.test/inspector-protocol/resources/inspector-protocol-page.html` (i.e. a blank page from the right origin).

    Vlad Krot

    Good idea, thanks!
    But for the success case we must use js in php, because it checks initiator. And if the code is loaded via evalJs then functionName and url for initiator are null.

    Andrey Kosyakov
    ```
    session.evaluate(`
    function openTCP() {
    ...
    }
    openTCP();
    //# sourceURL=tcp-socket-success.php
    `);
    ```

    would take care of this, but feel free to keep as is. Here's an [example](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/inspector-protocol/worker/worker-constructor-async-stacks.js;l=20).

    Vlad Krot

    Tried to do it like this, doesn't work, initiator fields are still null.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Dominic Farolino
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    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: Iee23f619d115fbea02ae7071243339e5fd9db1f8
    Gerrit-Change-Number: 6458767
    Gerrit-PatchSet: 7
    Gerrit-Owner: Vlad Krot <vk...@google.com>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: Dominic Farolino <d...@chromium.org>
    Gerrit-Reviewer: Vlad Krot <vk...@google.com>
    Gerrit-Attention: Dominic Farolino <d...@chromium.org>
    Gerrit-Comment-Date: Tue, 22 Apr 2025 11:06:10 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Vlad Krot <vk...@google.com>
    Comment-In-Reply-To: Dominic Farolino <d...@chromium.org>
    Comment-In-Reply-To: Andrey Kosyakov <ca...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Dominic Farolino (Gerrit)

    unread,
    Apr 22, 2025, 4:20:32 PM4/22/25
    to Vlad Krot, Andrey Kosyakov, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, pwa-com...@google.com, blink-revie...@chromium.org, blink-...@chromium.org, devtools-re...@chromium.org
    Attention needed from Vlad Krot

    Dominic Farolino added 1 comment

    File third_party/blink/web_tests/VirtualTestSuites
    Line 639, Patchset 6: "expires": "never"
    Dominic Farolino . unresolved

    Please see https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/VIRTUAL_OWNERS;l=31-32?q=VIRTUAL_OWNERS and add an explanation for this in the CL description.

    Vlad Krot

    I have added to explanation to the CL
    "The tests are never meant to expire, because they test stable DirectSocket API and Chrome Dev Tools Protocol integration. There are no plans to remove the features thus the tests must stay."

    Dominic Farolino

    I guess I'm confused why we need VTS for them then? We have many stable features that are just always around... and we just write tests for them that run on the CI. Why do these tests need a special virtual configuration? Maybe I misunderstand the feature.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Vlad Krot
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    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: Iee23f619d115fbea02ae7071243339e5fd9db1f8
    Gerrit-Change-Number: 6458767
    Gerrit-PatchSet: 8
    Gerrit-Owner: Vlad Krot <vk...@google.com>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: Dominic Farolino <d...@chromium.org>
    Gerrit-Reviewer: Vlad Krot <vk...@google.com>
    Gerrit-Attention: Vlad Krot <vk...@google.com>
    Gerrit-Comment-Date: Tue, 22 Apr 2025 20:20:21 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Vlad Krot (Gerrit)

    unread,
    Apr 23, 2025, 5:02:24 AM4/23/25
    to Andrey Kosyakov, Dominic Farolino, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, pwa-com...@google.com, blink-revie...@chromium.org, blink-...@chromium.org, devtools-re...@chromium.org
    Attention needed from Dominic Farolino

    Vlad Krot added 1 comment

    File third_party/blink/web_tests/VirtualTestSuites
    Line 639, Patchset 6: "expires": "never"
    Dominic Farolino . unresolved

    Please see https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/VIRTUAL_OWNERS;l=31-32?q=VIRTUAL_OWNERS and add an explanation for this in the CL description.

    Vlad Krot

    I have added to explanation to the CL
    "The tests are never meant to expire, because they test stable DirectSocket API and Chrome Dev Tools Protocol integration. There are no plans to remove the features thus the tests must stay."

    Dominic Farolino

    I guess I'm confused why we need VTS for them then? We have many stable features that are just always around... and we just write tests for them that run on the CI. Why do these tests need a special virtual configuration? Maybe I misunderstand the feature.

    Vlad Krot

    Because it is impossible to run the test without Chrome content shell command line flag - "--isolated-context-origins=https://devtools.oopif.test" since DirectSocket API is available only in Isolated Context.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Dominic Farolino
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    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: Iee23f619d115fbea02ae7071243339e5fd9db1f8
    Gerrit-Change-Number: 6458767
    Gerrit-PatchSet: 8
    Gerrit-Owner: Vlad Krot <vk...@google.com>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: Dominic Farolino <d...@chromium.org>
    Gerrit-Reviewer: Vlad Krot <vk...@google.com>
    Gerrit-Attention: Dominic Farolino <d...@chromium.org>
    Gerrit-Comment-Date: Wed, 23 Apr 2025 09:02:12 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Dominic Farolino (Gerrit)

    unread,
    Apr 23, 2025, 9:11:54 AM4/23/25
    to Vlad Krot, Andrey Kosyakov, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, pwa-com...@google.com, blink-revie...@chromium.org, blink-...@chromium.org, devtools-re...@chromium.org
    Attention needed from Vlad Krot

    Dominic Farolino voted and added 2 comments

    Votes added by Dominic Farolino

    Code-Review+1

    2 comments

    Patchset-level comments
    File-level comment, Patchset 8 (Latest):
    Dominic Farolino . resolved

    nks

    File third_party/blink/web_tests/VirtualTestSuites
    Line 639, Patchset 6: "expires": "never"
    Dominic Farolino . resolved

    Please see https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/VIRTUAL_OWNERS;l=31-32?q=VIRTUAL_OWNERS and add an explanation for this in the CL description.

    Vlad Krot

    I have added to explanation to the CL
    "The tests are never meant to expire, because they test stable DirectSocket API and Chrome Dev Tools Protocol integration. There are no plans to remove the features thus the tests must stay."

    Dominic Farolino

    I guess I'm confused why we need VTS for them then? We have many stable features that are just always around... and we just write tests for them that run on the CI. Why do these tests need a special virtual configuration? Maybe I misunderstand the feature.

    Vlad Krot

    Because it is impossible to run the test without Chrome content shell command line flag - "--isolated-context-origins=https://devtools.oopif.test" since DirectSocket API is available only in Isolated Context.

    Dominic Farolino

    Thanks!

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Vlad Krot
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Review
    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: Iee23f619d115fbea02ae7071243339e5fd9db1f8
    Gerrit-Change-Number: 6458767
    Gerrit-PatchSet: 8
    Gerrit-Owner: Vlad Krot <vk...@google.com>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: Dominic Farolino <d...@chromium.org>
    Gerrit-Reviewer: Vlad Krot <vk...@google.com>
    Gerrit-Attention: Vlad Krot <vk...@google.com>
    Gerrit-Comment-Date: Wed, 23 Apr 2025 13:11:42 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Vlad Krot (Gerrit)

    unread,
    Apr 23, 2025, 10:40:56 AM4/23/25
    to Dominic Farolino, Andrey Kosyakov, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, pwa-com...@google.com, blink-revie...@chromium.org, blink-...@chromium.org, devtools-re...@chromium.org

    Vlad Krot voted Commit-Queue+2

    Commit-Queue+2
    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Review
    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: Iee23f619d115fbea02ae7071243339e5fd9db1f8
    Gerrit-Change-Number: 6458767
    Gerrit-PatchSet: 8
    Gerrit-Owner: Vlad Krot <vk...@google.com>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: Dominic Farolino <d...@chromium.org>
    Gerrit-Reviewer: Vlad Krot <vk...@google.com>
    Gerrit-Comment-Date: Wed, 23 Apr 2025 14:40:44 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Chromium LUCI CQ (Gerrit)

    unread,
    Apr 23, 2025, 11:20:53 AM4/23/25
    to Vlad Krot, Dominic Farolino, Andrey Kosyakov, AyeAye, chromium...@chromium.org, pwa-com...@google.com, blink-revie...@chromium.org, blink-...@chromium.org, devtools-re...@chromium.org

    Chromium LUCI CQ submitted the change

    Change information

    Commit message:
    Tests for DevTools protocol for DirectSocket events

    These tests are for changes introduced in
    https://chromium-review.googlesource.com/c/chromium/src/+/6434437
    https://chromium-review.googlesource.com/c/chromium/src/+/6308994


    The tests are never meant to expire, because they test stable
    DirectSocket API and Chrome Dev Tools Protocol integration. There are no
    plans to remove the features thus the tests must stay.
    Bug: 358327120
    Change-Id: Iee23f619d115fbea02ae7071243339e5fd9db1f8
    Reviewed-by: Andrey Kosyakov <ca...@chromium.org>
    Commit-Queue: Vlad Krot <vk...@google.com>
    Reviewed-by: Dominic Farolino <d...@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1450559}
    Files:
    • M third_party/blink/web_tests/VirtualTestSuites
    • A third_party/blink/web_tests/http/tests/inspector-protocol/network/direct-sockets/resources/tcp-socket-default.php
    • A third_party/blink/web_tests/http/tests/inspector-protocol/network/direct-sockets/resources/tcp-socket-success.php
    • A third_party/blink/web_tests/http/tests/inspector-protocol/network/direct-sockets/tcp-socket-abort-expected.txt
    • A third_party/blink/web_tests/http/tests/inspector-protocol/network/direct-sockets/tcp-socket-abort.js
    • A third_party/blink/web_tests/http/tests/inspector-protocol/network/direct-sockets/tcp-socket-chunk-error-expected.txt
    • A third_party/blink/web_tests/http/tests/inspector-protocol/network/direct-sockets/tcp-socket-chunk-error.js
    • A third_party/blink/web_tests/http/tests/inspector-protocol/network/direct-sockets/tcp-socket-success-expected.txt
    • A third_party/blink/web_tests/http/tests/inspector-protocol/network/direct-sockets/tcp-socket-success.js
    • A third_party/blink/web_tests/virtual/inspector-protocol-direct-sockets/http/tests/inspector-protocol/network/direct-sockets/README.txt
    Change size: L
    Delta: 10 files changed, 274 insertions(+), 0 deletions(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by Dominic Farolino, +1 by Andrey Kosyakov
    Open in Gerrit
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: merged
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Iee23f619d115fbea02ae7071243339e5fd9db1f8
    Gerrit-Change-Number: 6458767
    Gerrit-PatchSet: 9
    Gerrit-Owner: Vlad Krot <vk...@google.com>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: Dominic Farolino <d...@chromium.org>
    Gerrit-Reviewer: Vlad Krot <vk...@google.com>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages