Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / chrome / test / data / extensions / api_test / bluetooth_private / cancel_pairing / test.js
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
3 // found in the LICENSE file.
4
5 function testCancelPairing() {
6   chrome.bluetoothPrivate.onPairing.addListener(function(pairingEvent) {
7     chrome.test.assertEq('requestAuthorization', pairingEvent.pairing);
8     chrome.bluetoothPrivate.setPairingResponse({
9         device: pairingEvent.device,
10         response: 'cancel',
11     }, function() {
12       chrome.test.assertNoLastError();
13       chrome.test.succeed();
14     });
15   });
16 }
17
18 chrome.test.runTests([testCancelPairing]);