3 Copyright (c) 2014 Samsung Electronics Co., Ltd.
5 Licensed under the Apache License, Version 2.0 (the License);
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
9 http://www.apache.org/licenses/LICENSE-2.0
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
18 Wei Zhang <wei625.zhang@samsung.com>
23 <title>SystemInfoStorageUnit_isRemovable_attribute_value</title>
24 <meta charset="utf-8"/>
25 <script src="support/unitcommon.js"></script>
26 <script src="support/systeminfo_common.js"></script>
31 //==== TEST: SystemInfoStorageUnit_isRemovable_attribute_value
32 //==== LABEL Check SystemInfoStorageUnit have attribute isRemovable and has proper value limitations
33 //==== ONLOAD_DELAY 90
34 //==== SPEC Tizen Web API:System:SystemInfo:SystemInfoStorageUnit:isRemovable A
35 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/systeminfo.html
37 //==== TEST_CRITERIA AE AT AVL
39 setup({timeout: 90000});
41 var t = async_test(document.title, {timeout: 90000}), getPropertyValueSuccess, getPropertyValueError;
44 getPropertyValueSuccess = t.step_func(function (property) {
45 assert_own_property(property, "units", "No units property.");
46 assert_true(Array.isArray(property.units), "SystemInfoStorage_units is not an array");
47 assert_greater_than(property.units.length, 0, "No available units.");
48 assert_own_property(property.units[0], "isRemovable", "SystemInfoStorageUnit does not own isRemovable property.");
49 assert_true(property.units[0].isRemovable === true || property.units[0].isRemovable === false, "check isRemovable");
53 getPropertyValueError = t.step_func(function (error) {
54 assert_unreached("getPropertyValue() error callback invoked: name: " +
55 error.name + ", msg: " + error.message);
58 tizen.systeminfo.getPropertyValue("STORAGE", getPropertyValueSuccess, getPropertyValueError);