Commit Graph

9 Commits

Author SHA1 Message Date
Alex Maitland db986a2979 Core - Migrate from CefTime to CefBaseTime (Binding Tests)
- Add QUnit unit time zero (01/01/1970)

Issue #4234
2022-10-04 13:46:37 +10:00
Alex Maitland e540131dae Core - Migrate from CefTime to CefBaseTime (Binding Tests)
- Add new QUnit tests for sync and async bindings to confirm dates round trip (echo) correctly

Issue #4234
2022-10-04 13:31:47 +10:00
Alex Maitland 9214052868 Javascript Binding - Add/Improve examples 2021-02-26 12:16:50 +10:00
Alex Maitland ede36bf009 Javascript Callback - Move Test
Move test into BindingTestsAsyncTask as build is failing.
Will run all async tests as part of build in near future.
2021-02-15 15:21:28 +10:00
Alex Maitland 6d9f214196 Javascript Callback - Add very basic support for executing a Promise
It's a manual process at this stage and requires the end user to deal to:
- Return "CefSharpDefEvalScriptRes" immediately after the promise function has been created
- Call cefSharp.sendEvalScriptResponse when the async/await (promise) processing has completed
2021-02-15 13:43:51 +10:00
Alex Maitland bc9b3d1a16 Test - Update remaining QUnit tests to async
Follow up to #3298
2020-12-16 11:26:29 +10:00
Timo Tijhof d06d5100be Example - Simplify BindObjectAsync tests with QUnit (#3298)
* Example - Update to QUnit 2.10

Follows ae41e10d71, which introduced a few references
to QUnit 2.10.

* Example - Simplify the BindObjectAsync unit tests

The `QUnit.test()` may take an async function and/or to return a Promise.
This uses JavaScript's native async/await capabilities to wait for that,
much the same way manual tracking via `assert.async()` would.
Using this can simplify the test structures by a lot.

`assert.rejects()` asserts that a promise throws an error.
`assert.throws()` asserts that a block directly throws an error.

I've also tried to use `assert.deepEqual()`. I suspect a copy
of this function was placed here directly, but I couldn't find
in the history why, so perhaps worth trying if the built-in
one now works.
2020-12-16 10:59:23 +10:00
Alex Maitland 83ae9399dd Core - MethodRunnerQueue use TaskCreationOptions.HideScheduler to
To prevent subtasks from attempting to use our LimitedConcurrencyLevelTaskScheduler we need to
specify TaskCreationOptions.HideScheduler when creating the Task

Resolves #3293
2020-11-25 15:16:57 +10:00
amaitland 22d494b230 Net Core - Split Binding Test into Sync/Async
- In preparation for adding a Net Core Specific XUnit project file

Issue #3197
2020-07-24 20:42:14 +10:00