| Index: mojo/edk/js/tests/interface_ptr_tests.js
|
| diff --git a/mojo/edk/js/tests/interface_ptr_tests.js b/mojo/edk/js/tests/interface_ptr_tests.js
|
| index d2bb1782330e6a08013e21cedb9e728adf08ddd6..22e0d6f15f3db3e3d1291050cbb8b9bb8adc028a 100644
|
| --- a/mojo/edk/js/tests/interface_ptr_tests.js
|
| +++ b/mojo/edk/js/tests/interface_ptr_tests.js
|
| @@ -5,11 +5,13 @@
|
| define([
|
| "gin/test/expect",
|
| "mojo/public/js/bindings",
|
| + "mojo/public/js/core",
|
| "mojo/public/interfaces/bindings/tests/math_calculator.mojom",
|
| "mojo/public/js/threading",
|
| "gc",
|
| ], function(expect,
|
| bindings,
|
| + core,
|
| math,
|
| threading,
|
| gc) {
|
| @@ -18,6 +20,7 @@ define([
|
| .then(testReusable)
|
| .then(testConnectionError)
|
| .then(testPassInterface)
|
| + .then(testBindRawHandle)
|
| .then(function() {
|
| this.result = "PASS";
|
| gc.collectGarbage(); // should not crash
|
| @@ -138,4 +141,20 @@ define([
|
|
|
| return promise;
|
| }
|
| +
|
| + function testBindRawHandle() {
|
| + var pipe = core.createMessagePipe();
|
| + var calc = new math.CalculatorPtr(pipe.handle0);
|
| + var newCalc = null;
|
| + var calcBinding = new bindings.Binding(math.Calculator,
|
| + new CalculatorImpl(),
|
| + pipe.handle1);
|
| +
|
| + var promise = calc.add(2).then(function(response) {
|
| + expect(response.value).toBe(2);
|
| + return Promise.resolve();
|
| + });
|
| +
|
| + return promise;
|
| + }
|
| });
|
|
|