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

Side by Side Diff: chrome/test/data/extensions/api_test/bluetooth/discovery_in_progress/runtest.js

Issue 189463002: Migrate chrome.bluetooth API backend to use device::BluetoothDiscoverySession. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var kExpectedDeviceNames = ["d1", "d2"]; 5 var kExpectedDeviceNames = ["d2"];
6 6
7 function testDiscovery() { 7 function testDiscovery() {
8 chrome.test.assertEq(kExpectedDeviceNames.length, 8 chrome.test.assertEq(kExpectedDeviceNames.length,
9 discoveredDevices.length); 9 discoveredDevices.length);
10 for (var i = 0; i < kExpectedDeviceNames.length; ++i) { 10 for (var i = 0; i < kExpectedDeviceNames.length; ++i) {
11 chrome.test.assertEq(kExpectedDeviceNames[i], 11 chrome.test.assertEq(kExpectedDeviceNames[i],
12 discoveredDevices[i].name); 12 discoveredDevices[i].name);
13 } 13 }
14 14
15 chrome.test.succeed(); 15 chrome.test.succeed();
(...skipping 13 matching lines...) Expand all
29 } 29 }
30 30
31 var discoveredDevices = []; 31 var discoveredDevices = [];
32 function recordDevice(device) { 32 function recordDevice(device) {
33 discoveredDevices.push(device); 33 discoveredDevices.push(device);
34 } 34 }
35 35
36 chrome.bluetooth.startDiscovery( 36 chrome.bluetooth.startDiscovery(
37 { deviceCallback:recordDevice }, 37 { deviceCallback:recordDevice },
38 function() { sendReady(stopDiscoveryAndContinue); }); 38 function() { sendReady(stopDiscoveryAndContinue); });
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/bluetooth/bluetooth_event_router.cc ('k') | device/bluetooth/bluetooth.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698