31 Commits

Author SHA1 Message Date
Santosh M Ghanti c417970e5d Sync Javascript Binding - Add support for property interception (#3935)
* 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>
2022-02-14 13:59:49 +10:00
Alex Maitland c5a7162860 Net Core - Fix failing test
- WaitForQUnitTestExeuctionToComplete was renamed to CreateBrowserAndWaitForQUnitTestExeuctionToComplete
2022-01-30 09:01:16 +10:00
Alex Maitland a1b5d87f06 Test - Fix IntegrationTestFacts.LoadJavaScriptBindingAsyncTaskQunitTestsSuccessfulCompletion
Add method interceptor so tests pass. Without it we get an VoidTaskResult object.
2022-01-27 16:41:29 +10:00
Alex Maitland a9ac70ee91 Test - Add IntegrationTestFacts.LoadJavaScriptBindingAsyncTaskQunitTestsSuccessfulCompletion
- Runs the AsyncTask binding tests
2022-01-27 16:17:42 +10:00
Alex Maitland 4ee889f6d0 Test - Skip LoadJavaScriptBindingQunitTestsSuccessfulCompletion
Issue #3867
2022-01-11 12:12:38 +10:00
Alex Maitland e7f1ea3189 Test - Skip LoadLegacyJavaScriptBindingQunitTestsSuccessfulCompletion when run via AppVeyor
Is failing all the time now.

Issue #3867
2021-11-19 10:17:14 +10:00
Alex Maitland 4a07af26e9 Core - Rename WaitForBrowserInitialLoadAsync to WaitForInitialLoadAsync and simplify
- 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
2021-10-28 10:31:03 +10:00
Alex Maitland 91b7514a1c WinForms/WPF/OffScreen - Add WaitForBrowserInitialLoadAsync
Second attempt at WaitForBrowserInitialLoadAsync, includes optional
CancellationToken param.

Issue #3842
2021-10-27 13:58:57 +10:00
Alex Maitland a441c1a318 Test - Attempt to log more detailed failure from JSB Tests
Currently only some of the legacy tests are failing with Chromium Site isolation enabled
2021-10-16 17:52:39 +10:00
Alex Maitland 439970d8cc Test - Fix NetCore test case 2021-10-14 19:28:53 +10:00
Alex Maitland 1a854192e5 Test - Output QUnit results if tests failed 2021-10-14 13:00:08 +10:00
Alex Maitland 544abc68d1 Revert "WinForms/WPF/OffScreen - Add WaitForBrowserInitialLoadAsync"
Tests started failing so will revisit later.

This reverts commit 08e5140060.
2021-10-11 10:14:31 +10:00
Alex Maitland 08e5140060 WinForms/WPF/OffScreen - Add WaitForBrowserInitialLoadAsync
Change all the tests to use WaitForBrowserInitialLoadAsync instead of LoadUrlAsync
as LoadUrlAsync will require a Url as part of #3842
2021-10-10 14:41:04 +10:00
Alex Maitland fa2b6e22e3 Test - Rewrite test case to use Theory with Inline data
- Use inline data
- Move test into OffScreenBrowserBasicFacts as it's not actually javascript binding
  at a later point all the tests should be rearranged so they're  not just all lumped into OffScreenBrowserBasicFacts

Issue  #3808
2021-09-16 10:13:33 +10:00
Romout 1847c89b37 Fix for arrays with empty elements (#3811)
* Fix for arrays with empty elements

* Changed implementation so that it doesn't require the keys at all and added a unit-test
2021-09-16 10:05:14 +10:00
Alex Maitland 4a20b19e6b Test - Minor cleanup 2021-07-05 11:16:25 +10:00
Alex Maitland ae22e3ae88 Test - JsBindingGlobalApiDisabled ensure page loaded successfully 2021-06-05 14:37:49 +10:00
Alex Maitland 2371370e64 Test - Update to use LoadUrlAsync 2021-06-04 14:39:44 +10:00
Alex Maitland 4e16f3b16d Enhancement - Add LoadUrlAsync (#3596)
Core - Add LoadUrlAsync

- Add IWebBrowser.LoadUrlAsync
- Add LoadUrlAsyncResponse
- Update unit tests to use new method
-  Add static method to allow for CefSharp.Wpf.HwndHost to share the same code.
2021-06-04 13:29:40 +10:00
Alex Maitland 0386220e06 JavascriptBinding - Add JavascriptBindingSettings.JavascriptBindingApiEnabled property (#3571)
- The Javascript methods that CefSharp provides in relation to JavaScript Binding are
  created using a Global (window) Object. Settings this property allows you to disable
  the creation of this object. Features like EvaluateScriptAsPromiseAsync that rely on
  the creation of this object will no longer function.
2021-06-04 13:26:00 +10:00
Alex Maitland 9f96333626 Javascript Binding - CefSharp.BindObjectAsync() never raised the ResolveObject event
Resolves #3470
2021-04-28 13:49:09 +10:00
Alex Maitland d5c74771f1 Test - Add Test to verify workaround for issue #3470 2021-04-06 13:12:44 +10:00
Alex Maitland 58e4622ca2 Test - Improve reliability of JavaScriptObjectRepositoryFacts.CanRegisterJavascriptObjectBindWhenNamespaceIsNull
- JavascriptObjectRepository generates object ids using a static counter, we need to get the object Id for this
  test to be reliable, using an Object Id of 1 will fail if the test order isn't in a very specific order
2021-04-05 13:38:34 +10:00
Alex Maitland 138cbca996 Javascript Binding - Fix failing .Net Core Test case
- Add condition to calling Register()
- Add license disclaimer

Follow up to #3467
2021-04-05 10:56:34 +10:00
pedoc 893d03221f Javascript Binding - Allow binding to classes in the global namespace (#3467)
* fix IsComplexType NullReferenceException

Sometimes, the registered Javascript object does not have a namespace, at this time this function will throw a ```NullReferenceException```.

* add unit test for IsComplexType

* Simplify and remove useless code

* Update CefSharp/Internals/JavascriptObjectRepository.cs

Co-authored-by: campersau <buchholz.bastian@googlemail.com>

Co-authored-by: Alex Maitland <amaitland@users.noreply.github.com>
Co-authored-by: campersau <buchholz.bastian@googlemail.com>
2021-04-05 10:29:42 +10:00
Alex Maitland f278d3d69a Test - Fix a couple of javascript warnings 2021-03-16 14:54:05 +10:00
campersau e873f8fe60 Test - Add CefSharp.RenderProcessId javascript binding test
Issue #2984
2020-11-09 20:53:35 +10:00
amaitland 05665405f4 Core - Legacy Javascript Binding Integration Test
Add integration test (only in Net Full, not Net Core currently)

#2977
2020-09-16 19:58:40 +10:00
amaitland 1af1065f03 Net Core - Add XUnit Test Project
Issue #3197
2020-07-24 21:07:29 +10:00
campersau 760cc13d96 Remove unused JavascriptBindingFacts tests (#3194) 2020-07-23 14:17:41 +10:00
amaitland ae41e10d71 Core - Javascript Binding Configure Property Name
- Rename settings object to JavascriptBindingSettings
- Validate JavascriptBindingSettings.JsBindingGlobalObjectName in setter to provide immediate
  feedback
- Add FreezableBase which throws exception when frozen (we can reuse this for some other settings classes)
- Add some basic Unit Tests (More would be better)

Follow on from #3126
2020-05-30 19:28:50 +10:00