1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
9 function testOnConnectionEvent() {
10 chrome.test.assertEq('d1', deviceName);
11 chrome.test.assertEq('11:12:13:14:15:16', deviceAddress);
12 chrome.test.assertEq('1234', profileUuid);
14 chrome.test.succeed();
17 chrome.bluetooth.onConnection.addListener(
19 deviceName = socket.device.name;
20 deviceAddress = socket.device.address;
21 profileUuid = socket.profile.uuid;
22 chrome.bluetooth.disconnect({'socket': socket});
25 chrome.test.sendMessage('ready',
27 chrome.test.runTests([testOnConnectionEvent]);