diff --git a/CefSharp.Example/Resources/BindingTestsAsyncTask.html b/CefSharp.Example/Resources/BindingTestsAsyncTask.html index 09b84eb8c..f8119c830 100644 --- a/CefSharp.Example/Resources/BindingTestsAsyncTask.html +++ b/CefSharp.Example/Resources/BindingTestsAsyncTask.html @@ -31,10 +31,9 @@ QUnit.test("WaitBeforeReturnAsync:", async (assert) => { - const expectedResult = null; const actualResult = await boundAsync.waitBeforeReturnAsync(2000); - assert.equal(expectedResult, actualResult, "Return null"); + assert.notOk(actualResult, "Method awaited without returning response."); }); QUnit.test("ReturnHello:", async (assert) => diff --git a/CefSharp.Test/JavascriptBinding/IntegrationTestFacts.cs b/CefSharp.Test/JavascriptBinding/IntegrationTestFacts.cs index 99f72ca41..c1340fa9a 100644 --- a/CefSharp.Test/JavascriptBinding/IntegrationTestFacts.cs +++ b/CefSharp.Test/JavascriptBinding/IntegrationTestFacts.cs @@ -7,7 +7,9 @@ using System.Threading.Tasks; using CefSharp.Event; using CefSharp.Example; using CefSharp.Example.JavascriptBinding; +using CefSharp.Example.ModelBinding; using CefSharp.Internals; +using CefSharp.ModelBinding; using CefSharp.OffScreen; using Xunit; using Xunit.Abstractions; @@ -124,6 +126,8 @@ namespace CefSharp.Test.JavascriptBinding //TODO: Extract this into some sort of helper setup method var bindingOptions = BindingOptions.DefaultBinder; + // intercept .net methods calls from js and log it + bindingOptions.MethodInterceptor = new MethodInterceptorLogger(); var repo = browser.JavascriptObjectRepository; repo.Register("boundAsync", new AsyncBoundObject(), isAsync: true, options: bindingOptions);