Chromium Code Reviews| Index: mojo/public/js/tests/interface_ptr_unittest.js |
| diff --git a/mojo/public/js/tests/interface_ptr_unittest.js b/mojo/public/js/tests/interface_ptr_unittest.js |
| index 22e0d6f15f3db3e3d1291050cbb8b9bb8adc028a..950d2a38ea6ae10be76b17a4c439e348d7b04994 100644 |
| --- a/mojo/public/js/tests/interface_ptr_unittest.js |
| +++ b/mojo/public/js/tests/interface_ptr_unittest.js |
| @@ -7,12 +7,14 @@ define([ |
| "mojo/public/js/bindings", |
| "mojo/public/js/core", |
| "mojo/public/interfaces/bindings/tests/math_calculator.mojom", |
| + "mojo/public/interfaces/bindings/tests/sample_interfaces.mojom", |
| "mojo/public/js/threading", |
| "gc", |
| ], function(expect, |
| bindings, |
| core, |
| math, |
| + sampleInterfaces, |
| threading, |
| gc) { |
| testIsBound() |
| @@ -21,6 +23,7 @@ define([ |
| .then(testConnectionError) |
| .then(testPassInterface) |
| .then(testBindRawHandle) |
| + .then(testQueryVersion) |
| .then(function() { |
| this.result = "PASS"; |
| gc.collectGarbage(); // should not crash |
| @@ -157,4 +160,16 @@ define([ |
| return promise; |
| } |
| + |
| + function testQueryVersion() { |
| + var integerAccessorImpl = new sampleInterfaces.IntegerAccessorPtr(); |
|
yzshen1
2017/02/06 06:57:26
This is not an "implementation". An implementation
yzshen1
2017/02/06 07:04:18
Sorry, I meant to say "You should use the Binding
|
| + var request = bindings.makeRequest(integerAccessorImpl); |
|
yzshen1
2017/02/06 06:57:26
The problem is that you need to provide support fo
|
| + expect(integerAccessorImpl.ptr.version).toBe(0); |
| + |
| + return integerAccessorImpl.ptr.queryVersion().then(function(version) { |
| + expect(version).toBe(3); |
| + expect(integerAccessorImpl.ptr.version).toBe(3); |
| + }); |
| + } |
| }); |
| + |