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

Unified Diff: chrome/browser/resources/bluetooth_internals/interfaces.js

Issue 2428773005: bluetooth: Basic browser tests for chrome://bluetooth-internals. (Closed)
Patch Set: Fix formatting Created 4 years, 1 month 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: 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,
};
});

Powered by Google App Engine
This is Rietveld 408576698