Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / chrome / test / data / extensions / api_test / bluetooth_private / passkey_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 testPasskeyPairing() {
6   chrome.bluetoothPrivate.onPairing.addListener(function(pairingEvent) {
7     chrome.test.assertEq('requestPasskey', pairingEvent.pairing);
8     chrome.bluetoothPrivate.setPairingResponse({
9         device: pairingEvent.device,
10         response: 'confirm',
11         passkey: 900531
12     }, function() {
13       chrome.test.assertNoLastError();
14       chrome.test.succeed();
15     });
16   });
17 }
18
19 chrome.test.runTests([testPasskeyPairing]);