Commit Graph

10 Commits

Author SHA1 Message Date
amaitland 2a62f97392 Tests - Add OffScreenBrowserBasicFacts.CanExecuteJavascriptInMainFrameAfterNavigatingToDifferentOrigin
Confirm CanExecuteJavascriptInMainFrame is true after navigating to a different origin

Resolves #3021
2020-05-19 08:25:02 +10:00
amaitland 7100c3d0ec Core - Add Cef.WaitForBrowsersToClose helper function
- Add BrowserRefCounter to increment/decrement CefBrowser instance creation
- Add Cef.WaitForBrowsersToClose to dispose of all browser instances and call WaitForBrowsersToClose

Before calling CefShutdown it's important that CEF has finished closing/disposing of all the CefBrowser instances.
If you call CefShutdown before this has finished then you can get the error
"Check failed: !IsCefShutdown(). Object reference incorrectly held at CefShutdown".
This is more a problem when using MultiThreadedMessageLoop where CEF close/dispose happens on a different thread.
Calling ChromiumWebBrowser.Dispose will start to free the resources, CEF internally executes code on it's own thread.

#3047
2020-02-14 19:39:12 +10:00
amaitland ec8d58bcec Core - Rename CefSharp.Internals.CefUrlRequestWrapper to CefSharp.UrlRequest
- Make public
- Add public constructor
2019-11-23 15:11:14 +10:00
amaitland 4a79b75726 IUrlRequest - Minor formatting and xml doc improvements
- Formatting
- Xml doc improvements
- Rewrite test case to run continuation async

Issue #2881
2019-10-01 20:44:46 +10:00
David M Iserovich a843407dab Core - Add IURLRequest #1721 (#2881)
* Core - Add IURLRequest #1721

Add IURLRequest, IURLRequestClient, and GetURLRequest to IFrame

* Rename URL classes to Url, add xmldoc and licenses

* Add UrlRequestClient to CefSharp.Example, more minor cleanup

* Getters

* Rebase tweaks

* Fix filenames, remove unused

* Use UnmanagedMemoryStream instead of byte array for IUrlRequestClient.OnDownloadData
2019-10-01 20:11:10 +10:00
Chris bef5dd37c4 Maintenance - Fixed formatting, file encoding, and copyright year (#2504)
* Applied formatting

* Fixed file encoding + Updated copyright year

* Updated License

* Fixed more file encoding

* Copyright notice now shows the year the file was created
2018-09-10 10:41:13 +10:00
amaitland 431fe76a39 WebBrowserExtensions - Add ExecuteScriptAsyncEncodeString to allow for custom encoding of string params used with ExecuteScriptAsync overload
Also rename test case and add comment

Follow up to #2340
2018-04-03 14:12:10 +10:00
Garr Godfrey 7e30861bc2 Encode string parameters to pass unchanged.
enter the commit message for your changes. Lines starting
2018-03-28 22:28:01 -07:00
amaitland 2b3508d60a OffScreen/OffScreenBrowserBasicFacts- Add CrossSiteNavigationJavascriptBinding Test case
Very basic, little crude, passing though
Still having some problems with Xunit and shutting down on the correct thread.
2018-01-22 13:06:09 +10:00
amaitland 9407ba1828 Due to limitations of VC++ we must run our tests in the default appdomain, it's possible to use xunit for testing.
Readd CefSharp.Test.csproj to solution
Add some very basic unit tests using xunit, DisableTestParallelization, Set xunit.appDomain to denied in app.config to disable using appdomains (https://xunit.github.io/docs/configuring-with-xml.html)
Add xunit vs test running packages, using 2.2.0 version as 2.3.0 was throwing an exception similar to https://github.com/xunit/xunit/issues/1514
TODO: Take a look at https://github.com/NuGet/NuGetGallery/tree/master/tests/NuGetGallery.Facts for some ideas on structuring xunit tests (look at implementing Theory)

NOTE: I am not providing this as a definitive set of tests, it's simply here to get someone else started in creating tests as it appears people have trouble dealing with AppDomain problem
Only includes Tests for the OffScreen version at this stage.
2017-10-25 10:44:38 +10:00