Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: third_party/WebKit/LayoutTests/vr/resources/mock-vr-service.js

Issue 2623613002: Reland 2617183002 without offending tests (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698