Closed Bug 1933331 Opened 2 months ago Closed 2 months ago

Update initiatorType and destination to null/"" for top level document loads

Categories

(Remote Protocol :: WebDriver BiDi, defect, P2)

defect
Points:
2

Tracking

(firefox134 fixed, firefox135 fixed)

RESOLVED FIXED
135 Branch
Tracking Status
firefox134 --- fixed
firefox135 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

References

(Blocks 3 open bugs)

Details

(Whiteboard: [webdriver:m14][wptsync upstream][webdriver:relnote])

Attachments

(6 files)

See more details in https://bugzilla.mozilla.org/show_bug.cgi?id=1933250

While discussing the underlying issue with initiatorType/destination for top level document loads, it probably makes sense to detect top level loads on the BiDi side and return the expected values for them.

The HTML spec says that if the navigable container is null the request should be emitted without any destination/initiatorType, so let's set default values in this case.

The platform API currently returns values for initiatorType and destination
for top level document loads, but according to the HTML spec they should be null / empty.

The implementation in WebDriver BiDi NetworkRequest wrapper is updated to handle this
edge case.

Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Assignee: jdescottes → nobody
Blocks: 1790366
Status: ASSIGNED → NEW
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED

Depends on D230174

Update current expectations for top level document loads in our wdspec tests

Depends on D230175

Add new test request in initiatorType / destination tests to check iframe document loads.

Blocks: 1790369, 1790371
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2a0a1e8d0eee [bidi] Update initiatorType and destination for top level document loads r=webdriver-reviewers,Sasha https://hg.mozilla.org/integration/autoland/rev/4c947cf102e0 [wdspec] Update initiatorType and destination tests for top level loads r=webdriver-reviewers,Sasha https://hg.mozilla.org/integration/autoland/rev/04f9bd3ee9b6 [wdspec] Add tests for initiatorType and destination for iframe loads r=webdriver-reviewers,Sasha
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/49397 for changes under testing/web-platform/tests
Severity: -- → S3
Points: --- → 2
Priority: -- → P2
Whiteboard: [webdriver:m14]
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 135 Branch
Upstream PR merged by moz-wptsync-bot
Whiteboard: [webdriver:m14] → [webdriver:m14], [wptsync upstream]

Comment on attachment 9439824 [details]
Bug 1933331 - [bidi] Update initiatorType and destination for top level document loads

Beta/Release Uplift Approval Request

  • User impact if declined/Reason for urgency: The information provided by two fields of the BiDi network events is incorrect for top level document loads.
    This is one of the blockers for Cypress to migrate from CDP to WebDriver BiDi, so the earliest we can provide them with a working feature, the better.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Simple change, WebDriver BiDi only, unit tested.
  • String changes made/needed:
  • Is Android affected?: No
Attachment #9439824 - Flags: approval-mozilla-beta?
Attachment #9439824 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Backed out from beta for causing WD test_destination_initiator related failures.

Push with failures

Failure log

Backout link

Flags: needinfo?(jdescottes)

Ah sorry, I thought the test patches would be also considered for uplift here, at least D230175 is necessary here.

Flags: needinfo?(jdescottes)

You need to request uplift on all the patches you want uplifted.

(In reply to Pascal Chevrel:pascalc from comment #12)

You need to request uplift on all the patches you want uplifted.

Thanks for clarifying!

I used to do that systematically, but I think at some point I was told that it was not necessary to do it?

Checking other recent uplifts I requested:

All patches were uplifted even if the request was only on the first one.
I'll make sure to flag all patches from now on, but might be worth discussing with other release owners to make sure the policy/process is the same from one release to another?

It also seems I can't request uplift for the other patches (maybe because 1 was already accepted?).
I can only select + in the approval-mozilla-beta dropdown, and it doesn't seem to do anything.

Flags: needinfo?(pascalc)

The platform API currently returns values for initiatorType and destination
for top level document loads, but according to the HTML spec they should be null / empty.

The implementation in WebDriver BiDi NetworkRequest wrapper is updated to handle this
edge case.

Original Revision: https://phabricator.services.mozilla.com/D230174

Attachment #9442091 - Flags: approval-mozilla-beta?

Update current expectations for top level document loads in our wdspec tests

Original Revision: https://phabricator.services.mozilla.com/D230175

Attachment #9442092 - Flags: approval-mozilla-beta?

Add new test request in initiatorType / destination tests to check iframe document loads.

Original Revision: https://phabricator.services.mozilla.com/D230178

Attachment #9442093 - Flags: approval-mozilla-beta?

(In reply to Julian Descottes [:jdescottes] from comment #14)

It also seems I can't request uplift for the other patches (maybe because 1 was already accepted?).
I can only select + in the approval-mozilla-beta dropdown, and it doesn't seem to do anything.

Ok so looks like this is because I'm still using bugzilla for uplift requests while I should not. I was mostly away when this was introduced last year, so I completely missed this change and kept using bugzilla. Might be good to have a warning on bugzilla UI ?

beta Uplift Approval Request

  • User impact if declined: The information provided by two fields of the BiDi network events is incorrect for top level document loads. This is one of the blockers for Cypress to migrate from CDP to WebDriver BiDi, so the earliest we can provide them with a working feature, the better.
  • Code covered by automated testing: yes
  • Fix verified in Nightly: yes
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: --
  • Risk associated with taking this patch: Low
  • Explanation of risk level: Simple change, WebDriver BiDi only, unit tested.
  • String changes made/needed: None
  • Is Android affected?: no
Attachment #9442093 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9442092 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9442091 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: needinfo?(pascalc)
Whiteboard: [webdriver:m14], [wptsync upstream] → [webdriver:m14][wptsync upstream][webdriver:relnote]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: