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_errorCallback_invalid_cb
33 //==== LABEL Check argument registerSinkApplication errorCallback validation.
35 //==== STEP check argument registerSinkApplication errorCallback validation.
36 //==== EXPECT argument registerSinkApplication errorCallback validation checked.
37 //==== ONLOAD_DELAY 90
38 //==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothHealthProfileHandler:registerSinkApplication M
39 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
40 //==== TEST_CRITERIA MTCB
42 setup({timeout: 90000});
44 var adapter, t = async_test("BluetoothHealthProfileHandler_registerSinkApplication_errorCallback_invalid_cb", {timeout: 90000}),exceptionName = "TypeMismatchError",
45 incorrectCallback, successCallback, healthProfileHandler;
47 adapter = tizen.bluetooth.getDefaultAdapter();
48 healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
51 onerror: t.step_func(function (error) {
52 assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
56 successCallback = t.step_func(function () {
57 assert_unreached("successCallback shouldn't be here");
60 assert_throws({name : exceptionName},
62 healthProfileHandler.registerSinkApplication(4100, "testSinkApp", successCallback, incorrectCallback);
63 },exceptionName + " should be thrown - given incorrect success callback.");