Skip to content

Commit 0566540

Browse files
committed
Core - Legacy Javascript Binding Integration Test
Add integration test (only in Net Full, not Net Core currently) #2977
1 parent 3ccb0f8 commit 0566540

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

CefSharp.Test/JavascriptBinding/IntegrationTestFacts.cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,28 @@ public async Task LoadJavaScriptBindingQunitTestsSuccessfulCompletion()
7474
output.WriteLine("QUnit Tests result: {0}", success);
7575
}
7676
}
77+
78+
[Fact]
79+
public async Task LoadLegacyJavaScriptBindingQunitTestsSuccessfulCompletion()
80+
{
81+
using (var browser = new ChromiumWebBrowser(CefExample.LegacyBindingTestUrl, automaticallyCreateBrowser: false))
82+
{
83+
//TODO: Extract this into some sort of helper setup method
84+
var bindingOptions = BindingOptions.DefaultBinder;
85+
var repo = browser.JavascriptObjectRepository;
86+
repo.Settings.LegacyBindingEnabled = true;
87+
88+
repo.Register("bound", new BoundObject(), isAsync: false, options: bindingOptions);
89+
repo.Register("boundAsync", new AsyncBoundObject(), isAsync: true, options: bindingOptions);
90+
91+
browser.CreateBrowser();
92+
var success = await browser.WaitForQUnitTestExeuctionToComplete();
93+
94+
Assert.True(success);
95+
96+
output.WriteLine("QUnit Tests result: {0}", success);
97+
}
98+
}
7799
#endif
78100

79101
[Fact]

0 commit comments

Comments
 (0)