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

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

Issue 2603553002: Ports VRService to be hosted in the device service.
Patch Set: Ports VRService to be hosted in the device service. Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/device/manifest.json ('k') | third_party/WebKit/Source/modules/vr/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/vr/resources/mock-vr-service.js
diff --git a/third_party/WebKit/LayoutTests/vr/resources/mock-vr-service.js b/third_party/WebKit/LayoutTests/vr/resources/mock-vr-service.js
index 53806a08cc9c733285ea14094fd57ceddf4a2625..c7dada9f4815d78d2487afb8fe64995816165463 100644
--- a/third_party/WebKit/LayoutTests/vr/resources/mock-vr-service.js
+++ b/third_party/WebKit/LayoutTests/vr/resources/mock-vr-service.js
@@ -4,8 +4,9 @@ let mockVRService = loadMojoModules(
'mockVRService',
['mojo/public/js/bindings',
'device/vr/vr_service.mojom',
+ 'services/device/public/interfaces/constants.mojom',
]).then(mojo => {
- let [bindings, vr_service] = mojo.modules;
+ let [bindings, vr_service, deviceConstants] = mojo.modules;
class MockVRDisplay {
constructor(interfaceProvider, displayInfo, service) {
@@ -16,6 +17,7 @@ let mockVRService = loadMojoModules(
this.vsync_provider_ = new MockVRVSyncProvider();
interfaceProvider.addInterfaceOverrideForTesting(
+ deviceConstants.kServiceName,
vr_service.VRDisplay.name,
handle => this.bindingSet_.addBinding(this, handle));
@@ -108,6 +110,7 @@ let mockVRService = loadMojoModules(
this.mockVRDisplays_ = [];
interfaceProvider.addInterfaceOverrideForTesting(
+ deviceConstants.kServiceName,
vr_service.VRService.name,
handle => this.bindingSet_.addBinding(this, handle));
}
@@ -116,7 +119,7 @@ let mockVRService = loadMojoModules(
this.mockVRDisplays_ = [];
for (let i = 0; i < displays.length; i++) {
displays[i].index = i;
- this.mockVRDisplays_.push(new MockVRDisplay(mojo.frameInterfaces,
+ this.mockVRDisplays_.push(new MockVRDisplay(mojo.connector,
displays[i], this));
}
}
@@ -128,7 +131,7 @@ let mockVRService = loadMojoModules(
} else {
display.index = 0;
}
- this.mockVRDisplays_.push(new MockVRDisplay(mojo.frameInterfaces,
+ this.mockVRDisplays_.push(new MockVRDisplay(mojo.connector,
display, this));
}
@@ -143,7 +146,7 @@ let mockVRService = loadMojoModules(
}
}
- return new MockVRService(mojo.frameInterfaces);
+ return new MockVRService(mojo.connector);
});
function vr_test(func, vrDisplays, name, properties) {
« no previous file with comments | « services/device/manifest.json ('k') | third_party/WebKit/Source/modules/vr/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698