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

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

Issue 10915148: Change getDevices to use a DeviceCallback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test breakage Created 8 years, 3 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
« no previous file with comments | « chrome/test/data/extensions/api_test/bluetooth/test_getdevices_concurrently.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 function testGetDevicesConcurrently() {
6 chrome.test.assertEq(1, errors.length);
7
8 var kExpectedError = "Concurrent calls to getDevices are not allowed.";
9 chrome.test.assertEq(kExpectedError, errors[0]);
10
11 chrome.test.succeed();
12 }
13
14 function nop() {}
15
16 var errors = [];
17 function recordError() {
18 if (chrome.runtime.lastError) {
19 errors.push(chrome.runtime.lastError.message);
20 }
21 }
22
23 var getDevicesOptions = { deviceCallback:nop, name:'foo' };
24 chrome.experimental.bluetooth.getDevices(getDevicesOptions, recordError);
25 chrome.experimental.bluetooth.getDevices(getDevicesOptions, recordError);
26 chrome.test.sendMessage('ready',
27 function(message) {
28 chrome.test.runTests([
29 testGetDevicesConcurrently
30 ]);
31 });
OLDNEW
« no previous file with comments | « chrome/test/data/extensions/api_test/bluetooth/test_getdevices_concurrently.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698