-
Notifications
You must be signed in to change notification settings - Fork 3k
[WebDriver BiDi] emulate network offline #11575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[WebDriver BiDi] emulate network offline #11575
Conversation
First step addressing #776. * Fail all the intercepted requests, WebSocket and WebTransport. * Html spec: whatwg/html#11575 * Fetch spec: whatwg/fetch#1852
I would suggest we introduce an "is online" abstraction in Fetch as part of whatwg/fetch#1852 and then make this getter return "is online". |
Ack, I will do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Informal LGTM
The only concern is that in the fetch spec we would still need to invoke WebDriver BiDi twice: in fetch and in "is online" getter. |
Oh why? I thought that fetch could also use "is online". I guess in theory that would introduce novel behavior due to the extra condition, but in practice it already behaves like that when you're offline, no? |
I think with the current wording (in html) it's a chicken-egg problem:
I'm not an expert here, but if you insist I can move this definition to the fetch spec. Please let me know if this is the preferred. |
I'm not either. I was thinking we'd change that hand-wavy definition to another. Something like:
|
So you want the HTML spec to refer the Fetch's |
Yeah, and Fetch's fetch algorithm would depend on the same primitive. Essentially the same thing we did as with the default |
Done in whatwg/fetch#1852 |
Respect WebDriver BiDi emulated network offline condition in
navigator.onLine
property.emulation.setNetworkConditions:offline
web-platform-tests/wpt#55300emulation.setNetworkConditions:offline
GoogleChromeLabs/chromium-bidi#3819(See WHATWG Working Mode: Changes for more details.)
/infrastructure.html ( diff )
/system-state.html ( diff )