OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <title>Mojo JavaScript bindings module loading tests (manual mojom deps loading)
</title> | |
3 <script src="../resources/testharness.js"></script> | |
4 <script src="../resources/testharnessreport.js"></script> | |
5 <script src="file:///gen/mojo/public/js/mojo_bindings.js"></script> | |
6 <script> | |
7 mojoBindings.config.autoLoadMojomDeps = false; | |
8 </script> | |
9 <script src="file:///gen/mojo/public/interfaces/bindings/tests/echo.mojom.js"></
script> | |
10 <script src="file:///gen/mojo/public/interfaces/bindings/tests/echo_import.mojom
.js"></script> | |
11 <script> | |
12 | |
13 promise_test(async () => { | |
14 function EchoImpl() {} | |
15 EchoImpl.prototype.echoPoint = function(point) { | |
16 return Promise.resolve({result: point}); | |
17 }; | |
18 | |
19 var echoServicePtr = new test.echo.mojom.EchoPtr(); | |
20 var echoServiceBinding = new mojoBindings.Binding( | |
21 test.echo.mojom.Echo, | |
22 new EchoImpl(), | |
23 mojoBindings.makeRequest(echoServicePtr)); | |
24 var result = (await echoServicePtr.echoPoint({x: 1, y: 2})).result; | |
25 assert_equals(1, result.x); | |
26 assert_equals(2, result.y); | |
27 }, 'Basics'); | |
28 | |
29 </script> | |
OLD | NEW |