f366451d3c2b3925c8f6ea6ea5d4ca8e4b56f7ba
[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_eventCallback_invalid_cb</title>
31 <meta charset="utf-8">
32 <script type="text/javascript" src="../resources/unitcommon.js"></script>
33 </head>
34
35 <body>
36 <div id="log"></div>
37 <script type="text/javascript">
38
39 //==== TEST: ApplicationManager_addAppInfoEventListener_eventCallback_invalid_cb
40 //==== LABEL check if an exception was thrown when a fake callback was passed into addAppInfoEventListener method
41 //==== SPEC Tizen Web API:Application:Application:ApplicationManager:addAppInfoEventListener M
42 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/application.html
43 //==== PRIORITY P2
44 //==== TEST_CRITERIA MTL
45
46 test(function () {
47     var i, conversionTable = getListenerConversionExceptions(["oninstalled","onupdated","onuninstalled"]);
48
49     for (i = 0; i < conversionTable.length; i++) {
50         assert_throws({name: conversionTable[i][1]}, function () {
51             tizen.application.addAppInfoEventListener(conversionTable[i][0]);
52         }, "an exception should be thrown");
53     }
54
55 });
56
57 </script>
58 </body>
59 </html>