Index: chrome/browser/resources/bluetooth_internals/bluetooth_internals.js |
diff --git a/chrome/browser/resources/bluetooth_internals/bluetooth_internals.js b/chrome/browser/resources/bluetooth_internals/bluetooth_internals.js |
index ecb9ca3e90d564865b3c16946126a287601a1a29..221f991077646d8859edde384469203894aabb52 100644 |
--- a/chrome/browser/resources/bluetooth_internals/bluetooth_internals.js |
+++ b/chrome/browser/resources/bluetooth_internals/bluetooth_internals.js |
@@ -7,6 +7,10 @@ |
* chrome://bluetooth-internals/. |
*/ |
+// Exposed to get access for testing. |
+var adapterClient = null; |
+var deviceTable = null; |
+ |
cr.define('bluetooth_internals', function() { |
/** |
* The implementation of AdapterClient in |
@@ -44,8 +48,6 @@ cr.define('bluetooth_internals', function() { |
} |
}; |
- var adapterClient = null; |
- |
function initialize() { |
interfaces.initialize() |
.then(function() { |
@@ -64,8 +66,9 @@ cr.define('bluetooth_internals', function() { |
response.devices.forEach(adapterClient.deviceAdded, |
adapterClient /** this */); |
- var deviceTable = new device_table.DeviceTable(); |
+ deviceTable = new device_table.DeviceTable(); |
deviceTable.setDevices(adapterClient.devices); |
+ deviceTable.id = 'device-table'; |
document.body.appendChild(deviceTable); |
}) |
.catch(function(error) { console.error(error); }); |