| Index: third_party/WebKit/LayoutTests/mojo/module-loading.html
|
| diff --git a/third_party/WebKit/LayoutTests/mojo/module-loading.html b/third_party/WebKit/LayoutTests/mojo/module-loading.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f99b8b030611d5f657bfe3380dd0283e346c0efa
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/mojo/module-loading.html
|
| @@ -0,0 +1,25 @@
|
| +<!DOCTYPE html>
|
| +<title>Mojo JavaScript bindings module loading tests</title>
|
| +<script src="../resources/testharness.js"></script>
|
| +<script src="../resources/testharnessreport.js"></script>
|
| +<script src="file:///gen/layout_test_data/mojo/public/js/mojo_bindings.js"></script>
|
| +<script src="file:///gen/mojo/public/interfaces/bindings/tests/echo_import.mojom.js"></script>
|
| +<script src="file:///gen/mojo/public/interfaces/bindings/tests/echo.mojom.js"></script>
|
| +<script>
|
| +
|
| +promise_test(async () => {
|
| + function EchoImpl() {}
|
| + EchoImpl.prototype.echoPoint = function(point) {
|
| + return Promise.resolve({result: point});
|
| + };
|
| +
|
| + var echoServicePtr = new test.echo.mojom.EchoPtr();
|
| + var echoServiceBinding = new mojo.Binding(test.echo.mojom.Echo,
|
| + new EchoImpl(),
|
| + mojo.makeRequest(echoServicePtr));
|
| + var result = (await echoServicePtr.echoPoint({x: 1, y: 2})).result;
|
| + assert_equals(1, result.x);
|
| + assert_equals(2, result.y);
|
| +}, 'Basics');
|
| +
|
| +</script>
|
|
|