5 Copyright (c) 2013 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.
22 Mariusz Polasinski <m.polasinski@samsung.com>
30 <title>ApplicationInformationEventCallback_onuninstalled</title>
31 <meta charset="utf-8">
32 <script type="text/javascript" src="support/unitcommon.js"></script>
33 <script type="text/javascript" src="support/app_common.js"></script>
38 <script type="text/javascript">
40 //==== TEST: ApplicationInformationEventCallback_onuninstalled
41 //==== LABEL Check argument passed into method which is onuninstalled listener in ApplicationInformationEventCallback
42 //==== SPEC Tizen Web API:Application:Application:ApplicationInformationEventCallback:onuninstalled M
43 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/application.html
44 //==== PRE Make sure that TCTAppInfoEventTest1 application is installed (you can install it from My files app (Phone/Others directory)).
45 //==== STEP Click run and uninstall TCTAppInfoEventTest1 application.
47 //==== EXECUTION_TYPE manual
49 //==== TEST_CRITERIA CBT CBOA
51 setup({timeout: 300000});
53 var t = async_test(document.title, {timeout: 300000}), appEventCallback, watchId;
58 oninstalled: t.step_func(function () {
59 assert_unreached("This function (oninstalled) should not be used");
61 onupdated: t.step_func(function () {
62 assert_unreached("This function (onupdated) should not be used");
64 onuninstalled: t.step_func(function (appId) {
65 assert_type(appId, "string", "wrong type of received value");
66 assert_equals(appId, APP_INFO_TEST_APP_ID, "wrong ApplicationId was returned");
71 watchId = tizen.application.addAppInfoEventListener(appEventCallback);
72 assert_type(watchId, "long", "wrong listener ID");