-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
/
BindingTest.html
60 lines (50 loc) · 1.58 KB
/
BindingTest.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<!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.10.0.css">
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<script src="https://code.jquery.com/qunit/qunit-2.10.0.js"></script>
<!--<script type="text/javascript">
(async function() {
// <embed user provided code here>
await CefSharp.BindObjectAsync("boundAsync", "bound");
})();
(async () => {
await CefSharp.BindObjectAsync("boundAsync", "bound");
})();
</script>-->
<script src="BindingTestSync.js"></script>
<script src="BindingTestAsync.js"></script>
<script type="text/javascript">
QUnit.done(function (details)
{
CefSharp.PostMessage({ "Type": "QUnitExecutionComplete", "Details": details });
});
QUnit.log(function (details)
{
if (details.result)
{
return;
}
let output = `[FAILED] ${details.module} > ${details.name}`;
if (details.message)
{
output += `: ${details.message}`;
}
if (details.actual)
{
output += `\nexpected: ${details.expected}\nactual: ${details.actual}`;
}
if (details.source)
{
output += `\n${details.source}`;
}
CefSharp.PostMessage({ "Type": "QUnitTestFailed", "Output": output });
});
</script>
</body>
</html>