Commit Graph

23 Commits

Author SHA1 Message Date
amaitland 52e425012a Test - Skip JavascriptCallbackTests.ShouldCancelAfterV8ContextChange (Broken in M146) 2026-03-28 21:07:07 +10:00
amaitland 918d12820e Tests - EvaluateScriptAsyncTests.ShouldCancelAfterV8ContextChange increase delay
- Increase delay as still failing on appveyor
2026-03-26 20:54:11 +10:00
amaitland df4ba2eeb9 Tests - EvaluateScriptAsyncTests.ShouldCancelAfterV8ContextChange add delay
- Add a delay before trying to execute the callback to allow for the message
  to arrive from the render process
2026-03-26 18:52:14 +10:00
amaitland 7d51bbe671 Tests - Revert test change as M143 reverts to the previous behaviour 2025-12-11 06:52:19 +10:00
Alex Maitland d78d01a2c4 Core - Rewrite RenderProcess to avoid using OnBrowserDestroyed for JS eval (#5197)
- JavascriptCallbackRegistry - Get BrowserId From V8Context
- Render Process - Rewrite to store root object wrapper by frame instead of per browser
-  Don't store JavascriptRootObjectWrapper in the browserWrapper as CEF is calling destroyed more than it should.
-  Revert "Tests - Simplify ShouldFailWhenIsObjectCachedCalledWithInvalidObjectName"

This reverts commit f8a81acf7a.

---------

Co-authored-by: amaitland <307872+amaitland@users.noreply.github.com>
2025-12-03 19:00:12 +10:00
campersau 331ee6a305 Core - Cancel pending tasks when browser crashed or v8 context gets released (#5145)
* 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
2025-08-22 12:14:38 +10:00
campersau aed9ffd934 Test - Use invariant culture for double ToString (#5022) 2025-01-02 14:11:30 +10:00
amaitland c3339bd418 Test - Add JS Callback test that uses ExpandoObject (SerializeV8SimpleObject now supports Expando)
Follow up to #4959
2024-10-26 10:24:40 +10:00
Alex Maitland dc3ec6b382 Core - Basic ArrayBuffer support for EvaluateScriptAsync (#4632) 2024-05-09 11:23:26 +10:00
Alex Maitland ed1763ee95 Add EvaluateScriptAsyncTests.ShouldTimeout test
Follow up to #4654
2023-12-16 11:12:45 +10:00
Alex Maitland 42c150406b Core - EvaluateScriptAsync no longer returns meaningful error messages
Resolves #4629
2023-11-25 06:17:50 +10:00
Alex Maitland fa4a37a8b0 Core - Add EvaluateScriptAsync<T>(string script) extension method
- Add generic overload that uses the DefaultBinder (with CamelCaseNaming)
  to perform type conversion
2023-03-10 18:37:42 +10:00
Alex Maitland cafd378859 Test - Code Cleanup
- Start splitting tests out into own files where relevant
- Improve call ordering
- Use Assert.RaisesAsync where possible
- Classes have been renamed (Tests is now the standard suffix)

TODO: Some of the classes still need their method names changed
2023-02-17 13:53:23 +10:00
Alex Maitland a51da76ad9 OffScreen - Add useLegacyRenderHandler optional param to constructor
- Defaults to true
- For those using CaptureScreenshotAsync set to false to avoid
  creating DefaultRenderHandler
2023-01-15 11:33:08 +10:00
Alex Maitland e571510303 Test - Improve JavascriptCallbackFacts.CanEvaluatePromiseRejected
- Fix output message
- Add test case for passing in null

Issue https://github.com/cefsharp/CefSharp/issues/4276
2022-12-07 08:47:06 +10:00
Alex Maitland 4ff673e76a Enhancement - Improve Promise support (#4326)
* Enhancement - Improved promise support

Resolves #4276
2022-12-06 14:54:19 +10:00
Alex Maitland a819fc4e4d Test - Add EvaluateScriptAsPromiseAsyncFacts
- Move tests from OffScreenBrowserBasicFacts
- Enable Cef.WaitForBrowsersToClose();
2022-09-19 16:35:45 +10:00
Alex Maitland beca2863a8 Core - Migrate from CefTime to CefBaseTime (CookieManger Tests)
- 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
2022-09-07 10:56:29 +10:00
Alex Maitland 416ed308c2 Core - Migrate from CefTime to CefBaseTime (Execution/Binding)
- Convert more of the methods used by JavaScript binding/execution
- Fix naming of FromDateTimeToBaseTime

Issue #4234
2022-09-06 19:39:43 +10:00
Alex Maitland 48d2619dee Test - Fix failing EvaluateScriptAsyncFacts.CanEvaluateDateValues test
- Cannot currently eval 1970-01-01 as it's converted to MinVal

#4234
2022-09-06 14:28:23 +10:00
Alex Maitland 25e9c2f440 Test - Add EvaluateScriptAsyncFacts.CanEvaluateDateValues
- Add explicit test for dates
2022-09-06 13:07:38 +10:00
campersau 0401cf8abe Test - Fix CanEvaluateDoubleValues by not relying on the current culture (#3966) 2022-01-16 07:37:56 +10:00
Alex Maitland c832f7b7be Core - V8Serialization incorrectly returns negative numbers
- CEF doesn't differentiate between UINT and INT
  so we have to do some additional bounds checking
  To make sure the correct value is returned
- Add xUnit tests

Issue #3858
2021-10-27 09:58:31 +10:00