-
Notifications
You must be signed in to change notification settings - Fork 932
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
fix: page.pause() timeout reset #2157
Conversation
@@ -248,15 +248,18 @@ def set_default_navigation_timeout(self, timeout: float) -> None: | |||
def _set_default_navigation_timeout_impl(self, timeout: Optional[float]) -> None: | |||
self._timeout_settings.set_default_navigation_timeout(timeout) | |||
self._channel.send_no_reply( | |||
"setDefaultNavigationTimeoutNoReply", dict(timeout=timeout) | |||
"setDefaultNavigationTimeoutNoReply", | |||
{} if timeout is None else {"timeout": timeout}, |
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.
The issue was that on protocol level we don't allow timeout to be null.
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.
Should we consider serializing None as undefined or too many things break?
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.
too many things would break I believe!
432dbeb
to
d1bd87c
Compare
|
||
await page.goto(server.EMPTY_PAGE) | ||
page.pause() | ||
with pytest.raises(Error, match="Timeout 30000ms exceeded."): |
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.
Do we really want to slow down all tests by 30s?
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.
I think no other option instead of hacking around the impl for testing.
@@ -248,15 +248,18 @@ def set_default_navigation_timeout(self, timeout: float) -> None: | |||
def _set_default_navigation_timeout_impl(self, timeout: Optional[float]) -> None: | |||
self._timeout_settings.set_default_navigation_timeout(timeout) | |||
self._channel.send_no_reply( | |||
"setDefaultNavigationTimeoutNoReply", dict(timeout=timeout) | |||
"setDefaultNavigationTimeoutNoReply", | |||
{} if timeout is None else {"timeout": timeout}, |
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.
Should we consider serializing None as undefined or too many things break?
Fixes #2154