* Core - Cancel pending tasks when browser crashed or v8 context gets released
* Use TrySetCanceled to cancel pending tasks
* Adjust test to use chrome://crash for simulating a crash
* Add tests for javascript callbacks
* Rename tests and add tests for calling Execute multiple times
* Move FramePendingTaskRepository to its own file
* Rename test to ShouldCancelAfterV8ContextChange
* Fix compile error on .NET Framework
* adjust ShouldTimeoutIfNavigationOccurs test which now throws a TaskCanceledException on navigation
* Upgrade minimum .Net version to 4.6.2
#4433
* Use TaskCreationOptions.RunContinuationsAsynchronously
- Now that min version is .Net 4.6.2 we can use RunContinuationsAsynchronously
- Remove some unused code
- Moves the Dependency of System.Text.Json from CefSharp.dll
BrowserSubProcess as a result no longer has a reference
where wasn't required for it's operation.
Resolves#4428#4427
Disposing of the DevToolsContext is causing problems currently as sending the DevTools protocol messages
to the browser is happening after the CefBrowserHost instance has been Disposed.
A separate method of disposing of the DevToolsContext will need to be added that does a cleanup
without sending the commands.
Issue https://github.com/cefsharp/CefSharp.Dom/issues/41
- Add basic xUnit test
- Don't set Creation/LastAccess on cookie creation, these are set internally in Chromium
and are left uninitialized until the cookie is read back from the browser
I haven't tested though I suspect Cookie.Expiry was incorrectly set when Local/Unspecified DateTime was used
cookies are always in GMT
Issue #4234
Logs some basic information so we can see what type of ChromiumWebBrowser hasn't been closed
within as part of the xUnit tests.
* Meant for internal use and might be subject to change.
* WPF/OffScreen - Add WaitForRenderIdleAsync
- Task resolves when render has been idle for the specified time
- Make TaskTimeoutExtensions public (they're not extension methods as this was expected)
- Simplification of calling the DevTools method
- Moved GetContentSizeAsync from OffScreen into partial class (now accessible from WinForms/WPF/OffScreen).
- Added menu option
Resolves#4081
- Add new WaitForNavigationAsync method
- Change LoadUrlAsync to return CefErrorCode.Failed for HttpStatusCode = -1 (better represents there was an error)
Example:
var navigationTask = browser.WaitForNavigationAsync();
var evaluateTask = browser.EvaluateScriptAsync($"window.location.href = '{expected}';");
await Task.WhenAll(navigationTask, evaluateTask);
var navigationResponse = navigationTask.Result;
Resolves#4073
* Core - added support for property interceptor
* Incorporated the review comments
* Incorporated the review comments 2
* Review comments exclude trygetproperty and trysetproperty for .netcore app
* Added the unit test cases for trygetproperty and trysetproperty
* Fixed .net core app build failure
* Added the separate test case for property interceptor
Co-authored-by: sghanti <santosh_ghanti@intuit.com>
- Previously a new PendingTask(TaskCompletionSource) was created using a new Id which worked when the Ids matched
between the browser and render process. If you skipped executing a callback then the Ids would get out of sync.
Issue #3979
- Add IChromiumWebBrowserBase which is can be used for ChromiumWebBrowser instances and ChromiumHostControl
- Reduce code duplication for extensions methods
- Update WinForms Example
- Remove url optional null, a Url is now required and an exception will be
thrown if null or empty. If the browser wasn't loading an null was passed
in then the task would have never resolved. This provides a predictable behaviour.
A new WaitForInitialLoadAsync method was added to simplify waiting for initial
browser load.
- Remove SynchronizationContext param, best to let the framework handle
Issue #3842
- Initial intention was to have a reusable method that could be used CefSharp.Wpf.HwndHost,
upon further deliberation I've decided to build the functionality into the ChromiumWebBrowser.Partial.cs
and will need to duplicate the functionality in CefSharp.Wpf.HwndHost. This guarantees that the
Task will be resolved in all cases. The previous implementation there was a theoretical change we'd
miss subscribing to the relevant events
- Remove CancellationToken as it's not possible to cancel
Issue #3842
- GlobalContextInitialized wraps a TaskCompletionSource which is resolved
when the Global CefRequestContext has been created
- Reduce code duplication
If successful we can apply the same changes to WinForms/WPF though they're less likely to have
issues than the OffScreen implementation as the CreateBrowser doesn't happen until much later
Issue #3850#3634