Closed
Bug 2019950
Opened 5 months ago
Closed 4 months ago
fetch keepalive requests ignore offline network conditions
Categories
(Remote Protocol :: WebDriver BiDi, defect, P2)
Remote Protocol
WebDriver BiDi
Tracking
(firefox150 fixed)
RESOLVED
FIXED
150 Branch
| Tracking | Status | |
|---|---|---|
| firefox150 | --- | fixed |
People
(Reporter: hbenl, Assigned: jdescottes)
References
(Blocks 1 open bug)
Details
(Whiteboard: [webdriver:m19], [wptsync upstream])
Attachments
(4 files)
This Playwright test fails because a fetch with keepalive: true succeeds in offline mode.
I was able to reproduce the issue with this test:
@pytest_asyncio.fixture
async def get_can_fetch2(bidi_session, url):
async def get_can_fetch2(context):
try:
await bidi_session.script.call_function(
function_declaration="(url)=>fetch(url, { cache: 'no-store', keepalive: true })",
arguments=[{
"type": "string",
"value": url("/common/dummy.json")
}],
target=ContextTarget(context["context"]),
await_promise=True,
)
return True
except ScriptEvaluateResultException:
return False
return get_can_fetch2
async def test_fetch_keepalive(bidi_session, top_context, url, get_can_fetch2):
# Navigate away from about:blank to allow fetch requests.
await bidi_session.browsing_context.navigate(
context=top_context["context"],
url=url("/common/blank.html"),
wait="complete")
assert await get_can_fetch2(top_context)
await bidi_session.emulation.set_network_conditions(
network_conditions=OFFLINE_NETWORK_CONDITIONS,
contexts=[top_context["context"]])
assert not await get_can_fetch2(top_context)
await bidi_session.emulation.set_network_conditions(
network_conditions=None,
contexts=[top_context["context"]])
assert await get_can_fetch2(top_context)
The test passes when I remove the keepalive: true option.
| Assignee | ||
Updated•5 months ago
|
Assignee: nobody → jdescottes
Severity: -- → S3
Points: --- → 2
Priority: -- → P2
Whiteboard: [webdriver:m19]
| Assignee | ||
Updated•5 months ago
|
Status: NEW → ASSIGNED
| Assignee | ||
Comment 1•4 months ago
|
||
| Assignee | ||
Comment 2•4 months ago
|
||
| Assignee | ||
Comment 3•4 months ago
|
||
| Assignee | ||
Comment 4•4 months ago
|
||
Pushed by jdescottes@mozilla.com:
https://github.com/mozilla-firefox/firefox/commit/de6f3e903c73
https://hg.mozilla.org/integration/autoland/rev/4158ed598f10
[bidi] Clarify role of hasGlobalOverride in emulation module r=Sasha
https://github.com/mozilla-firefox/firefox/commit/587c1699ac24
https://hg.mozilla.org/integration/autoland/rev/b6e0147c8155
[bidi] Cancel keepAlive requests from beforeRequestSent handler r=Sasha
https://github.com/mozilla-firefox/firefox/commit/d8699183f570
https://hg.mozilla.org/integration/autoland/rev/e303414a3032
[wdspec] Add test for keepalive fetch requests with offline network conditions r=Sasha
https://github.com/mozilla-firefox/firefox/commit/49c86ede9628
https://hg.mozilla.org/integration/autoland/rev/65f2b0a20297
[wdspec] Add test for setExtraHeaders after unsubscribing from network events r=Sasha
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/58479 for changes under testing/web-platform/tests
Whiteboard: [webdriver:m19] → [webdriver:m19], [wptsync upstream]
https://hg.mozilla.org/mozilla-central/rev/4158ed598f10
https://hg.mozilla.org/mozilla-central/rev/b6e0147c8155
https://hg.mozilla.org/mozilla-central/rev/e303414a3032
https://hg.mozilla.org/mozilla-central/rev/65f2b0a20297
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
status-firefox150:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 150 Branch
Upstream PR merged by moz-wptsync-bot
| Assignee | ||
Updated•3 months ago
|
Whiteboard: [webdriver:m19], [wptsync upstream] → [webdriver:m19], [wptsync upstream][webdriver-relnote]
| Assignee | ||
Comment 9•3 months ago
|
||
Removing relnote here, since this was something missing in the initial implementation for offline mode, which landed in the same release.
Whiteboard: [webdriver:m19], [wptsync upstream][webdriver-relnote] → [webdriver:m19], [wptsync upstream]
You need to log in
before you can comment on or make changes to this bug.
Description
•