Restructure navigate-iframe-out2in.js test to properly await all network events and simplify it along the away. [chromium/src : main]

0 views
Skip to first unread message

Danil Somsikov (Gerrit)

unread,
Jun 27, 2022, 10:26:08 AM6/27/22
to Andrey Kosyakov, blink-...@chromium.org, devtools-re...@chromium.org

Attention is currently required from: Andrey Kosyakov.

Danil Somsikov would like Andrey Kosyakov to review this change.

View Change

Restructure navigate-iframe-out2in.js test to properly await all network events and simplify it along the away.

Bug: 1180274
Change-Id: I73e45dbbf9b9fc78a281da8848ab0b5610c5b86e
---
M third_party/blink/web_tests/http/tests/inspector-protocol/network/navigate-iframe-out2in.js
M third_party/blink/web_tests/platform/generic/http/tests/inspector-protocol/network/navigate-iframe-out2in-expected.txt
D third_party/blink/web_tests/platform/mac-mac10.13/http/tests/inspector-protocol/network/navigate-iframe-out2in-expected.txt
D third_party/blink/web_tests/platform/mac-mac10.14/http/tests/inspector-protocol/network/navigate-iframe-out2in-expected.txt
4 files changed, 58 insertions(+), 61 deletions(-)


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

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I73e45dbbf9b9fc78a281da8848ab0b5610c5b86e
Gerrit-Change-Number: 3726091
Gerrit-PatchSet: 4
Gerrit-Owner: Danil Somsikov <d...@chromium.org>
Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
Gerrit-Reviewer: Danil Somsikov <d...@chromium.org>
Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
Gerrit-MessageType: newchange

Danil Somsikov (Gerrit)

unread,
Jun 27, 2022, 10:26:14 AM6/27/22
to blink-...@chromium.org, devtools-re...@chromium.org, Andrey Kosyakov, chromium...@chromium.org

Attention is currently required from: Andrey Kosyakov.

Patch set 4:Auto-Submit +1Commit-Queue +1

View Change

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

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I73e45dbbf9b9fc78a281da8848ab0b5610c5b86e
    Gerrit-Change-Number: 3726091
    Gerrit-PatchSet: 4
    Gerrit-Owner: Danil Somsikov <d...@chromium.org>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: Danil Somsikov <d...@chromium.org>
    Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Comment-Date: Mon, 27 Jun 2022 14:26:04 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    Gerrit-MessageType: comment

    Andrey Kosyakov (Gerrit)

    unread,
    Jun 27, 2022, 7:01:42 PM6/27/22
    to Danil Somsikov, blink-...@chromium.org, devtools-re...@chromium.org, Chromium LUCI CQ, chromium...@chromium.org

    Attention is currently required from: Danil Somsikov.

    View Change

    4 comments:

    • File third_party/blink/web_tests/http/tests/inspector-protocol/network/navigate-iframe-out2in.js:

      • Patch Set #4, Line 14: return true;

        So we'll return true regardless of what check returns? I guess this isn't quite "matcher" then? If we just want a certain handler invoked on all events, why don't we just install it independently with another set of network.on<event>(handler)?

      • Patch Set #4, Line 36: if (!iframeEventsExpected)

        I think ExtraInfo may actually come to either parent or child target :-(

      • Patch Set #4, Line 45: await networkRequestEvents(dp.Network); // iframe

        So we expect all frame events to arrive after all main frame events. I'm afraid we really can't count on this, because of ...ExtraInfo events that use a completely independent path and hence race against other events. So you may get requestWillBeSent from frame once the body has been fetched and parsed and yet ResponseReceivedExtraInfo has not arrived yet.

      • Patch Set #4, Line 49: networkRequestEvents(

        As per the first comment, let's just explicitly set up handlers with do.Network.on...() here for better readability.

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

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I73e45dbbf9b9fc78a281da8848ab0b5610c5b86e
    Gerrit-Change-Number: 3726091
    Gerrit-PatchSet: 4
    Gerrit-Owner: Danil Somsikov <d...@chromium.org>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: Danil Somsikov <d...@chromium.org>
    Gerrit-Attention: Danil Somsikov <d...@chromium.org>
    Gerrit-Comment-Date: Mon, 27 Jun 2022 23:01:27 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment

    Danil Somsikov (Gerrit)

    unread,
    Jun 28, 2022, 11:32:11 AM6/28/22
    to blink-...@chromium.org, devtools-re...@chromium.org, Chromium LUCI CQ, Andrey Kosyakov, chromium...@chromium.org

    Attention is currently required from: Andrey Kosyakov.

    Patch set 6:Auto-Submit +1

    View Change

    4 comments:

    • File third_party/blink/web_tests/http/tests/inspector-protocol/network/navigate-iframe-out2in.js:

      • So we'll return true regardless of what check returns? I guess this isn't quite "matcher" then? If w […]

        Done

      • Patch Set #4, Line 36: if (!iframeEventsExpected)

        I think ExtraInfo may actually come to either parent or child target :-(

      • Is this the behavior we want to codify? If I understand the intention of the original CL at crrev.com/c/1948898 we wanted to use the test to fix the issue.

      • So we expect all frame events to arrive after all main frame events. […]

        Done

      • As per the first comment, let's just explicitly set up handlers with do.Network.on... […]

        Done

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

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I73e45dbbf9b9fc78a281da8848ab0b5610c5b86e
    Gerrit-Change-Number: 3726091
    Gerrit-PatchSet: 6
    Gerrit-Owner: Danil Somsikov <d...@chromium.org>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: Danil Somsikov <d...@chromium.org>
    Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Comment-Date: Tue, 28 Jun 2022 15:31:58 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-MessageType: comment

    Danil Somsikov (Gerrit)

    unread,
    Jun 29, 2022, 11:11:07 AM6/29/22
    to blink-...@chromium.org, devtools-re...@chromium.org, Chromium LUCI CQ, Andrey Kosyakov, chromium...@chromium.org

    Attention is currently required from: Andrey Kosyakov.

    View Change

    1 comment:

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

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I73e45dbbf9b9fc78a281da8848ab0b5610c5b86e
    Gerrit-Change-Number: 3726091
    Gerrit-PatchSet: 6
    Gerrit-Owner: Danil Somsikov <d...@chromium.org>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: Danil Somsikov <d...@chromium.org>
    Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Comment-Date: Wed, 29 Jun 2022 15:10:57 +0000

    Andrey Kosyakov (Gerrit)

    unread,
    Jun 30, 2022, 1:19:42 AM6/30/22
    to Danil Somsikov, blink-...@chromium.org, devtools-re...@chromium.org, Chromium LUCI CQ, chromium...@chromium.org

    Attention is currently required from: Danil Somsikov.

    Patch set 6:Code-Review +1

    View Change

    3 comments:

    • Patchset:

    • File third_party/blink/web_tests/http/tests/inspector-protocol/network/navigate-iframe-out2in.js:

      • Patch Set #4, Line 36: if (!iframeEventsExpected)

        Is this the behavior we want to codify? If I understand the intention of the original CL at crrev. […]

        I'm not suggesting to codify this behavior, but I'm not sure we can get away with pretending it doesn't exist in the test (we can see if the test is stable as is, perhaps). I think the right thing here is to do what we tell clients to do in this case, i.e. since we don't know on which target the event will arrive, accept it from any target (conveniently, the request id is guid in this case, so it doesn't have to be target-specific). This is what the front-end does, too, since the requests from all targets/sessions are funneled through global network request manager.

    • File third_party/blink/web_tests/http/tests/inspector-protocol/network/navigate-iframe-out2in.js:

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

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I73e45dbbf9b9fc78a281da8848ab0b5610c5b86e
    Gerrit-Change-Number: 3726091
    Gerrit-PatchSet: 6
    Gerrit-Owner: Danil Somsikov <d...@chromium.org>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: Danil Somsikov <d...@chromium.org>
    Gerrit-Attention: Danil Somsikov <d...@chromium.org>
    Gerrit-Comment-Date: Thu, 30 Jun 2022 05:19:34 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Danil Somsikov <d...@chromium.org>

    Danil Somsikov (Gerrit)

    unread,
    Jun 30, 2022, 8:30:22 AM6/30/22
    to blink-...@chromium.org, devtools-re...@chromium.org, Andrey Kosyakov, Chromium LUCI CQ, chromium...@chromium.org

    Patch set 9:Auto-Submit +1

    View Change

    1 comment:

    • File third_party/blink/web_tests/http/tests/inspector-protocol/network/navigate-iframe-out2in.js:

      • Oops:)

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

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I73e45dbbf9b9fc78a281da8848ab0b5610c5b86e
    Gerrit-Change-Number: 3726091
    Gerrit-PatchSet: 9
    Gerrit-Owner: Danil Somsikov <d...@chromium.org>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: Danil Somsikov <d...@chromium.org>
    Gerrit-Comment-Date: Thu, 30 Jun 2022 12:30:11 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes

    Danil Somsikov (Gerrit)

    unread,
    Jun 30, 2022, 10:35:02 AM6/30/22
    to blink-...@chromium.org, devtools-re...@chromium.org, Andrey Kosyakov, Chromium LUCI CQ, chromium...@chromium.org

    Patch set 9:Commit-Queue +2

    View Change

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

      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I73e45dbbf9b9fc78a281da8848ab0b5610c5b86e
      Gerrit-Change-Number: 3726091
      Gerrit-PatchSet: 9
      Gerrit-Owner: Danil Somsikov <d...@chromium.org>
      Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
      Gerrit-Reviewer: Danil Somsikov <d...@chromium.org>
      Gerrit-Comment-Date: Thu, 30 Jun 2022 14:34:42 +0000

      Chromium LUCI CQ (Gerrit)

      unread,
      Jun 30, 2022, 11:57:52 AM6/30/22
      to Danil Somsikov, blink-...@chromium.org, devtools-re...@chromium.org, Andrey Kosyakov, chromium...@chromium.org

      Chromium LUCI CQ submitted this change.

      View Change



      6 is the latest approved patch-set.
      The change was submitted with unreviewed changes in the following files:

      ```
      The name of the file: third_party/blink/web_tests/http/tests/inspector-protocol/network/navigate-iframe-out2in.js
      Insertions: 0, Deletions: 1.

      The diff is too large to show. Please review the diff.
      ```

      Approvals: Danil Somsikov: Send CL to CQ automatically after approval; Commit Andrey Kosyakov: Looks good to me
      Restructure navigate-iframe-out2in.js test to properly await all network events and simplify it along the away.

      Bug: 1180274
      Change-Id: I73e45dbbf9b9fc78a281da8848ab0b5610c5b86e
      Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3726091
      Auto-Submit: Danil Somsikov <d...@chromium.org>
      Commit-Queue: Danil Somsikov <d...@chromium.org>
      Reviewed-by: Andrey Kosyakov <ca...@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#1019662}

      ---
      M third_party/blink/web_tests/http/tests/inspector-protocol/network/navigate-iframe-out2in.js
      M third_party/blink/web_tests/platform/generic/http/tests/inspector-protocol/network/navigate-iframe-out2in-expected.txt
      D third_party/blink/web_tests/platform/mac-mac10.13/http/tests/inspector-protocol/network/navigate-iframe-out2in-expected.txt
      D third_party/blink/web_tests/platform/mac-mac10.14/http/tests/inspector-protocol/network/navigate-iframe-out2in-expected.txt
      4 files changed, 79 insertions(+), 63 deletions(-)


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

      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I73e45dbbf9b9fc78a281da8848ab0b5610c5b86e
      Gerrit-Change-Number: 3726091
      Gerrit-PatchSet: 10
      Gerrit-Owner: Danil Somsikov <d...@chromium.org>
      Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Danil Somsikov <d...@chromium.org>
      Gerrit-MessageType: merged
      Reply all
      Reply to author
      Forward
      0 new messages