b40e192e5f066109bfd8564108a72d2352effbd1
[test/tct/web/api.git] /
1 <!DOCTYPE html>
2
3 <!--
4
5 Copyright (c) 2013 Samsung Electronics Co., Ltd.
6
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
10
11     http://www.apache.org/licenses/LICENSE-2.0
12
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.
18
19
20
21 Authors:
22         Mariusz Polasinski <m.polasinski@samsung.com>
23
24
25 -->
26
27 <html lang="en">
28
29 <head>
30 <title>ApplicationManager_addAppInfoEventListener_onuninstalled</title>
31 <meta charset="utf-8">
32 <script type="text/javascript" src="../resources/unitcommon.js"></script>
33 <script type="text/javascript" src="support/app_common.js"></script>
34 </head>
35
36 <body>
37 <div id="log"></div>
38 <script type="text/javascript">
39
40 //==== TEST: ApplicationManager_addAppInfoEventListener_onuninstalled
41 //==== LABEL check using addAppInfoEventListener method (deinstallation process) in ApplicationManager interface
42 //==== SPEC Tizen Web API:Application:Application:ApplicationManager:addAppInfoEventListener M
43 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/application.html
44 //==== PRE Make sure that TCTAppInfoEventTest1.wgt application is installed (you can install it from: My Files/Phone/Others).
45 //==== STEP Click run and then uninstall TCTAppInfoEventTest1.wgt application, finally look at the results
46 //==== EXPECT listener was added with successfully
47 //==== EXECUTION_TYPE manual
48 //==== PRIORITY P1
49 //==== TEST_CRITERIA MMINA MAST MR
50
51 setup({timeout: 90000});
52
53 var this_test = async_test("ApplicationManager_addAppInfoEventListener_onuninstalled", {timeout: 90000});
54 this_test.step(function() {
55     var appEventCallback, watchId;
56
57     appEventCallback = {
58         oninstalled: this_test.step_func(function() {
59             assert_unreached("This function (onupdated) should not be used");
60         }),
61         onupdated: this_test.step_func(function() {
62             assert_unreached("This function (onupdated) should not be used");
63         }),
64         onuninstalled: this_test.step_func(function() {
65             this_test.done();
66         })
67     };
68
69     watchId = tizen.application.addAppInfoEventListener(appEventCallback);
70     assert_type(watchId, "number", "wrong listener ID");
71 });
72
73 </script>
74 </body>
75 </html>