8497854094ae9cc2c202239dfb30ef1e4b847ca1
[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         Tomasz Kusmierz <t.kusmierz@samsung.com>
22
23 -->
24 <html>
25 <head>
26 <title>SystemInfoPropertySuccessCallback_onsuccess_WifiNetwork</title>
27 <meta charset="utf-8">
28 <script type="text/javascript" src="support/unitcommon.js"></script>
29 <script type="text/javascript" src="support/systeminfo_common.js"></script>
30 </head>
31 <body>
32 <div id="log"></div>
33 <script>
34 //==== TEST: SystemInfoPropertySuccessCallback_onsuccess_WifiNetwork
35 //==== LABEL Check if getPropertyValue('WifiNetwork', successCB, errorCB) calls successCallback + results' attributes
36 //==== SPEC Tizen Web API:System:SystemInfo:SystemInfoPropertySuccessCallback:onsuccess M
37 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/systeminfo.html
38 //==== TEST_CRITERIA CBT CBOA
39 //==== ONLOAD_DELAY 90
40
41 var t = async_test(document.title, {timeout: 90000}),
42     getPropertyValueSuccess, getPropertyValueError;
43 setup({timeout: 90000});
44 t.step(function () {
45     getPropertyValueSuccess = t.step_func(function (wifinetwork) {
46         assert_type(wifinetwork.status, "string", "status type check");
47         assert_type(wifinetwork.ipAddress, "string", "ipAddress type check");
48         assert_type(wifinetwork.ipv6Address, "string", "ipv6Address type check");
49         assert_type(wifinetwork.ssid, "string", "ssid type check");
50         assert_type(wifinetwork.signalStrength, "double", "signalStrength type check");
51         t.done();
52     });
53     getPropertyValueError = t.step_func(function (error) {
54         assert_unreached("getPropertyValue() error callback invoked: name: " +
55             error.name + ", msg: " + error.message);
56     });
57
58     tizen.systeminfo.getPropertyValue("WIFI_NETWORK", getPropertyValueSuccess,
59         getPropertyValueError);
60 });
61
62 </script>
63 </body>
64 </html>