4 Copyright (c) 2013 Samsung Electronics Co., Ltd.
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
10 http://www.apache.org/licenses/LICENSE-2.0
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.
21 Tomasz Kusmierz <t.kusmierz@samsung.com>
26 <title>SystemInfoPropertySuccessCallback_onsuccess_CellularNetwork</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>
34 //==== TEST: SystemInfoPropertySuccessCallback_onsuccess_CellularNetwork
35 //==== LABEL Check if getPropertyValue('CELLULAR_NETWORK', 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
41 var t = async_test(document.title, {timeout: 90000}),
42 getPropertyValueSuccess, getPropertyValueError;
43 setup({timeout: 90000});
45 getPropertyValueSuccess = t.step_func(function (cellularnetwork) {
46 assert_type(cellularnetwork.status, "string", "status type check");
47 assert_type(cellularnetwork.ipAddress, "string", "ipAddress type check");
48 assert_type(cellularnetwork.ipv6Address, "string", "ipv6Address type check");
49 assert_type(cellularnetwork.apn, "string", "apn type check");
50 assert_type(cellularnetwork.mcc, "unsigned short", "mcc type check");
51 assert_type(cellularnetwork.mnc, "unsigned short", "mnc type check");
52 assert_type(cellularnetwork.lac, "unsigned short", "lac type check");
53 assert_type(cellularnetwork.cellId, "unsigned short", "cellId type check");
54 assert_type(cellularnetwork.isRoaming, "boolean", "isRoaming type check");
55 assert_type(cellularnetwork.isFlightMode, "boolean", "isFlightMode type check");
56 assert_type(cellularnetwork.imei, "string", "imei type check");
59 getPropertyValueError = t.step_func(function (error) {
60 assert_unreached("getPropertyValue() error callback invoked: name: " +
61 error.name + ", msg: " + error.message);
64 tizen.systeminfo.getPropertyValue("CELLULAR_NETWORK", getPropertyValueSuccess,
65 getPropertyValueError);