Closed Bug 1675320 Opened 4 years ago Closed 4 years ago

"WebDriver:NewWindow" causes race conditions because it doesn't wait until the initial "about:blank" has been finished loading

Categories

(Remote Protocol :: Marionette, defect, P1)

Default
defect

Tracking

(Fission Milestone:M7, firefox84 fixed)

RESOLVED FIXED
84 Branch
Fission Milestone M7
Tracking Status
firefox84 --- fixed

People

(Reporter: whimboo, Assigned: jdescottes)

References

Details

(Whiteboard: [marionette-fission-mvp])

Attachments

(2 files, 2 obsolete files)

As discovered on bug 1673851 comment 11 the WebDriver:NewWindow command currently doesn't await the load of about:blank, and as such creates race conditions with the next command(s) due to an unexpected page load happening.

Because the WebDriver spec doesn't mention it yet, I filed https://github.com/w3c/webdriver/issues/1560.

Nevertheless we have to get it implemented in Marionette, and I don't think we have to wait for the spec to be updated.

Blocks: 1673851
Blocks: 1669169
Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Priority: P2 → P1

Moving to Julian because he already has patch in the works.

Assignee: hskupin → jdescottes

Tracking marionette-fission-mvp bugs for Fission Beta milestone (M7).

Fission Milestone: --- → M7

Expose the boilerplate code to register the MarionetteEventsActor to later reuse it from driver.js

Attachment #9186116 - Attachment is obsolete: true
Attachment #9186117 - Attachment description: Bug 1675320 - [marionette] Wait for a load event in the newWindow command → Bug 1675320 - [marionette] Wait for a pageshow event in the newWindow command
Blocks: 1675248

Note that my patch on bug 1675248 caused perma failures for the wdspec new window tests. Maybe it's a good way to verify that this change works as expected.

Attachment #9186117 - Attachment description: Bug 1675320 - [marionette] Wait for a pageshow event in the newWindow command → Bug 1675320 - [marionette] Add register/unregisterEventsActor helpers to MarionetteEventsParent
Attachment #9186115 - Attachment description: Bug 1675320 - [marionette] Extract a registerEventsActor helper from waitForNavigationCompleted → Bug 1675320 - [marionette] Add register/unregisterEventsActor helpers to MarionetteEventsParent
No longer blocks: 1669169
Attachment #9186117 - Attachment description: Bug 1675320 - [marionette] Add register/unregisterEventsActor helpers to MarionetteEventsParent → Bug 1675320 - [marionette] Wait for the pageshow event in newWindow command
Blocks: 1676283
Attachment #9186602 - Attachment is obsolete: true
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bb6072f5d067
[marionette] Add register/unregisterEventsActor helpers to MarionetteEventsParent r=marionette-reviewers,whimboo
https://hg.mozilla.org/integration/autoland/rev/0206b72af90a
[marionette] Wait for the pageshow event in newWindow command r=marionette-reviewers,whimboo
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 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: