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

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

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

Powered by Google App Engine
This is Rietveld 408576698