5 Copyright (c) 2016 Samsung Electronics Co., Ltd.
7 Licensed under the Apache License, Version 2.0 (the License);
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
11 http://www.apache.org/licenses/LICENSE-2.0
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
20 Xiaoyan Qian <xy.qian@samsung.com>
25 <title>ApplicationManager_kill_errorCallback_invoked_InvalidValuesError</title>
26 <meta charset="utf-8">
27 <script src="support/unitcommon.js"></script>
28 <script src="support/app_common.js"></script>
33 //==== TEST: ApplicationManager_kill_errorCallback_invoked_InvalidValuesError
34 //==== LABEL Check exception in error callback of kill() method
35 //==== ONLOAD_DELAY 30
36 //==== SPEC Tizen Web API:Application:Application:ApplicationManager:kill M
37 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/application.html
39 //==== TEST_CRITERIA MERRCB
41 setup({timeout: 30000});
43 var t = async_test(document.title, {timeout: 30000}), killSuccess, killError, currentApplication;
46 killSuccess = t.step_func(function () {
47 assert_unreached("This function should not be used");
50 killError = t.step_func(function (error) {
51 assert_equals(error.name, "InvalidValuesError", "InvalidValuesError must be thrown");
55 currentApplication = tizen.application.getCurrentApplication();
57 tizen.application.kill(currentApplication.contextId, killSuccess, killError);