521ebbe31576eb5a7cae4dca8749f7f1cd17b024
[test/tct/web/api.git] /
1 <!DOCTYPE html>
2 <!--
3
4 Copyright (c) 2013 Samsung Electronics Co., Ltd.
5
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
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
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.
17
18
19
20 Authors:
21 Roman Frolow <r.frolow@samsung.com>
22
23 -->
24
25 <html>
26 <head>
27 <title>SystemInfo_addPropertyValueChangeListener_successCallback_TypeMismatch</title>
28 <script src="../resources/unitcommon.js"></script>
29 </head>
30 <body>
31 <div id="log"></div>
32 <script type="text/javascript">
33
34 //==== TEST: SystemInfo_addPropertyValueChangeListener_successCallback_TypeMismatch
35 //==== LABEL Check argument successCallback conversions exception
36 //==== PRIORITY: P2
37 //==== ONLOAD_DELAY 90
38 //==== SPEC Tizen Web API:System:SystemInfo:SystemInfo:addPropertyValueChangeListener M
39 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/systeminfo.html
40 //==== TEST_CRITERIA MC
41 setup({timeout: 90000});
42
43 var t = async_test("SystemInfo_addPropertyValueChangeListener_successCallback_TypeMismatch", {timeout: 90000}), addPropertyValueChangeListenerSuccess, exceptionName, i, conversionTable;
44
45 t.step(function () {
46     conversionTable = getTypeConversionExceptions("functionObject", false);
47
48     for(i = 0; i < conversionTable.length; i++) {
49         addPropertyValueChangeListenerSuccess = conversionTable[i][0];
50         exceptionName = conversionTable[i][1];
51
52         assert_throws({name : exceptionName},
53             function () {
54                 tizen.systeminfo.addPropertyValueChangeListener("STORAGE", addPropertyValueChangeListenerSuccess);
55             }, exceptionName + " should be thrown - given incorrect success callback.");
56     }
57     t.done();
58 });
59 </script>
60 </body>
61 </html>