| Index: chrome/test/data/extensions/api_test/bluetooth/discovery_callback/runtest.js
|
| diff --git a/chrome/test/data/extensions/api_test/bluetooth/discovery_callback/runtest.js b/chrome/test/data/extensions/api_test/bluetooth/discovery_callback/runtest.js
|
| index 454d24c0e4016ec3ba40185f5a32289ce9f8bef6..7e51edc4e0871a29416ce644790e156223d67910 100644
|
| --- a/chrome/test/data/extensions/api_test/bluetooth/discovery_callback/runtest.js
|
| +++ b/chrome/test/data/extensions/api_test/bluetooth/discovery_callback/runtest.js
|
| @@ -23,16 +23,17 @@ function sendReady(callback) {
|
| chrome.test.sendMessage('ready', callback);
|
| }
|
|
|
| -function stopDiscoveryAndContinue() {
|
| - chrome.bluetooth.stopDiscovery();
|
| - sendReady(startTests);
|
| -}
|
| -
|
| var discoveredDevices = [];
|
| function recordDevice(device) {
|
| discoveredDevices.push(device);
|
| }
|
|
|
| +function stopDiscoveryAndContinue() {
|
| + chrome.bluetooth.stopDiscovery();
|
| + chrome.bluetooth.onDeviceAdded.removeListener(recordDevice);
|
| + sendReady(startTests);
|
| +}
|
| +
|
| +chrome.bluetooth.onDeviceAdded.addListener(recordDevice);
|
| chrome.bluetooth.startDiscovery(
|
| - { deviceCallback:recordDevice },
|
| function() { sendReady(stopDiscoveryAndContinue); });
|
|
|