-
-
Notifications
You must be signed in to change notification settings - Fork 447
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
Implemented Browser tests #220
Conversation
await Task.Delay(150); | ||
Assert.Equal(0, disconnectedOriginal); | ||
Assert.Equal(0, disconnectedRemote1); | ||
Assert.Equal(1, disconnectedRemote2); |
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.
something isn't working with the Disconnected
event
Why are we including |
lib/PuppeteerSharp/Browser.cs
Outdated
@@ -97,6 +100,12 @@ internal void ChangeTarget(Target target) | |||
return version.product.ToString(); | |||
} | |||
|
|||
public async Task<string> GetUserAgentAsync() |
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.
Docs
lib/PuppeteerSharp/Browser.cs
Outdated
@@ -116,7 +125,6 @@ internal void ChangeTarget(Target target) | |||
} | |||
|
|||
Disconnect(); | |||
Closed?.Invoke(this, new EventArgs()); |
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.
Could you explain this?
lib/PuppeteerSharp/Session.cs
Outdated
@@ -152,7 +148,7 @@ internal void OnMessage(string message) | |||
} | |||
} | |||
|
|||
internal void Close() | |||
internal void OnClose() |
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 don't know if I buy this rename 🤔
@@ -152,7 +148,7 @@ internal void OnMessage(string message) | |||
} | |||
} | |||
|
|||
internal void Close() | |||
internal void OnClosed() |
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.
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.
Awesome
When I implemented this catch I thought that we might have errors generated by the client, but Chromium is catching those errors for us
If you want to read a little bit about the WebSocket mess go to dotnet/corefx#26429 and https://github.com/dotnet/corefx/issues/26556 I found out that we don't need to filter exceptions if the read fails we need to close and move on. |
It's not WIP anymore right @Meir017 ? |
closes #185