Closed Bug 1828950 Opened 2 years ago Closed 2 years ago

wdspec fetch helper throws when used twice in the same test

Categories

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

defect
Points:
1

Tracking

(firefox-esr102 unaffected, firefox112 unaffected, firefox113 unaffected, firefox114 fixed)

RESOLVED FIXED
114 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox112 --- unaffected
firefox113 --- unaffected
firefox114 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

References

(Regression)

Details

(Keywords: regression, Whiteboard: [webdriver:m7])

Attachments

(1 file)

The new fetch helper is

        await bidi_session.script.evaluate(
            expression=f"""
                 const controller = new AbortController();
                 setTimeout(() => controller.abort(), {timeout_in_seconds * 1000});
                 fetch("{url}", {{
                   {method_arg}
                   {headers_arg}
                   signal: controller.signal
                 }}).then(response => response.text());""",
            target=ContextTarget(context["context"]),
            await_promise=True,
        )

This leads to errors in tests which use the helper twice on the same page.

Assignee: nobody → jdescottes
Status: NEW → ASSIGNED

Set release status flags based on info from the regressing bug 1826819

Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2f57ebd57eee [wdspec] Use a block scope in fetch helper expression r=webdriver-reviewers,whimboo
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/39625 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 114 Branch
Upstream PR merged by moz-wptsync-bot
Points: --- → 1
Whiteboard: [webdriver:m7]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: