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

Unified Diff: third_party/WebKit/LayoutTests/vibration/resources/vibration-helpers.js

Issue 2755363002: [DeviceService] Port VibrationManager to be hosted in Device Service (Closed)
Patch Set: Rebase only Created 3 years, 9 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
Index: third_party/WebKit/LayoutTests/vibration/resources/vibration-helpers.js
diff --git a/third_party/WebKit/LayoutTests/vibration/resources/vibration-helpers.js b/third_party/WebKit/LayoutTests/vibration/resources/vibration-helpers.js
index 6baf62b49f5d8fd8a2a252303fc38e112b035c43..ad72e00cb7d5f330ce0a5f6f02dae1fe7e24ae60 100644
--- a/third_party/WebKit/LayoutTests/vibration/resources/vibration-helpers.js
+++ b/third_party/WebKit/LayoutTests/vibration/resources/vibration-helpers.js
@@ -6,8 +6,9 @@ function vibration_mocks(mojo) {
[
'mojo/public/js/bindings',
'device/vibration/vibration_manager.mojom',
+ 'services/device/public/interfaces/constants.mojom',
],
- (bindings, vibrationManager) => {
+ (bindings, vibrationManager, deviceConstants) => {
class MockVibrationManager {
constructor() {
this.bindingSet =
@@ -43,19 +44,16 @@ function vibration_mocks(mojo) {
}
let mockVibrationManager = new MockVibrationManager;
- mojo.frameInterfaces.addInterfaceOverrideForTesting(
+ mojo.connector.addInterfaceOverrideForTesting(
+ deviceConstants.kServiceName,
vibrationManager.VibrationManager.name, handle => {
mockVibrationManager.bindingSet.addBinding(
mockVibrationManager, handle);
});
return Promise.resolve({
- // Interface instance bound to main frame.
+ // Mock interface instance bound.
mockVibrationManager: mockVibrationManager,
- // Constructor for mock VibrationManager class.
- MockVibrationManager: MockVibrationManager,
- // Loaded mojom interface.
- VibrationManager: vibrationManager.VibrationManager,
});
});
}

Powered by Google App Engine
This is Rietveld 408576698