4 Copyright (c) 2013 Samsung Electronics Co., Ltd.
6 Licensed under the Apache License, Version 2.0 (the License);
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
10 http://www.apache.org/licenses/LICENSE-2.0
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
21 Witold Choinkowski <w.choinkowsk@samsung.com>
25 <title>BluetoothHealthProfileHandler_registerSinkApplication_errorCallback_invalid_cb</title>
26 <script src="../resources/unitcommon.js"></script>
32 //==== TEST: BluetoothHealthProfileHandler_registerSinkApplication_successCallback_invalid_cb
33 //==== LABEL Check argument registerSinkApplication successCallback validation.
35 //==== ONLOAD_DELAY 90
36 //==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothHealthProfileHandler:registerSinkApplication M
37 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
38 //==== TEST_CRITERIA MTCB
40 setup({timeout: 90000});
42 var adapter, t = async_test("BluetoothHealthProfileHandler_registerSinkApplication_errorCallback_invalid_cb"),exceptionName = "TypeMismatchError",
43 incorrectCallback, errorCallback, healthProfileHandler;
45 adapter = tizen.bluetooth.getDefaultAdapter();
46 healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
49 onsuccess: t.step_func(function (error) {
50 assert_unreached("Invalid successCallback invoked: " + error.name + ": " + error.message);
54 errorCallback = t.step_func(function () {
55 assert_unreached("errorCallback shouldn't be here");
58 assert_throws({name : exceptionName},
60 healthProfileHandler.registerSinkApplication(4100, "testSinkApp", incorrectCallback, errorCallback);
61 },exceptionName + " should be thrown - given incorrect success callback.");