Closed Bug 1754132 Opened 2 years ago Closed 2 years ago

Sometimes "WebDriver:Navigate" with a PageLoadStrategy of "none" returns before navigation has started

Categories

(Remote Protocol :: Marionette, defect, P3)

Default
defect
Points:
2

Tracking

(firefox102 fixed)

RESOLVED FIXED
102 Branch
Tracking Status
firefox102 --- fixed

People

(Reporter: whimboo, Assigned: Sasha)

References

Details

(Whiteboard: [bidi-m3-mvp])

Attachments

(1 file)

When the page load strategy is set to none the navigation commands have to return once a navigation has been started. But with our current implementation this can even happen before. The reason for such a behavior shows the following code:

https://searchfox.org/mozilla-central/rev/4615b544a0f7166233c409c619b426c4025467a7/remote/marionette/navigate.js#219-223

Similar to the situation when we don't expect a load event, we return immediately when a page load strategy of none is selected. But this is wrong because there will be a navigation and we could return too early - before the navigation has actually started. This can lead to race conditions for code running after this method call like the scenario as described on bug 1739540 comment 26.

As such we should wait at least for an unload event before returning from WebDriver:Navigate.

Severity: -- → S3
Points: --- → 2
Priority: -- → P3
Whiteboard: [bidi-m3-mvp]
Blocks: 1751643
Assignee: nobody → aborovova
Status: NEW → ASSIGNED

Discussed with Henrik that actually the event which we should wait for is pagehide

Attachment #9274036 - Attachment description: Bug 1754132 - Wait for "pagehide" event with a PageLoadStrategy of "none" to return. → Bug 1754132 - Use WebProgressListener to detect navigation start when PageLoadStrategy is "none".
Pushed by aborovova@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d03b4ae877e4
Use WebProgressListener to detect navigation start when PageLoadStrategy is "none". r=webdriver-reviewers,whimboo,jdescottes
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: