Index: chrome/browser/resources/bluetooth_internals/interfaces.js |
diff --git a/chrome/browser/resources/bluetooth_internals/interfaces.js b/chrome/browser/resources/bluetooth_internals/interfaces.js |
index 92366c289bf952c3f3dd1cf653ac10454fc5dd4e..061bbf89915234b50683a870043325b4ec90849b 100644 |
--- a/chrome/browser/resources/bluetooth_internals/interfaces.js |
+++ b/chrome/browser/resources/bluetooth_internals/interfaces.js |
@@ -44,7 +44,18 @@ cr.define('interfaces', function() { |
}); |
} |
+ /** |
+ * Overriden by tests to give them a chance to setup a fake Mojo browser proxy |
+ * before any other code executes. |
+ * @return {!Promise} A promise firing once necessary setup has been completed. |
+ */ |
+ var setupFn = window.setupFn || function() { return Promise.resolve(); }; |
+ |
+ function initialize() { |
+ return setupFn().then(initializeProxies); |
+ } |
+ |
return { |
- initialize: initializeProxies, |
+ initialize: initialize, |
}; |
}); |