Closed Bug 1667377 Opened 4 years ago Closed 4 years ago

waitForNavigationCompleted doesn't trigger callback when no load events are expected or page load strategy is None

Categories

(Remote Protocol :: Marionette, defect, P1)

Firefox 82
defect

Tracking

(firefox-esr78 unaffected, firefox81 unaffected, firefox82 fixed, firefox83 fixed)

RESOLVED FIXED
83 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox81 --- unaffected
firefox82 --- fixed
firefox83 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

(Regression, )

Details

(Keywords: regression, Whiteboard: [marionette-fission-mvp][simple], [wptsync upstream])

Attachments

(2 files)

If there is a navigation to be observed by waitForNavigationCompleted the specified callback, which triggers the navigation, is actually never called when there are no page load events expected or the set page load strategy capability is None. Instead it just returns a resolved promise:

https://searchfox.org/mozilla-central/rev/89d33e1c3b0a57a9377b4815c2f4b58d933b7c32/testing/marionette/navigate.js#194-196

This is a regression from bug 1612831.

Even in the case of no load event expected, or the page load strategy
as set to None the callback that triggers the navigation always has
to be called.

Depends on D91443

Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f4806d53c46a
[wdspec] Added test for WebDriver:ElementClick to open a link with target=_blank.. r=maja_zf
https://hg.mozilla.org/integration/autoland/rev/1d341cedbe03
[marionette] Always call navigation callback in waitForNavigationCompleted. r=marionette-reviewers,maja_zf
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/25792 for changes under testing/web-platform/tests
Whiteboard: [marionette-fission-mvp][simple] → [marionette-fission-mvp][simple], [wptsync upstream]
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
Upstream PR merged by moz-wptsync-bot
Regressions: 1532589

Comment on attachment 9177906 [details]
Bug 1667377 - [marionette] Always call navigation callback in waitForNavigationCompleted.

Beta/Release Uplift Approval Request

  • User impact if declined: Various WebDriver navigation commands do not actually trigger the page load when there are no page load events expected (like opening a link in a new tab or in a different frame), or the navigation shouldn't be awaited for.
  • 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): Just adds the call to trigger the navigation under any situation.
  • String changes made/needed: no
Attachment #9177906 - Flags: approval-mozilla-beta?
Attachment #9177905 - Flags: approval-mozilla-beta?
Regressions: 1667938

Comment on attachment 9177906 [details]
Bug 1667377 - [marionette] Always call navigation callback in waitForNavigationCompleted.

marionette fix, approved for 82.0b6

Attachment #9177906 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9177905 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
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: