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

Unified Diff: chrome/test/data/webui/settings/fake_bluetooth_private.js

Issue 2676103002: MD Settings: Move bluetooth UI from dialog to subpage (Closed)
Patch Set: Feedback Created 3 years, 10 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 | « chrome/test/data/webui/settings/fake_bluetooth.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/settings/fake_bluetooth_private.js
diff --git a/chrome/test/data/webui/settings/fake_bluetooth_private.js b/chrome/test/data/webui/settings/fake_bluetooth_private.js
index 7367da929730a82fec403aa3bdf3a767c6105b86..efbe7073546a3369a6a0c3e914c0252902cc1604 100644
--- a/chrome/test/data/webui/settings/fake_bluetooth_private.js
+++ b/chrome/test/data/webui/settings/fake_bluetooth_private.js
@@ -26,14 +26,14 @@ cr.define('settings', function() {
setAdapterState: function(state, opt_callback) {
this.bluetoothApi_.adapterState = state;
if (opt_callback)
- setTimeout(opt_callback);
+ opt_callback();
},
/** @override */
setPairingResponse: function(options, opt_callback) {
this.pairingResponses_[options.device.address] = options;
if (opt_callback)
- setTimeout(opt_callback);
+ opt_callback();
},
/** @override */
@@ -47,9 +47,13 @@ cr.define('settings', function() {
/** @override */
connect: function(address, opt_callback) {
- this.connectedDevices_.add(address);
+ var device =
+ this.bluetoothApi_.getDeviceForTest(address) || {address: address};
+ device.paired = true;
+ device.connecting = true;
+ this.bluetoothApi_.updateDeviceForTest(device);
if (opt_callback)
- setTimeout(opt_callback);
+ opt_callback(chrome.bluetoothPrivate.ConnectResultType.IN_PROGRESS);
},
/** @override */
« no previous file with comments | « chrome/test/data/webui/settings/fake_bluetooth.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698