mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-04 10:22:55 +00:00
0542c5138b
Not complete or tested yet
36 lines
968 B
HTML
36 lines
968 B
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<title>Binding Test</title>
|
|
<link rel="stylesheet" href="https://code.jquery.com/qunit/qunit-2.4.1.css">
|
|
</head>
|
|
<body>
|
|
<div id="qunit"></div>
|
|
<div id="qunit-fixture"></div>
|
|
<script src="https://code.jquery.com/qunit/qunit-2.4.1.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
(async () =>
|
|
{
|
|
await CefSharp.BindObjectAsync("boundAsync");
|
|
|
|
QUnit.test("Async call (Divide 16 / 2):", function (assert)
|
|
{
|
|
var asyncCallback = assert.async();
|
|
|
|
boundAsync.div(16, 2).then(function (actualResult)
|
|
{
|
|
const expectedResult = 8
|
|
|
|
assert.equal(expectedResult, actualResult, "Divide 16 / 2 resulted in " + expectedResult);
|
|
|
|
asyncCallback();
|
|
});
|
|
});
|
|
|
|
})();
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|