| OLD | NEW |
| 1 'use strict'; | 1 'use strict'; |
| 2 | 2 |
| 3 let mockVRService = loadMojoModules( | 3 let mockVRService = loadMojoModules( |
| 4 'mockVRService', | 4 'mockVRService', |
| 5 ['mojo/public/js/bindings', | 5 ['mojo/public/js/bindings', |
| 6 'device/vr/vr_service.mojom', | 6 'device/vr/vr_service.mojom', |
| 7 ]).then(mojo => { | 7 ]).then(mojo => { |
| 8 let [bindings, vr_service] = mojo.modules; | 8 let [bindings, vr_service] = mojo.modules; |
| 9 | 9 |
| 10 class MockVRDisplay { | 10 class MockVRDisplay { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 60 |
| 61 var device_number = (this.vrDisplays_== null ? 0 : this.vrDisplays_.length
); | 61 var device_number = (this.vrDisplays_== null ? 0 : this.vrDisplays_.length
); |
| 62 return Promise.resolve({numberOfConnectedDevices: device_number}); | 62 return Promise.resolve({numberOfConnectedDevices: device_number}); |
| 63 } | 63 } |
| 64 } | 64 } |
| 65 | 65 |
| 66 return new MockVRService(mojo.frameInterfaces); | 66 return new MockVRService(mojo.frameInterfaces); |
| 67 }); | 67 }); |
| 68 | 68 |
| 69 function vr_test(func, vrDisplays, name, properties) { | 69 function vr_test(func, vrDisplays, name, properties) { |
| 70 promise_test(t => mockVRService.then((service) => { | 70 mockVRService.then( (service) => { |
| 71 service.setVRDisplays(vrDisplays); | 71 service.setVRDisplays(vrDisplays); |
| 72 return func(); | 72 let t = async_test(name, properties); |
| 73 }), name, properties); | 73 func(t); |
| 74 }); |
| 74 } | 75 } |
| OLD | NEW |