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

Side by Side Diff: chrome/test/data/extensions/api_test/bluetooth_private/disconnect/test.js

Issue 1419023004: Add bluetoothPrivate.connect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_543294_bluetooth_options_2b_props
Patch Set: Rebase Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 deviceAddress = '11:12:13:14:15:16'; 5 var deviceAddress = '11:12:13:14:15:16';
6 var errorNotConnected = 'Device is not connected'; 6 var errorNotConnected = 'Device not connected';
7 var errorDisconnectFailed = 'Failed to disconnect device'; 7 var errorDisconnectFailed = 'Failed to disconnect device';
8 8
9 var btp = chrome.bluetoothPrivate; 9 var btp = chrome.bluetoothPrivate;
10 10
11 function testDisconnect() { 11 function testDisconnect() {
12 btp.disconnectAll(deviceAddress, function() { 12 btp.disconnectAll(deviceAddress, function() {
13 assertFailure(errorNotConnected); 13 assertFailure(errorNotConnected);
14 btp.disconnectAll(deviceAddress, function() { 14 btp.disconnectAll(deviceAddress, function() {
15 assertFailure(errorNotConnected); 15 assertFailure(errorNotConnected);
16 btp.disconnectAll(deviceAddress, function() { 16 btp.disconnectAll(deviceAddress, function() {
(...skipping 12 matching lines...) Expand all
29 chrome.test.fail('Expected failure but got success.'); 29 chrome.test.fail('Expected failure but got success.');
30 30
31 if (chrome.runtime.lastError.message == message) 31 if (chrome.runtime.lastError.message == message)
32 return; 32 return;
33 33
34 chrome.test.fail('Expected error "' + message + '" but got "' + 34 chrome.test.fail('Expected error "' + message + '" but got "' +
35 chrome.runtime.lastError.message + '" instead.'); 35 chrome.runtime.lastError.message + '" instead.');
36 } 36 }
37 37
38 chrome.test.runTests([testDisconnect]); 38 chrome.test.runTests([testDisconnect]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698