[tv][bluetooth] get capability from system info api 35/309835/1
authorchen <chen89.chen@samsung.com>
Wed, 17 Apr 2024 06:13:22 +0000 (14:13 +0800)
committerchen <chen89.chen@samsung.com>
Wed, 17 Apr 2024 06:13:45 +0000 (14:13 +0800)
Change-Id: I9b984ae73336a90370910e15f6db03dec094aa54
Signed-off-by: chen <chen89.chen@samsung.com>
459 files changed:
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapterChangeCallback_notexist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapterChangeCallback_onnamechanged.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapterChangeCallback_onstatechanged.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapterChangeCallback_onvisibilitychanged.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_address_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_createBonding.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_createBonding_bondingDevice.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_createBonding_callback_onerror.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_createBonding_deviceaddress_correct.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_createBonding_devicebonded.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_createBonding_devicename_correct.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_createBonding_deviceuuid_correct.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_createBonding_errorCallback_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_createBonding_errorCallback_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_createBonding_exist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_createBonding_missarg.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_createBonding_successCallback_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_createBonding_successCallback_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_createBonding_with_errorCallback.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_createBonding_with_error_null_and_success_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_destroyBonding.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_destroyBonding_callback_onerror.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_destroyBonding_errorCallback_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_destroyBonding_errorCallback_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_destroyBonding_exist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_destroyBonding_successCallback_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_destroyBonding_successCallback_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_destroyBonding_with_errorCallback.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_destroyBonding_with_successCallback.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_destroyBonding_with_success_TypeMismatch_and_error_null.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_destroyBonding_with_success_null_and_error_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_discoverDevices.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_discoverDevices_callback_onerror.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_discoverDevices_callback_successful.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_discoverDevices_errorCallback_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_discoverDevices_errorCallback_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_discoverDevices_exist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_discoverDevices_invalid_callback_name.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_discoverDevices_missarg.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_discoverDevices_onfinish_successful.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_discoverDevices_onfound_deviceaddress.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_discoverDevices_onfound_devicename.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_discoverDevices_onfound_successful.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_discoverDevices_successCallback_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_discoverDevices_successCallback_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_discoverDevices_with_errorCallback.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_extend.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_function_type_check.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_getDevice.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_getDevice_callback_onerror.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_getDevice_errorCallback_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_getDevice_errorCallback_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_getDevice_exist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_getDevice_missarg.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_getDevice_successCallback_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_getDevice_successCallback_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_getDevice_with_errorCallback.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_getDevice_with_success_TypeMismatch_and_error_null.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_getKnownDevices.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_getKnownDevices_callback_onerror.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_getKnownDevices_callback_successful.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_getKnownDevices_check_types.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_getKnownDevices_errorCallback_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_getKnownDevices_errorCallback_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_getKnownDevices_exist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_getKnownDevices_missarg.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_getKnownDevices_successCallback_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_getKnownDevices_successCallback_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_getKnownDevices_success_TypeMismatch_error_null.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_getKnownDevices_with_errorCallback.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_name_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_notexist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_powered_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_registerRFCOMMServiceByUUID.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_registerRFCOMMServiceByUUID_errorCallback_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_registerRFCOMMServiceByUUID_errorCallback_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_registerRFCOMMServiceByUUID_exist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_registerRFCOMMServiceByUUID_missarg.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_registerRFCOMMServiceByUUID_onconnect_successful.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_registerRFCOMMServiceByUUID_onerror.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_registerRFCOMMServiceByUUID_successCallback_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_registerRFCOMMServiceByUUID_successCallback_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_registerRFCOMMServiceByUUID_with_errorCallback.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_registerRFCOMMServiceByUUID_with_success_TypeMismatch_and_error_null.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_setChangeListener.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_setChangeListener_exist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_setChangeListener_listener_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_setChangeListener_listener_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_setChangeListener_missarg.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_setName.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_setName_callback_error.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_setName_errorCallback_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_setName_errorCallback_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_setName_exist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_setName_longname.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_setName_successCallback_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_setName_successCallback_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_setName_with_errorCallback.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_setName_with_successCallback.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_setName_with_success_TypeMismatch_and_error_null.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_setName_with_success_null_and_error_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_stopDiscovery.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_stopDiscovery_callback_onerror.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_stopDiscovery_errorCallback_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_stopDiscovery_errorCallback_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_stopDiscovery_exist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_stopDiscovery_successCallback_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_stopDiscovery_successCallback_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_stopDiscovery_with_errorCallback.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_stopDiscovery_with_successCallback.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_unsetChangeListener.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_unsetChangeListener_exist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_unsetChangeListener_extra_argument.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_visible_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClass.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMajor_AUDIO_VIDEO_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMajor_COMPUTER_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMajor_HEALTH_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMajor_IMAGING_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMajor_MISC_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMajor_NETWORK_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMajor_PERIPHERAL_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMajor_PHONE_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMajor_TOY_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMajor_UNCATEGORIZED_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMajor_WEARABLE_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMajor_extend.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMajor_notexist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_AV_CAMCORDER_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_AV_CAR_AUDIO_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_AV_DISPLAY_AND_LOUDSPEAKER_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_AV_GAMING_TOY_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_AV_HANDSFREE_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_AV_HEADPHONES_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_AV_HIFI_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_AV_LOUDSPEAKER_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_AV_MICROPHONE_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_AV_MONITOR_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_AV_PORTABLE_AUDIO_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_AV_SETTOP_BOX_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_AV_UNRECOGNIZED_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_AV_VCR_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_AV_VIDEO_CAMERA_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_AV_VIDEO_CONFERENCING_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_AV_WEARABLE_HEADSET_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_COMPUTER_DESKTOP_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_COMPUTER_HANDHELD_PC_OR_PDA_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_COMPUTER_LAPTOP_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_COMPUTER_PALM_PC_OR_PDA_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_COMPUTER_SERVER_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_COMPUTER_UNCATEGORIZED_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_COMPUTER_WEARABLE_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_HEALTH_ANKLE_PROSTHESIS_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_HEALTH_BLOOD_PRESSURE_MONITOR_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_HEALTH_BODY_COMPOSITION_ANALYZER_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_HEALTH_DATA_DISPLAY_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_HEALTH_GLUCOSE_METER_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_HEALTH_KNEE_PROSTHESIS_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_HEALTH_MEDICATION_MONITOR_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_HEALTH_PEAK_FLOW_MONITOR_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_HEALTH_PULSE_OXIMETER_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_HEALTH_PULSE_RATE_MONITOR_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_HEALTH_STEP_COUNTER_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_HEALTH_THERMOMETER_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_HEALTH_UNDEFINED_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_HEALTH_WEIGHING_SCALE_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_IMAGING_CAMERA_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_IMAGING_DISPLAY_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_IMAGING_PRINTER_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_IMAGING_SCANNER_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_IMAGING_UNCATEGORIZED_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_PERIPHERAL_CARD_READER_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_PERIPHERAL_DEGITIZER_TABLET_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_PERIPHERAL_DIGITAL_PEN_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_PERIPHERAL_GAMEPAD_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_PERIPHERAL_HANDHELD_INPUT_DEVICE_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_PERIPHERAL_HANDHELD_SCANNER_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_PERIPHERAL_JOYSTICK_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_PERIPHERAL_KEYBOARD_AND_POINTING_DEVICE_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_PERIPHERAL_KEYBOARD_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_PERIPHERAL_POINTING_DEVICE_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_PERIPHERAL_REMOTE_CONTROL_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_PERIPHERAL_SENSING_DEVICE_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_PERIPHERAL_UNCATEGORIZED_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_PHONE_CELLULAR_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_PHONE_CORDLESS_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_PHONE_ISDN_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_PHONE_MODEM_OR_GATEWAY_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_PHONE_SMARTPHONE_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_PHONE_UNCATEGORIZED_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_TOY_CONTROLLER_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_TOY_DOLL_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_TOY_GAME_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_TOY_ROBOT_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_TOY_VEHICLE_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_WEARABLE_GLASSES_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_WEARABLE_HELMET_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_WEARABLE_JACKET_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_WEARABLE_PAGER_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_WEARABLE_WRITST_WATCH_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_extend.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceMinor_notexist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceService_AUDIO_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceService_CAPTURING_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceService_INFORMATION_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceService_LIMITED_DISCOVERABILITY_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceService_NETWORKING_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceService_OBJECT_TRANSFER_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceService_POSITIONING_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceService_RENDERING_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceService_TELEPHONY_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceService_extend.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClassDeviceService_notexist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClass_hasService.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClass_notexist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothDevice.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothDeviceArraySuccessCallback_notexist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothDeviceArraySuccessCallback_onsuccess.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothDeviceSuccessCallback_notexist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothDevice_connectToServiceByUUID.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothDevice_connectToServiceByUUID_onerror.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothDevice_connectToServiceByUUID_with_errorCallback.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothDevice_notexist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothDiscoverDevicesSuccessCallback_notexist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothDiscoverDevicesSuccessCallback_ondevicedisappeared.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothDiscoverDevicesSuccessCallback_ondevicefound.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothDiscoverDevicesSuccessCallback_onfinished.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothDiscoverDevicesSuccessCallback_onstarted.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTCharacteristic_addValueChangeListener.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTCharacteristic_addValueChangeListener_exist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTCharacteristic_descriptors_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTCharacteristic_extend.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTCharacteristic_hasExtendedProperties_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTCharacteristic_isBroadcast_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTCharacteristic_isIndication_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTCharacteristic_isNotify_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTCharacteristic_isReadable_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTCharacteristic_isSignedWrite_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTCharacteristic_isWritable_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTCharacteristic_isWriteNoResponse_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTCharacteristic_notexist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTCharacteristic_readValue.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTCharacteristic_readValue_InvalidStateError.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTCharacteristic_readValue_errorCallback_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTCharacteristic_readValue_errorCallback_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTCharacteristic_readValue_exist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTCharacteristic_readValue_noarg.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTCharacteristic_readValue_successCallback_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTCharacteristic_readValue_successCallback_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTCharacteristic_readValue_with_errorCallback.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTCharacteristic_removeValueChangeListener.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTCharacteristic_removeValueChangeListener_exist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTCharacteristic_uuid_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTCharacteristic_writeValue.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTCharacteristic_writeValue_InvalidStateError.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTCharacteristic_writeValue_data_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTCharacteristic_writeValue_errorCallback_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTCharacteristic_writeValue_errorCallback_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTCharacteristic_writeValue_exist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTCharacteristic_writeValue_noarg.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTCharacteristic_writeValue_successCallback_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTCharacteristic_writeValue_successCallback_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTCharacteristic_writeValue_with_errorCallback.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTCombined.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTDescriptor_extend.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTDescriptor_notexist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTDescriptor_readValue.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTDescriptor_readValue_InvalidStateError.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTDescriptor_readValue_errorCallback_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTDescriptor_readValue_errorCallback_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTDescriptor_readValue_exist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTDescriptor_readValue_misarg.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTDescriptor_readValue_successCallback_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTDescriptor_readValue_successCallback_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTDescriptor_readValue_with_errorCallback.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTDescriptor_uuid_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTDescriptor_writeValue.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTDescriptor_writeValue_InvalidStateError.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTDescriptor_writeValue_errorCallback_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTDescriptor_writeValue_errorCallback_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTDescriptor_writeValue_exist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTDescriptor_writeValue_misarg.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTDescriptor_writeValue_successCallback_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTDescriptor_writeValue_successCallback_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTDescriptor_writeValue_value_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTDescriptor_writeValue_with_errorCallback.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTService_characteristics_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTService_serviceUuid_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothGATTService_services_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdapter_extend.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdapter_notexist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdapter_startAdvertise.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdapter_startAdvertise_InvalidStateError.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdapter_startAdvertise_QuotaExceededError.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdapter_startAdvertise_QuotaPatameterError.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdapter_startAdvertise_advertiseData_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdapter_startAdvertise_connectable_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdapter_startAdvertise_errorCallback_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdapter_startAdvertise_errorCallback_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdapter_startAdvertise_exist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdapter_startAdvertise_misarg.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdapter_startAdvertise_mode_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdapter_startAdvertise_packetType_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdapter_startAdvertise_successCallback_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdapter_startAdvertise_successCallback_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdapter_startAdvertise_with_connectable.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdapter_startScan.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdapter_startScan_InvalidStateError.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdapter_startScan_errorCallback_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdapter_startScan_errorCallback_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdapter_startScan_exist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdapter_startScan_misarg.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdapter_startScan_successCallback_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdapter_startScan_successCallback_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdapter_startScan_with_errorCallback.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdapter_stopAdvertise.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdapter_stopAdvertise_exist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdapter_stopAdvertise_extra_argument.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdapter_stopScan.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdapter_stopScan_exist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdapter_stopScan_extra_argument.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdvertiseCallback_notexist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdvertiseCallback_onstate.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdvertiseData_appearance_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdvertiseData_constructor.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdvertiseData_exist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdvertiseData_extend.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdvertiseData_includeName_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdvertiseData_includeTxPowerLevel_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdvertiseData_manufacturerData_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdvertiseData_servicesData_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdvertiseData_solicitationuuids_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAdvertiseData_uuids_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEAttributes.html [changed mode: 0644->0755]
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEConnectChangeCallback_connection.html [changed mode: 0644->0755]
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEConnectChangeCallback_notexist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEConnectChangeCallback_onconnected.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEConnectChangeCallback_ondisconnected.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_addConnectStateChangeListener.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_addConnectStateChangeListener_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_addConnectStateChangeListener_exist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_addConnectStateChangeListener_listener_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_addConnectStateChangeListener_missarg.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_addremoveConnectStateChangeListener_combined.html [changed mode: 0644->0755]
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_address_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_appearance_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_connect.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_connect_combined.html [changed mode: 0644->0755]
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_connect_errorCallback_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_connect_errorCallback_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_connect_exist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_connect_successCallback_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_connect_successCallback_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_connect_with_errorcallback.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_disconnect.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_disconnect_InvalidStateError.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_disconnect_combined.html [changed mode: 0644->0755]
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_disconnect_errorCallback_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_disconnect_errorCallback_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_disconnect_exist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_disconnect_successCallback_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_disconnect_successCallback_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_disconnect_with_errorCallback.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_extend.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_getService.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_getServiceAllUuids.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_getServiceAllUuids_exist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_getServiceAllUuids_extra_argument.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_getService_NotFoundError.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_getService_combined.html [changed mode: 0644->0755]
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_getService_exist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_getService_misarg.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_includeName_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_includeTxPowerLevel_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_manufacturerData_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_name_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_notexist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_removeConnectStateChangeListener.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_removeConnectStateChangeListener_exist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_rssi_attribute.html [changed mode: 0644->0755]
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_serviceData_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_solicitationuuids_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_txPowerLevel_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEDevice_uuids_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEManufacturerData_data_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEManufacturerData_extend.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEManufacturerData_id_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEScanCallback_notexist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEScanCallback_ondevicefound.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEScanCallback_onfinished.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEScanCallback_onsuccess.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEServiceData_data_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEServiceData_extend.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothLEServiceData_uuid_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothManagerObject_bluetooth_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothManagerObject_notexist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothManager_BASE_UUID_const.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothManager_deviceMajor_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothManager_deviceMinor_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothManager_deviceService_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothManager_extend.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothManager_getDefaultAdapter.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothManager_getDefaultAdapter_exist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothManager_getDefaultAdapter_extra_argument.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothManager_getLEAdapter.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothManager_getLEAdapter_exist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothManager_getLEAdapter_extra_argument.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothManager_in_tizen.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothManager_notexist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothManager_toByteArray.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothManager_toByteArray_exist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothManager_toByteArray_misarg.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothManager_toDOMString.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothManager_toDOMString_exist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothManager_toDOMString_misarg.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothManager_toUint8Array.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothManager_toUint8Array_exist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothManager_toUint8Array_misarg.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothManager_uuidTo128bit.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothManager_uuidTo128bit_exist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothManager_uuidTo128bit_misarg.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothManager_uuidToShortestPossible.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothManager_uuidToShortestPossible_exist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothManager_uuidToShortestPossible_misarg.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothManager_uuidsEqual.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothManager_uuidsEqual_exist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothManager_uuidsEqual_misarg.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothServiceHandler_extend.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothServiceHandler_isConnected_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothServiceHandler_name_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothServiceHandler_notexist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothServiceHandler_onconnect_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothServiceHandler_unregister.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothServiceHandler_unregister_errorCallback_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothServiceHandler_unregister_errorCallback_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothServiceHandler_unregister_exist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothServiceHandler_unregister_successCallback_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothServiceHandler_unregister_successCallback_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothServiceHandler_unregister_unregisterServiceRecord.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothServiceHandler_unregister_with_errorCallback.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothServiceHandler_unregister_with_successCallback.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothServiceHandler_uuid_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothServiceSuccessCallback_notexist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothServiceSuccessCallback_onsuccess.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothSocket.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothSocketState_open_enum.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothSocketSuccessCallback_notexist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothSocket_close.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothSocket_notexist.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothSocket_onclose_callback.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothSocket_onmessage_callback.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothSocket_readData.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothSocket_writeData.html
common/tct-bluetooth-tizen-tests/bluetooth/Bluetooth_discoverDevices_successCallback_invalidcb.html
common/tct-bluetooth-tizen-tests/bluetooth/ReadValueSuccessCallback_notexist.html
common/tct-bluetooth-tizen-tests/bluetooth/ReadValueSuccessCallback_onread.html
common/tct-bluetooth-tizen-tests/bluetooth/support/unitcommon.js
common/tct-bluetooth-tizen-tests/tests.full.xml
common/tct-bluetooth-tizen-tests/tests.xml

index ccbe278982cf155798cb4b889f64804c797ffbbf..d161d285dc6a309531a980fc509e0877380040b7 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Witold Choinkowski <w.choinkowsk@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
 
 -->
 <html>
@@ -38,7 +38,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CBNIO
 test(function () {
-    check_no_interface_object("BluetoothAdapterChangeCallback");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_no_interface_object("BluetoothAdapterChangeCallback");
+    }
 }, document.title);
 
 </script>
index 005fc9822453af481be01e3e320b52e8ec798e37..c89fcc19f15e7b7616a909ee14594b6381965a65 100755 (executable)
@@ -18,8 +18,8 @@ limitations under the License.
 
 
 Authors:
-        Witold Choinkowski <w.choinkowsk@samsung.com>
-        ByungWoo Lee <bw1212.lee@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
+ByungWoo Lee <bw1212.lee@samsung.com>
 
 -->
 <html>
@@ -41,28 +41,33 @@ Authors:
 setup({timeout: 180000});
 var powerOnSuccess, adapter, listener, t = async_test(document.title, {timeout: 180000}), testName;
 t.step(function () {
-    listener = {
-        onstatechanged: t.step_func(function (powered) {
-        }),
-        onnamechanged: t.step_func(function (name) {
-            assert_type(name, "string", "Argument name has wrong type.");
-            if (name === testName) {
-                adapter.unsetChangeListener();
-                t.done();
-            }
-        }),
-        onvisibilitychanged: t.step_func(function (visible) {
-        })
-    };
+    if (BT_SUPPORT) { // network.bluetooth support
+        listener = {
+            onstatechanged: t.step_func(function (powered) {
+            }),
+            onnamechanged: t.step_func(function (name) {
+                assert_type(name, "string", "Argument name has wrong type.");
+                if (name === testName) {
+                    adapter.unsetChangeListener();
+                    t.done();
+                }
+            }),
+            onvisibilitychanged: t.step_func(function (visible) {
+            })
+        };
 
-    powerOnSuccess = t.step_func(function () {
-        adapter.setChangeListener(listener);
-        testName = adapter.name + "_changed";
-        adapter.setName(testName);
-    });
+        powerOnSuccess = t.step_func(function () {
+            adapter.setChangeListener(listener);
+            testName = adapter.name + "_changed";
+            adapter.setName(testName);
+        });
 
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
+        adapter = tizen.bluetooth.getDefaultAdapter();
+        setPowered(t, adapter, powerOnSuccess);
+
+    } else {
+        t.done();
+    }
 });
 
 </script>
index 6012200a3361aebd3af38956a09c6a8f18e1df0c..a0feba9a884e9ee41dc391d3f8862743c976ab26 100755 (executable)
@@ -1,70 +1,76 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Witold Choinkowski <w.choinkowsk@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapterChangeCallback_onstatechanged</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapterChangeCallback_onstatechanged
-//==== LABEL Check onstatechanged listener is invoked after turn bluetooth off
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapterChangeCallback:onstatechanged M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth/visible of the test device MUST be turned on.
-//==== STEP Turn off Bluetooth after run.
-//==== EXPECT all subtests should be successful
-//==== TEST_CRITERIA CBT CBOA
-
-setup({timeout: 180000});
-
-var adapter, listener, value, t = async_test(document.title, {timeout: 180000});
-t.step(function () {
-    listener = {
-        onstatechanged: t.step_func(function (powered) {
-            assert_type(powered, "boolean", "Argument powered has wrong type.");
-            assert_equals(powered, value, "Argument powered has wrong value.");
-            adapter.unsetChangeListener();
-            t.done();
-        }),
-        onnamechanged: t.step_func(function (name) {
-        }),
-        onvisibilitychanged: t.step_func(function (visible) {
-        })
-    };
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    value = !adapter.powered;
-    adapter.setChangeListener(listener);
-
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Witold Choinkowski <w.choinkowsk@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapterChangeCallback_onstatechanged</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapterChangeCallback_onstatechanged\r
+//==== LABEL Check onstatechanged listener is invoked after turn bluetooth off\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapterChangeCallback:onstatechanged M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth/visible of the test device MUST be turned on.\r
+//==== STEP Turn off Bluetooth after run.\r
+//==== EXPECT all subtests should be successful\r
+//==== TEST_CRITERIA CBT CBOA\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter, listener, value, t = async_test(document.title, {timeout: 180000});\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        listener = {\r
+            onstatechanged: t.step_func(function (powered) {\r
+                assert_type(powered, "boolean", "Argument powered has wrong type.");\r
+                assert_equals(powered, value, "Argument powered has wrong value.");\r
+                adapter.unsetChangeListener();\r
+                t.done();\r
+            }),\r
+            onnamechanged: t.step_func(function (name) {\r
+            }),\r
+            onvisibilitychanged: t.step_func(function (visible) {\r
+            })\r
+        };\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        value = !adapter.powered;\r
+        adapter.setChangeListener(listener);\r
+\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index e8ecd466863aedf0e43b84067da8830b5b775ad1..5ba64736ae8967e95633d686ab791ea4a58beeb4 100755 (executable)
@@ -1,67 +1,73 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Witold Choinkowski <w.choinkowsk@samsung.com>
-        ByungWoo Lee <bw1212.lee@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapterChangeCallback_onvisibilitychanged</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapterChangeCallback_onvisibilitychanged
-//==== LABEL Check onvisibilitychanged listener is invoked after change bluetooth visible state
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapterChangeCallback:onvisibilitychanged M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth/visible of the test device MUST be turned on.
-//==== STEP Change bluetooth visible to "Off".
-//==== EXPECT all subtests should be successful
-//==== TEST_CRITERIA CBT CBOA
-setup({timeout: 180000});
-var powerOnSuccess, adapter, listener, value, t = async_test(document.title, {timeout: 180000});
-t.step(function () {
-    listener = {
-        onstatechanged: t.step_func(function (powered) {
-        }),
-        onnamechanged: t.step_func(function (name) {
-        }),
-        onvisibilitychanged: t.step_func(function (visible) {
-            assert_type(visible, "boolean", "Argument visible has wrong type.");
-            assert_equals(visible, value, "Argument visible has wrong value.");
-            adapter.unsetChangeListener();
-            t.done();
-        })
-    };
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    value = !adapter.visible;
-    adapter.setChangeListener(listener);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Witold Choinkowski <w.choinkowsk@samsung.com>\r
+ByungWoo Lee <bw1212.lee@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapterChangeCallback_onvisibilitychanged</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapterChangeCallback_onvisibilitychanged\r
+//==== LABEL Check onvisibilitychanged listener is invoked after change bluetooth visible state\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapterChangeCallback:onvisibilitychanged M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth/visible of the test device MUST be turned on.\r
+//==== STEP Change bluetooth visible to "Off".\r
+//==== EXPECT all subtests should be successful\r
+//==== TEST_CRITERIA CBT CBOA\r
+setup({timeout: 180000});\r
+var powerOnSuccess, adapter, listener, value, t = async_test(document.title, {timeout: 180000});\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        listener = {\r
+            onstatechanged: t.step_func(function (powered) {\r
+            }),\r
+            onnamechanged: t.step_func(function (name) {\r
+            }),\r
+            onvisibilitychanged: t.step_func(function (visible) {\r
+                assert_type(visible, "boolean", "Argument visible has wrong type.");\r
+                assert_equals(visible, value, "Argument visible has wrong value.");\r
+                adapter.unsetChangeListener();\r
+                t.done();\r
+            })\r
+        };\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        value = !adapter.visible;\r
+        adapter.setChangeListener(listener);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index e9a0b7d767ac429f9cfebc0c8698d227e72d875c..0bda8963067ef0b1c54c45ec64eaa04f7620fe8b 100755 (executable)
@@ -26,7 +26,7 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
+Lei, ZhanX <zhanx.lei@intel.com>
 
 -->
 <html>
@@ -47,9 +47,11 @@ Authors:
 //==== TEST_CRITERIA AE AT ARO
 var adapter = null;
 test(function () {
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    check_readonly(adapter, "address", adapter.address, "string", "Tizen");
-}, document.title);
+      if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+adapter = tizen.bluetooth.getDefaultAdapter();
+check_readonly(adapter, "address", adapter.address, "string", "Tizen");
+      }
+    }, document.title);
 
 </script>
 </body>
index 20723312057e7350e351b68f7c5070665d110d2f..37743eec47762645cc110252067e86e811b35abd 100755 (executable)
@@ -1,70 +1,74 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_createBonding</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_createBonding
-//==== LABEL Check with non-optional arguments createBonding(valid_address, valid_successCallback)
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MMINA MAST MR
-
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}), createBondingSuccess,
-    powerOnSuccess, retValue = null;
-t.step(function () {
-
-    add_result_callback(function() {
-        clearBonding(REMOTE_DEVICE_ADDRESS);
-    });
-
-    createBondingSuccess = t.step_func(function (device) {
-        check_bluetooth_device(device);
-        assert_equals(retValue, undefined, "createBonding returns wrong value");
-        t.done();
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter = tizen.bluetooth.getDefaultAdapter();
-        retValue = adapter.createBonding(REMOTE_DEVICE_ADDRESS, createBondingSuccess);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_createBonding</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_createBonding\r
+//==== LABEL Check with non-optional arguments createBonding(valid_address, valid_successCallback)\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MMINA MAST MR\r
+\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), createBondingSuccess,\r
+    powerOnSuccess, retValue = null;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      add_result_callback(function () {\r
+            clearBonding(REMOTE_DEVICE_ADDRESS);\r
+        });\r
+\r
+        createBondingSuccess = t.step_func(function (device) {\r
+            check_bluetooth_device(device);\r
+            assert_equals(retValue, undefined, "createBonding returns wrong value");\r
+            t.done();\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter = tizen.bluetooth.getDefaultAdapter();\r
+            retValue = adapter.createBonding(REMOTE_DEVICE_ADDRESS, createBondingSuccess);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index c81f7b6664a80b778c48607c6f8ef821011a4edc..f3af024bc81bb3342be63cc3b56c5754f198c19d 100755 (executable)
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
-  may be used to endorse or promote products derived from this work without
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_createBonding_bondingDevice</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_createBonding_bondingDevice
-//==== LABEL Check using createBonding method which is in BluetoothAdapter interface to bond device
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MOA
-setup({timeout: 180000});
-//  discoverDevices, createBonding, destroyBonding methods in BluetoothAdapter interface usage test
-var adapter = null, t = async_test(document.title, {timeout: 180000}), discoverDevicesSuccessCallback,
-    destroyBondingSuccess, destroyBondingError, onBondingSuccess, onBondingError, discoverDevicesError,
-    stopDiscoverySuccess;
-t.step(function () {
-
-    add_result_callback(function() {
-        clearBonding(REMOTE_DEVICE_ADDRESS);
-    });
-
-    discoverDevicesSuccessCallback = {
-        onstarted: t.step_func (function () {
-        }),
-        ondevicefound:  t.step_func (function (device) {
-        }),
-        ondevicedisappeared:  t.step_func (function (address) {
-        }),
-        onfinished:  t.step_func (function (devices) {
-            if (devices.length > 0) {
-                adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
-            } else {
-                setTimeout(setstopDiscoverySuccess, 1000);
-            }
-        })
-    };
-
-    destroyBondingSuccess = t.step_func(function () {
-        t.done();
-    });
-
-    destroyBondingError = t.step_func(function (e) {
-        assert_unreached("destroyBondingError exception:" + e.message);
-    });
-
-    onBondingSuccess = t.step_func(function (device) {
-        adapter.destroyBonding(REMOTE_DEVICE_ADDRESS, destroyBondingSuccess, destroyBondingError);
-    });
-
-    onBondingError = t.step_func(function (e) {
-        assert_unreached("onBondingError exception:" + e.message);
-    });
-
-    discoverDevicesError = t.step_func(function (e) {
-        assert_unreached("discoverDevicesError exception:" + e.message);
-    });
-
-    stopDiscoverySuccess = t.step_func(function () {
-        adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+  this list of conditions and the following disclaimer in the documentation\r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+  may be used to endorse or promote products derived from this work without\r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_createBonding_bondingDevice</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_createBonding_bondingDevice\r
+//==== LABEL Check using createBonding method which is in BluetoothAdapter interface to bond device\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MOA\r
+setup({timeout: 180000});\r
+//  discoverDevices, createBonding, destroyBonding methods in BluetoothAdapter interface usage test\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), discoverDevicesSuccessCallback,\r
+    destroyBondingSuccess, destroyBondingError, onBondingSuccess, onBondingError, discoverDevicesError,\r
+    stopDiscoverySuccess;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      add_result_callback(function () {\r
+            clearBonding(REMOTE_DEVICE_ADDRESS);\r
+        });\r
+\r
+        discoverDevicesSuccessCallback = {\r
+            onstarted: t.step_func(function () {\r
+            }),\r
+            ondevicefound: t.step_func(function (device) {\r
+            }),\r
+            ondevicedisappeared: t.step_func(function (address) {\r
+            }),\r
+            onfinished: t.step_func(function (devices) {\r
+                if (devices.length > 0) {\r
+                    adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+                } else {\r
+                    setTimeout(setstopDiscoverySuccess, 1000);\r
+                }\r
+            })\r
+        };\r
+\r
+        destroyBondingSuccess = t.step_func(function () {\r
+            t.done();\r
+        });\r
+\r
+        destroyBondingError = t.step_func(function (e) {\r
+            assert_unreached("destroyBondingError exception:" + e.message);\r
+        });\r
+\r
+        onBondingSuccess = t.step_func(function (device) {\r
+            adapter.destroyBonding(REMOTE_DEVICE_ADDRESS, destroyBondingSuccess, destroyBondingError);\r
+        });\r
+\r
+        onBondingError = t.step_func(function (e) {\r
+            assert_unreached("onBondingError exception:" + e.message);\r
+        });\r
+\r
+        discoverDevicesError = t.step_func(function (e) {\r
+            assert_unreached("discoverDevicesError exception:" + e.message);\r
+        });\r
+\r
+        stopDiscoverySuccess = t.step_func(function () {\r
+            adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index f2fbacc018873b5f21bf4c6325be93ddf6a1a69a..3758a72f48aa10acc80d02484467dfbb1775c107 100755 (executable)
@@ -1,71 +1,77 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification, 
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list 
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice, 
-  this list of conditions and the following disclaimer in the documentation 
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors 
-  may be used to endorse or promote products derived from this work without 
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
-  
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_createBonding_callback_onerror</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_createBonding_callback_onerror
-//==== LABEL Check if error callback of createBonding method invoked
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the test device MUST be turned off.
-//==== TEST_CRITERIA MERRCB
-setup({timeout: 180000});
-
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOffSuccess, onBondingError, onBondingSuccess;
-t.step(function (){
-
-    onBondingSuccess = t.step_func(function (device) {
-        assert_unreached("Method createBonding shouldn't end successful.");
-    });
-
-    onBondingError = t.step_func(function (e) {
-        assert_equals(e.name, "ServiceNotAvailableError", "Wrong value of error name in createBonding.");
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);    
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification, \r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list \r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice, \r
+  this list of conditions and the following disclaimer in the documentation \r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors \r
+  may be used to endorse or promote products derived from this work without \r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" \r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE \r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE \r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, \r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, \r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, \r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY \r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING \r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, \r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  \r
+  \r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_createBonding_callback_onerror</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_createBonding_callback_onerror\r
+//==== LABEL Check if error callback of createBonding method invoked\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the test device MUST be turned off.\r
+//==== TEST_CRITERIA MERRCB\r
+setup({timeout: 180000});\r
+\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOffSuccess, onBondingError, onBondingSuccess;\r
+t.step(function () {\r
+      if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+\r
+onBondingSuccess = t.step_func(function (device) {\r
+  assert_unreached("Method createBonding shouldn't end successful.");\r
+});\r
+\r
+onBondingError = t.step_func(function (e) {\r
+  assert_equals(e.name, "ServiceNotAvailableError", "Wrong value of error name in createBonding.");\r
+  t.done();\r
+});\r
+\r
+adapter = tizen.bluetooth.getDefaultAdapter();\r
+adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+\r
+      } else {\r
+t.done();\r
+      }\r
+    });\r
+\r
+</script>\r
+</body>\r
+</html>\r
index ddda24f104d3ab1ee7db5949acea13657c6387b9..eb9efe956a6cb00055a17ae6d6eb5f6af329c06d 100755 (executable)
@@ -1,80 +1,84 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
-  may be used to endorse or promote products derived from this work without
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_createBonding_deviceaddress_correct</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_createBonding_deviceaddress_correct
-//==== LABEL Check if device address is correct
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MOA
-
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, onBondingError, onBondingSuccess;
-t.step(function () {
-
-    add_result_callback(function() {
-        clearBonding(REMOTE_DEVICE_ADDRESS);
-    });
-
-    onBondingSuccess = t.step_func(function (device) {
-        assert_equals(device.address, REMOTE_DEVICE_ADDRESS, "device address in onBondingSuccess");
-        t.done();
-    });
-
-    onBondingError = t.step_func(function (e) {
-        assert_unreached("onBondingError exception " + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+  this list of conditions and the following disclaimer in the documentation\r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+  may be used to endorse or promote products derived from this work without\r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_createBonding_deviceaddress_correct</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_createBonding_deviceaddress_correct\r
+//==== LABEL Check if device address is correct\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MOA\r
+\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, onBondingError, onBondingSuccess;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      add_result_callback(function () {\r
+            clearBonding(REMOTE_DEVICE_ADDRESS);\r
+        });\r
+\r
+        onBondingSuccess = t.step_func(function (device) {\r
+            assert_equals(device.address, REMOTE_DEVICE_ADDRESS, "device address in onBondingSuccess");\r
+            t.done();\r
+        });\r
+\r
+        onBondingError = t.step_func(function (e) {\r
+            assert_unreached("onBondingError exception " + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index b539e3e0a54303156265b89e16650f767228c3c0..db1307253c977f131af38b619007a7cc4f3256f6 100755 (executable)
@@ -1,80 +1,84 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
-  may be used to endorse or promote products derived from this work without
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_createBonding_devicebonded</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_createBonding_devicebonded
-//==== LABEL Check if device is bonded
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MOA MAST
-
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, onBondingError, onBondingSuccess;
-t.step(function () {
-
-    add_result_callback(function() {
-        clearBonding(REMOTE_DEVICE_ADDRESS);
-    });
-
-    onBondingSuccess = t.step_func(function (device) {
-        assert_equals(device.address, REMOTE_DEVICE_ADDRESS, "device address in onBondingSuccess");
-        t.done();
-    });
-
-    onBondingError = t.step_func(function (e) {
-        assert_unreached("onBondingError exception " + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+  this list of conditions and the following disclaimer in the documentation\r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+  may be used to endorse or promote products derived from this work without\r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_createBonding_devicebonded</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_createBonding_devicebonded\r
+//==== LABEL Check if device is bonded\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MOA MAST\r
+\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, onBondingError, onBondingSuccess;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      add_result_callback(function () {\r
+            clearBonding(REMOTE_DEVICE_ADDRESS);\r
+        });\r
+\r
+        onBondingSuccess = t.step_func(function (device) {\r
+            assert_equals(device.address, REMOTE_DEVICE_ADDRESS, "device address in onBondingSuccess");\r
+            t.done();\r
+        });\r
+\r
+        onBondingError = t.step_func(function (e) {\r
+            assert_unreached("onBondingError exception " + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index e56c1a6cddd73ee75491be9418591bb2b65e8aa4..1fe74376216c248b4a00805796e467e8c114b28d 100755 (executable)
@@ -1,81 +1,85 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
-  may be used to endorse or promote products derived from this work without
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothAdapter_createBonding_devicename_correct</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_createBonding_devicename_correct
-//==== LABEL Check if device name is correct
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MOA MAST
-
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, onBondingError, onBondingSuccess;
-t.step(function () {
-
-    add_result_callback(function() {
-        clearBonding(REMOTE_DEVICE_ADDRESS);
-    });
-
-    onBondingSuccess = t.step_func(function (device) {
-        assert_equals(device.name, REMOTE_DEVICE_NAME, "device name in onBondingSuccess");
-        t.done();
-    });
-
-    onBondingError = t.step_func(function (e) {
-        assert_unreached("onBondingError exception " + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+  this list of conditions and the following disclaimer in the documentation\r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+  may be used to endorse or promote products derived from this work without\r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_createBonding_devicename_correct</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_createBonding_devicename_correct\r
+//==== LABEL Check if device name is correct\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MOA MAST\r
+\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, onBondingError, onBondingSuccess;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      add_result_callback(function () {\r
+            clearBonding(REMOTE_DEVICE_ADDRESS);\r
+        });\r
+\r
+        onBondingSuccess = t.step_func(function (device) {\r
+            assert_equals(device.name, REMOTE_DEVICE_NAME, "device name in onBondingSuccess");\r
+            t.done();\r
+        });\r
+\r
+        onBondingError = t.step_func(function (e) {\r
+            assert_unreached("onBondingError exception " + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index e864f6ba7ab7f8403e428f412b211785d43c366a..81f0612d07fb7772c2eba6651ad15cd125b3fbb4 100755 (executable)
@@ -1,87 +1,91 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
-  may be used to endorse or promote products derived from this work without
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothAdapter_createBonding_deviceuuid_correct</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script type="text/javascript">
-//==== TEST: BluetoothAdapter_createBonding_deviceuuid_correct
-//==== LABEL Check if device uuid is correct
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.
-//==== TEST_CRITERIA MOA MAST
-
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, onBondingError, onBondingSuccess,
-    message = "UUIDs: \n", i;
-t.step(function () {
-
-    add_result_callback(function() {
-        clearBonding(REMOTE_DEVICE_ADDRESS);
-    });
-
-    onBondingSuccess = t.step_func(function (device) {
-        for(i = 0; i < device.uuids.length; i ++) {
-            message += device.uuids[i] + " \n";
-            if(device.uuids[i] === CHAT_SERVICE_UUID) {
-                t.done();
-            }
-        }
-        assert_unreached("Bonding device uuid is not CHAT_SERVICE_UUID. " + message);
-    });
-
-    onBondingError = t.step_func(function (e) {
-        assert_unreached("onBondingError exception " + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+  this list of conditions and the following disclaimer in the documentation\r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+  may be used to endorse or promote products derived from this work without\r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_createBonding_deviceuuid_correct</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script type="text/javascript">\r
+//==== TEST: BluetoothAdapter_createBonding_deviceuuid_correct\r
+//==== LABEL Check if device uuid is correct\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.\r
+//==== TEST_CRITERIA MOA MAST\r
+\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, onBondingError, onBondingSuccess,\r
+    message = "UUIDs: \n", i;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      add_result_callback(function () {\r
+            clearBonding(REMOTE_DEVICE_ADDRESS);\r
+        });\r
+\r
+        onBondingSuccess = t.step_func(function (device) {\r
+            for (i = 0; i < device.uuids.length; i++) {\r
+                message += device.uuids[i] + " \n";\r
+                if (device.uuids[i] === CHAT_SERVICE_UUID) {\r
+                    t.done();\r
+                }\r
+            }\r
+            assert_unreached("Bonding device uuid is not CHAT_SERVICE_UUID. " + message);\r
+        });\r
+\r
+        onBondingError = t.step_func(function (e) {\r
+            assert_unreached("onBondingError exception " + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 03d12e8e770142b202a604d37cd6c92209f04ecd..2b4fc5a40d81bf339fd05dcc6b0062c3ba4a5934 100755 (executable)
@@ -1,71 +1,77 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_createBonding_errorCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_createBonding_errorCallback_TypeMismatch
-//==== LABEL Check whether createBonding() method called with invalid errorCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
-    conversionTable, successCallback, powerOnSuccess, errorCallback;
-t.step(function () {
-    conversionTable = getTypeConversionExceptions("functionObject", true);
-
-    successCallback = t.step_func(function () {
-        assert_unreached("Method createBonding shouldn't end successfully. Given incorrect errorCallback.");
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        for(i = 0; i < conversionTable.length; i++) {
-            errorCallback = conversionTable[i][0];
-            exceptionName = conversionTable[i][1];
-
-            assert_throws({name: exceptionName},
-                function () {
-                    adapter.createBonding(REMOTE_DEVICE_ADDRESS, successCallback, errorCallback);
-                }, "Given incorrect errorCallback.");
-        }
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_createBonding_errorCallback_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_createBonding_errorCallback_TypeMismatch\r
+//==== LABEL Check whether createBonding() method called with invalid errorCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+    conversionTable, successCallback, powerOnSuccess, errorCallback;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+        successCallback = t.step_func(function () {\r
+            assert_unreached("Method createBonding shouldn't end successfully. Given incorrect errorCallback.");\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            for (i = 0; i < conversionTable.length; i++) {\r
+                errorCallback = conversionTable[i][0];\r
+                exceptionName = conversionTable[i][1];\r
+\r
+                assert_throws({ name: exceptionName },\r
+                    function () {\r
+                        adapter.createBonding(REMOTE_DEVICE_ADDRESS, successCallback, errorCallback);\r
+                    }, "Given incorrect errorCallback.");\r
+            }\r
+            t.done();\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index a9abb8be58bc93139c95f1fcbcd2c51eab300215..b560af3ae9c5e8cd9c198874015fa53afd8fb029 100755 (executable)
@@ -1,70 +1,76 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_createBonding_errorCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_createBonding_errorCallback_invalid_cb
-//==== LABEL Check argument createBonding() errorCallback validation
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName = "TypeMismatchError",
-    incorrectCallback, createBondingSuccess, powerOnSuccess;
-t.step(function () {
-    incorrectCallback = {
-        onerror: t.step_func(function (error) {
-            assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
-        })
-    };
-
-    createBondingSuccess = t.step_func(function () {
-        assert_unreached("Method createBonding shouldn't end successfully.");
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        assert_throws({name: exceptionName},
-            function () {
-                adapter.createBonding(REMOTE_DEVICE_ADDRESS, createBondingSuccess, incorrectCallback);
-            }, "Given incorrect errorCallback.");
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_createBonding_errorCallback_invalid_cb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_createBonding_errorCallback_invalid_cb\r
+//==== LABEL Check argument createBonding() errorCallback validation\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName = "TypeMismatchError",\r
+    incorrectCallback, createBondingSuccess, powerOnSuccess;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        incorrectCallback = {\r
+            onerror: t.step_func(function (error) {\r
+                assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);\r
+            })\r
+        };\r
+\r
+        createBondingSuccess = t.step_func(function () {\r
+            assert_unreached("Method createBonding shouldn't end successfully.");\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            assert_throws({ name: exceptionName },\r
+                function () {\r
+                    adapter.createBonding(REMOTE_DEVICE_ADDRESS, createBondingSuccess, incorrectCallback);\r
+                }, "Given incorrect errorCallback.");\r
+            t.done();\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 2fe7201fd0ff0ae0bf962ca8f1d964c3a55fd3ba..31ea2a9c7966b5483d5f083b2325d4a9d6c1f2d9 100755 (executable)
@@ -26,7 +26,7 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
+Lei, ZhanX <zhanx.lei@intel.com>
 
 -->
 <html>
@@ -46,10 +46,12 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA ME
 test(function () {
-    var adapter = tizen.bluetooth.getDefaultAdapter();
-    assert_true("createBonding" in adapter, "Method createBonding does not exist in bluetooth adapter.");
-    check_method_exists(adapter, "createBonding");
-}, document.title);
+      if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+var adapter = tizen.bluetooth.getDefaultAdapter();
+assert_true("createBonding" in adapter, "Method createBonding does not exist in bluetooth adapter.");
+check_method_exists(adapter, "createBonding");
+      }
+    }, document.title);
 
 </script>
 </body>
index dca67c5b260ed133a9af6dc9ca3e4e7b2cf8616c..73950de4aaff12a31c0ca6efdb9696791a330ede 100755 (executable)
@@ -1,60 +1,64 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_createBonding_missarg</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_createBonding_missarg
-//==== LABEL Check createBonding with missing non-optional argument
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MMA
-setup({timeout: 180000});
-
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess;
-t.step(function (){
-
-    powerOnSuccess = t.step_func(function () {
-        assert_throws ({name:"TypeMismatchError"},
-            function () {
-                adapter.createBonding();
-            }, "Method with non optional argument.");
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_createBonding_missarg</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_createBonding_missarg\r
+//==== LABEL Check createBonding with missing non-optional argument\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MMA\r
+setup({timeout: 180000});\r
+\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      powerOnSuccess = t.step_func(function () {\r
+            assert_throws({ name: "TypeMismatchError" },\r
+                function () {\r
+                    adapter.createBonding();\r
+                }, "Method with non optional argument.");\r
+            t.done();\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index c7ea818e748f232739591d26c96e06ba276e441c..d46cbd7bc6d8ab16b94b6b3978f114e0fd2e8e50 100755 (executable)
@@ -1,70 +1,76 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_createBonding_successCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_createBonding_successCallback_TypeMismatch
-//==== LABEL Check whether createBonding() method called with invalid successCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-setup({timeout: 180000});
-
-var t = async_test(document.title, {timeout: 180000}),
-    adapter, exceptionName, i, errorCallback, powerOnSuccess, successCallback,
-    conversionTable = getTypeConversionExceptions("functionObject", false);
-t.step(function () {
-    errorCallback = t.step_func(function (e) {
-        assert_unreached("errorCallback exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        for(i = 0; i < conversionTable.length; i++) {
-            successCallback = conversionTable[i][0];
-            exceptionName = conversionTable[i][1];
-
-            assert_throws({name: exceptionName},
-                function () {
-                    adapter.createBonding(REMOTE_DEVICE_ADDRESS, successCallback, errorCallback);
-                }, "Given incorrect successCallback.");
-        }
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_createBonding_successCallback_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_createBonding_successCallback_TypeMismatch\r
+//==== LABEL Check whether createBonding() method called with invalid successCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+setup({timeout: 180000});\r
+\r
+var t = async_test(document.title, {timeout: 180000}),\r
+    adapter, exceptionName, i, errorCallback, powerOnSuccess, successCallback,\r
+    conversionTable = getTypeConversionExceptions("functionObject", false);\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        errorCallback = t.step_func(function (e) {\r
+            assert_unreached("errorCallback exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            for (i = 0; i < conversionTable.length; i++) {\r
+                successCallback = conversionTable[i][0];\r
+                exceptionName = conversionTable[i][1];\r
+\r
+                assert_throws({ name: exceptionName },\r
+                    function () {\r
+                        adapter.createBonding(REMOTE_DEVICE_ADDRESS, successCallback, errorCallback);\r
+                    }, "Given incorrect successCallback.");\r
+            }\r
+            t.done();\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 0e12c6300f56ac5533d879a83756f14b516cec08..75230c72927dd854fa552909ded1849bb3fcbd8d 100755 (executable)
@@ -1,70 +1,76 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_createBonding_successCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_createBonding_successCallback_invalid_cb
-//==== LABEL Check argument createBonding() successCallback validation
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName = "TypeMismatchError",
-    incorrectCallback, createBondingError, powerOnSuccess;
-t.step(function () {
-    incorrectCallback = {
-        onsuccess: t.step_func(function () {
-            assert_unreached("Method createBonding shouldn't end successfully.");
-        })
-    };
-
-    createBondingError = t.step_func(function (e) {
-        assert_unreached("createBondingError exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        assert_throws({name: exceptionName},
-            function () {
-                adapter.createBonding(REMOTE_DEVICE_ADDRESS, incorrectCallback, createBondingError);
-            }, "Given incorrect successCallback.");
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_createBonding_successCallback_invalid_cb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_createBonding_successCallback_invalid_cb\r
+//==== LABEL Check argument createBonding() successCallback validation\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName = "TypeMismatchError",\r
+    incorrectCallback, createBondingError, powerOnSuccess;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        incorrectCallback = {\r
+            onsuccess: t.step_func(function () {\r
+                assert_unreached("Method createBonding shouldn't end successfully.");\r
+            })\r
+        };\r
+\r
+        createBondingError = t.step_func(function (e) {\r
+            assert_unreached("createBondingError exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            assert_throws({ name: exceptionName },\r
+                function () {\r
+                    adapter.createBonding(REMOTE_DEVICE_ADDRESS, incorrectCallback, createBondingError);\r
+                }, "Given incorrect successCallback.");\r
+            t.done();\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index cd6863b969a906bf6dba3a0181b19256d6cc8a58..84d718e33f58ad2bf9759b2ff2f98c9f15682d73 100755 (executable)
@@ -1,83 +1,87 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
-  may be used to endorse or promote products derived from this work without
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-        Lukasz Bardeli <l.bardeli@samsung.com>
-        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_createBonding_with_errorCallback</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-
-//==== TEST: BluetoothAdapter_createBonding_with_errorCallback
-//==== LABEL Check if successful callback of createBonding method invoked
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MOA MAST
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
-    createBondingSuccess, createBondingError, powerOnSuccess;
-t.step(function () {
-
-    add_result_callback(function() {
-        clearBonding(REMOTE_DEVICE_ADDRESS);
-    });
-
-    createBondingSuccess = t.step_func(function (device) {
-        check_bluetooth_device(device);
-        t.done();
-
-    });
-
-    createBondingError = t.step_func(function (e) {
-        assert_unreached("createBondingError exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.createBonding(REMOTE_DEVICE_ADDRESS, createBondingSuccess, createBondingError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+  this list of conditions and the following disclaimer in the documentation\r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+  may be used to endorse or promote products derived from this work without\r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_createBonding_with_errorCallback</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+\r
+//==== TEST: BluetoothAdapter_createBonding_with_errorCallback\r
+//==== LABEL Check if successful callback of createBonding method invoked\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MOA MAST\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+    createBondingSuccess, createBondingError, powerOnSuccess;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      add_result_callback(function () {\r
+            clearBonding(REMOTE_DEVICE_ADDRESS);\r
+        });\r
+\r
+        createBondingSuccess = t.step_func(function (device) {\r
+            check_bluetooth_device(device);\r
+            t.done();\r
+\r
+        });\r
+\r
+        createBondingError = t.step_func(function (e) {\r
+            assert_unreached("createBondingError exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.createBonding(REMOTE_DEVICE_ADDRESS, createBondingSuccess, createBondingError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 3480e2fca083d161a9cbc750c55d492bb23d3bba..660fbba433ab6c6ed991ae6fb3a5dbb1fef967d8 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Witold Choinkowski <w.choinkowsk@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
 -->
 
 <html>
@@ -39,14 +39,16 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA MC
 test(function () {
-    var globalBluetoothAdapter, param = [null, undefined, 1, "aaa",  [1, 2, 3], {}], i;
-    globalBluetoothAdapter = tizen.bluetooth.getDefaultAdapter();
-
-    for (i = 0; i < param.length; i++) {
-        assert_throws(TYPE_MISMATCH_EXCEPTION,
-            function () {
-                globalBluetoothAdapter.createBonding(REMOTE_DEVICE_ADDRESS, param[i], null);
-            }, "Given incorrect successCallback.");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        var globalBluetoothAdapter, param = [null, undefined, 1, "aaa", [1, 2, 3], {}], i;
+        globalBluetoothAdapter = tizen.bluetooth.getDefaultAdapter();
+
+        for (i = 0; i < param.length; i++) {
+            assert_throws(TYPE_MISMATCH_EXCEPTION,
+                function () {
+                    globalBluetoothAdapter.createBonding(REMOTE_DEVICE_ADDRESS, param[i], null);
+                }, "Given incorrect successCallback.");
+        }
     }
 }, document.title);
 
index 7ed1a0beeb55ae85e20befcc5e13624913cc1fbb..86aae9c82664fd662321e9583e27e6a733b193fc 100755 (executable)
@@ -1,67 +1,73 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_destroyBonding</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_destroyBonding
-//==== LABEL Check with non-optional arguments destroyBonding(valid_address)
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:destroyBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MMINA MR
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
-    onBondingSuccess, onBondingError, powerOnSuccess, retValue = null;
-t.step(function () {
-    onBondingSuccess = t.step_func(function () {
-        retValue = adapter.destroyBonding(REMOTE_DEVICE_ADDRESS);
-
-        assert_equals(retValue, undefined, "destroyBonding returns wrong value");
-        t.done();
-    });
-
-    onBondingError = t.step_func(function (e) {
-        assert_unreached("onBondingError exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_destroyBonding</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_destroyBonding\r
+//==== LABEL Check with non-optional arguments destroyBonding(valid_address)\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:destroyBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MMINA MR\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+    onBondingSuccess, onBondingError, powerOnSuccess, retValue = null;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        onBondingSuccess = t.step_func(function () {\r
+            retValue = adapter.destroyBonding(REMOTE_DEVICE_ADDRESS);\r
+\r
+            assert_equals(retValue, undefined, "destroyBonding returns wrong value");\r
+            t.done();\r
+        });\r
+\r
+        onBondingError = t.step_func(function (e) {\r
+            assert_unreached("onBondingError exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 9ded4f64dc59bc3a7caeb6145cfbc6e0acfb7341..a6ac7b28d4fecffc8ad2863ab769ed6c75c6865b 100755 (executable)
@@ -1,72 +1,78 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification, 
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list 
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice, 
-  this list of conditions and the following disclaimer in the documentation 
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors 
-  may be used to endorse or promote products derived from this work without 
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
-  
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_destroyBonding_callback_onerror</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_destroyBonding_callback_onerror
-//==== LABEL Check if error callback of destroyBonding method invoked
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:destroyBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the test device MUST be turned off.
-//==== EXPECT all subtests should be successful
-//==== TEST_CRITERIA MERRCB
-
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOffSuccess, onDestroySuccess, onDestroyError;
-t.step(function () {
-
-    onDestroySuccess = t.step_func(function () {
-        assert_unreached("onDestroySuccess shouldn't be here");
-    });
-
-    onDestroyError = t.step_func(function (e) {
-        assert_equals(e.name, "ServiceNotAvailableError", "error name in onDestroyError");
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    adapter.destroyBonding(REMOTE_DEVICE_ADDRESS, onDestroySuccess, onDestroyError);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification, \r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list \r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice, \r
+  this list of conditions and the following disclaimer in the documentation \r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors \r
+  may be used to endorse or promote products derived from this work without \r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" \r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE \r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE \r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, \r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, \r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, \r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY \r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING \r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, \r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  \r
+  \r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_destroyBonding_callback_onerror</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_destroyBonding_callback_onerror\r
+//==== LABEL Check if error callback of destroyBonding method invoked\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:destroyBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the test device MUST be turned off.\r
+//==== EXPECT all subtests should be successful\r
+//==== TEST_CRITERIA MERRCB\r
+\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOffSuccess, onDestroySuccess, onDestroyError;\r
+t.step(function () {\r
+      if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+\r
+onDestroySuccess = t.step_func(function () {\r
+  assert_unreached("onDestroySuccess shouldn't be here");\r
+});\r
+\r
+onDestroyError = t.step_func(function (e) {\r
+  assert_equals(e.name, "ServiceNotAvailableError", "error name in onDestroyError");\r
+  t.done();\r
+});\r
+\r
+adapter = tizen.bluetooth.getDefaultAdapter();\r
+adapter.destroyBonding(REMOTE_DEVICE_ADDRESS, onDestroySuccess, onDestroyError);\r
+\r
+      } else {\r
+t.done();\r
+      }\r
+    });\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 31fb34365cb097acac889b0db49c21aec5278089..85f97466aa2d5323ef1b8269365917a3f9ad0e8d 100755 (executable)
@@ -1,84 +1,88 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_destroyBonding_errorCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_destroyBonding_errorCallback_TypeMismatch
-//==== LABEL Check whether destroyBonding() method called with invalid errorCallback argument throws an exception
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:destroyBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MC
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}),
-    adapter, exceptionName, i, successCallback, errorCallback, onBondingSuccess, onBondingError, powerOnSuccess,
-    conversionTable = getTypeConversionExceptions("functionObject", true);
-t.step(function () {
-
-    add_result_callback(function() {
-        clearBonding(REMOTE_DEVICE_ADDRESS);
-    });
-
-    successCallback = t.step_func(function () {
-        assert_unreached("Method destroyBonding shouldn't end successfully.");
-    });
-
-    onBondingSuccess = t.step_func(function () {
-        for(i = 0; i < conversionTable.length; i++) {
-            errorCallback = conversionTable[i][0];
-            exceptionName = conversionTable[i][1];
-
-            assert_throws({name: exceptionName},
-                function () {
-                    adapter.destroyBonding(REMOTE_DEVICE_ADDRESS, successCallback, errorCallback);
-                }, "Given incorrect errorCallback.");
-        }
-        t.done();
-    });
-
-    onBondingError = t.step_func(function (e) {
-        assert_unreached("onBondingError exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_destroyBonding_errorCallback_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_destroyBonding_errorCallback_TypeMismatch\r
+//==== LABEL Check whether destroyBonding() method called with invalid errorCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:destroyBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MC\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}),\r
+    adapter, exceptionName, i, successCallback, errorCallback, onBondingSuccess, onBondingError, powerOnSuccess,\r
+    conversionTable = getTypeConversionExceptions("functionObject", true);\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      add_result_callback(function () {\r
+            clearBonding(REMOTE_DEVICE_ADDRESS);\r
+        });\r
+\r
+        successCallback = t.step_func(function () {\r
+            assert_unreached("Method destroyBonding shouldn't end successfully.");\r
+        });\r
+\r
+        onBondingSuccess = t.step_func(function () {\r
+            for (i = 0; i < conversionTable.length; i++) {\r
+                errorCallback = conversionTable[i][0];\r
+                exceptionName = conversionTable[i][1];\r
+\r
+                assert_throws({ name: exceptionName },\r
+                    function () {\r
+                        adapter.destroyBonding(REMOTE_DEVICE_ADDRESS, successCallback, errorCallback);\r
+                    }, "Given incorrect errorCallback.");\r
+            }\r
+            t.done();\r
+        });\r
+\r
+        onBondingError = t.step_func(function (e) {\r
+            assert_unreached("onBondingError exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index ec6e05127fe8e2c9a3ca5ebf3317ee0ac81ce3d4..d4584498dd09f829fad3bf00ea70922062d8211e 100755 (executable)
@@ -1,85 +1,89 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_destroyBonding_errorCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_destroyBonding_errorCallback_invalid_cb
-//==== LABEL Check if destroyBonding() method throws exception when invalid error callback is given
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:destroyBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MTCB
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}),
-    adapter, exceptionName = "TypeMismatchError", incorrectCallback, destroyBondingSuccess,
-    onBondingSuccess, onBondingError, powerOnSuccess;
-t.step(function () {
-
-    add_result_callback(function() {
-        clearBonding(REMOTE_DEVICE_ADDRESS);
-    });
-
-    incorrectCallback = {
-        onerror: t.step_func(function (e) {
-            assert_unreached("Invalid errorCallback invoked: " + e.name + ": " + e.message);
-        })
-    };
-
-    destroyBondingSuccess = t.step_func(function (e) {
-        assert_unreached("Method destroyBonding shouldn't end successfully.");
-    });
-
-    onBondingSuccess = t.step_func(function () {
-        assert_throws({name: exceptionName},
-            function () {
-                adapter.destroyBonding(REMOTE_DEVICE_ADDRESS, destroyBondingSuccess, incorrectCallback);
-            }, "Given incorrect errorCallback.");
-        t.done();
-    });
-
-    onBondingError = t.step_func(function (e) {
-        assert_unreached("onBondingError exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_destroyBonding_errorCallback_invalid_cb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_destroyBonding_errorCallback_invalid_cb\r
+//==== LABEL Check if destroyBonding() method throws exception when invalid error callback is given\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:destroyBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MTCB\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}),\r
+    adapter, exceptionName = "TypeMismatchError", incorrectCallback, destroyBondingSuccess,\r
+    onBondingSuccess, onBondingError, powerOnSuccess;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      add_result_callback(function () {\r
+            clearBonding(REMOTE_DEVICE_ADDRESS);\r
+        });\r
+\r
+        incorrectCallback = {\r
+            onerror: t.step_func(function (e) {\r
+                assert_unreached("Invalid errorCallback invoked: " + e.name + ": " + e.message);\r
+            })\r
+        };\r
+\r
+        destroyBondingSuccess = t.step_func(function (e) {\r
+            assert_unreached("Method destroyBonding shouldn't end successfully.");\r
+        });\r
+\r
+        onBondingSuccess = t.step_func(function () {\r
+            assert_throws({ name: exceptionName },\r
+                function () {\r
+                    adapter.destroyBonding(REMOTE_DEVICE_ADDRESS, destroyBondingSuccess, incorrectCallback);\r
+                }, "Given incorrect errorCallback.");\r
+            t.done();\r
+        });\r
+\r
+        onBondingError = t.step_func(function (e) {\r
+            assert_unreached("onBondingError exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 3960e4d78d88910db3e52aecf7839ba5501a0bfe..cff60862565fbb3eed31fb68f5533ccde5d0c3cf 100755 (executable)
@@ -26,7 +26,7 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
+Lei, ZhanX <zhanx.lei@intel.com>
 
 -->
 <html>
@@ -45,10 +45,12 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA ME
 test(function () {
-    var adapter = tizen.bluetooth.getDefaultAdapter();
-    assert_true("destroyBonding" in adapter, "Method destroyBonding does not exist in bluetooth adapter.");
-    check_method_exists(adapter, "destroyBonding");
-}, document.title);
+      if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+var adapter = tizen.bluetooth.getDefaultAdapter();
+assert_true("destroyBonding" in adapter, "Method destroyBonding does not exist in bluetooth adapter.");
+check_method_exists(adapter, "destroyBonding");
+      }
+    }, document.title);
 
 </script>
 </body>
index 21748939d188dae8e770fdbd2931a2ae81ac5f87..fcdb987f8230389da90cd99ceb27df32a558715d 100755 (executable)
@@ -1,85 +1,89 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_destroyBonding_successCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_destroyBonding_successCallback_TypeMismatch
-//==== LABEL Check whether destroyBonding() method called with invalid successCallback argument throws an exception
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:destroyBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MC
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
-    conversionTable, errorCallback, onBondingSuccess, onBondingError, powerOnSuccess, successCallback;
-t.step(function () {
-
-    add_result_callback(function() {
-        clearBonding(REMOTE_DEVICE_ADDRESS);
-    });
-
-    conversionTable = getTypeConversionExceptions("functionObject", true);
-
-    errorCallback = t.step_func(function (e) {
-        assert_unreached("errorCallback exception:" + e.message);
-    });
-
-    onBondingSuccess = t.step_func(function () {
-        for(i = 0; i < conversionTable.length; i++) {
-            successCallback = conversionTable[i][0];
-            exceptionName = conversionTable[i][1];
-
-            assert_throws({name: exceptionName},
-                function () {
-                    adapter.destroyBonding(REMOTE_DEVICE_ADDRESS, successCallback, errorCallback);
-                }, "Given incorrect successCallback.");
-        }
-        t.done();
-    });
-
-    onBondingError = t.step_func(function (e) {
-        assert_unreached("onBondingError exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_destroyBonding_successCallback_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_destroyBonding_successCallback_TypeMismatch\r
+//==== LABEL Check whether destroyBonding() method called with invalid successCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:destroyBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MC\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+    conversionTable, errorCallback, onBondingSuccess, onBondingError, powerOnSuccess, successCallback;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      add_result_callback(function () {\r
+            clearBonding(REMOTE_DEVICE_ADDRESS);\r
+        });\r
+\r
+        conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+        errorCallback = t.step_func(function (e) {\r
+            assert_unreached("errorCallback exception:" + e.message);\r
+        });\r
+\r
+        onBondingSuccess = t.step_func(function () {\r
+            for (i = 0; i < conversionTable.length; i++) {\r
+                successCallback = conversionTable[i][0];\r
+                exceptionName = conversionTable[i][1];\r
+\r
+                assert_throws({ name: exceptionName },\r
+                    function () {\r
+                        adapter.destroyBonding(REMOTE_DEVICE_ADDRESS, successCallback, errorCallback);\r
+                    }, "Given incorrect successCallback.");\r
+            }\r
+            t.done();\r
+        });\r
+\r
+        onBondingError = t.step_func(function (e) {\r
+            assert_unreached("onBondingError exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 3b2f6082fc4a266656608fc9f83499fb9796e4f3..290d4a65d6fce2ff11c692c28428d750adf4efd8 100755 (executable)
@@ -1,84 +1,88 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_destroyBonding_successCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_destroyBonding_successCallback_invalid_cb
-//==== LABEL Check if destroyBonding() method throws exception when invalid success callback is given
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:destroyBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MTCB
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName = "TypeMismatchError",
-    incorrectCallback, destroyBondingError, onBondingSuccess, onBondingSuccess, onBondingError, powerOnSuccess;
-t.step(function () {
-
-    add_result_callback(function() {
-        clearBonding(REMOTE_DEVICE_ADDRESS);
-    });
-
-    incorrectCallback = {
-        onsuccess: t.step_func(function () {
-            assert_unreached("Method destroyBonding shouldn't end successfully.");
-        })
-    };
-
-    destroyBondingError = t.step_func(function (error) {
-        assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
-    });
-
-    onBondingSuccess = t.step_func(function () {
-        assert_throws({name: exceptionName},
-            function () {
-                adapter.destroyBonding(REMOTE_DEVICE_ADDRESS, incorrectCallback, destroyBondingError);
-            }, "Given incorrect successCallback.");
-        t.done();
-    });
-
-    onBondingError = t.step_func(function (e) {
-        assert_unreached("onBondingError exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_destroyBonding_successCallback_invalid_cb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_destroyBonding_successCallback_invalid_cb\r
+//==== LABEL Check if destroyBonding() method throws exception when invalid success callback is given\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:destroyBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MTCB\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName = "TypeMismatchError",\r
+    incorrectCallback, destroyBondingError, onBondingSuccess, onBondingSuccess, onBondingError, powerOnSuccess;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      add_result_callback(function () {\r
+            clearBonding(REMOTE_DEVICE_ADDRESS);\r
+        });\r
+\r
+        incorrectCallback = {\r
+            onsuccess: t.step_func(function () {\r
+                assert_unreached("Method destroyBonding shouldn't end successfully.");\r
+            })\r
+        };\r
+\r
+        destroyBondingError = t.step_func(function (error) {\r
+            assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);\r
+        });\r
+\r
+        onBondingSuccess = t.step_func(function () {\r
+            assert_throws({ name: exceptionName },\r
+                function () {\r
+                    adapter.destroyBonding(REMOTE_DEVICE_ADDRESS, incorrectCallback, destroyBondingError);\r
+                }, "Given incorrect successCallback.");\r
+            t.done();\r
+        });\r
+\r
+        onBondingError = t.step_func(function (e) {\r
+            assert_unreached("onBondingError exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 72ebc33d1c1a03cb871a335d07dabcca6088cffb..53c2ba10b9e5f59288895b171454ac3cbf8845af 100755 (executable)
@@ -1,88 +1,92 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
-  may be used to endorse or promote products derived from this work without
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-        Lukasz Bardeli <l.bardeli@samsung.com>
-        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_destroyBonding_with_errorCallback</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_destroyBonding_with_errorCallback
-//==== LABEL Check with optional arguments destroyBonding(valid_address, valid_successCallback, valid_errorCallback)
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:destroyBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MOA MAST
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
-    successCallback, errorCallback, onBondingSuccess, onBondingError, powerOnSuccess;
-t.step(function () {
-
-    add_result_callback(function() {
-        clearBonding(REMOTE_DEVICE_ADDRESS);
-    });
-
-    successCallback = t.step_func(function () {
-        t.done();
-    });
-
-    errorCallback = t.step_func(function (e) {
-        assert_unreached("errorCallback exception:" + e.message);
-    });
-
-    onBondingSuccess = t.step_func(function () {
-        adapter.destroyBonding(REMOTE_DEVICE_ADDRESS, successCallback, errorCallback);
-    });
-
-    onBondingError = t.step_func(function (e) {
-        assert_unreached("onBondingError exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+  this list of conditions and the following disclaimer in the documentation\r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+  may be used to endorse or promote products derived from this work without\r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_destroyBonding_with_errorCallback</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_destroyBonding_with_errorCallback\r
+//==== LABEL Check with optional arguments destroyBonding(valid_address, valid_successCallback, valid_errorCallback)\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:destroyBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MOA MAST\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+    successCallback, errorCallback, onBondingSuccess, onBondingError, powerOnSuccess;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      add_result_callback(function () {\r
+            clearBonding(REMOTE_DEVICE_ADDRESS);\r
+        });\r
+\r
+        successCallback = t.step_func(function () {\r
+            t.done();\r
+        });\r
+\r
+        errorCallback = t.step_func(function (e) {\r
+            assert_unreached("errorCallback exception:" + e.message);\r
+        });\r
+\r
+        onBondingSuccess = t.step_func(function () {\r
+            adapter.destroyBonding(REMOTE_DEVICE_ADDRESS, successCallback, errorCallback);\r
+        });\r
+\r
+        onBondingError = t.step_func(function (e) {\r
+            assert_unreached("onBondingError exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 1bf138acb7ac6e643b54f28802f61e79f1d2ca78..50a6d03f86a790cdff9e97a027e91f88a2454ecd 100755 (executable)
@@ -1,73 +1,77 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_destroyBonding_with_successCallback</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_destroyBonding_with_successCallback
-//==== LABEL Check with optional arguments destroyBonding(valid_address, valid_successCallback)
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:destroyBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MOA MAST
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}), successCallback,
-    onBondingSuccess, onBondingError, powerOnSuccess;
-t.step(function () {
-
-    add_result_callback(function() {
-        clearBonding(REMOTE_DEVICE_ADDRESS);
-    });
-
-    successCallback = t.step_func(function () {
-        t.done();
-    });
-
-    onBondingSuccess = t.step_func(function () {
-        adapter.destroyBonding(REMOTE_DEVICE_ADDRESS, successCallback);
-    });
-
-    onBondingError = t.step_func(function (e) {
-        assert_unreached("onBondingError exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_destroyBonding_with_successCallback</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_destroyBonding_with_successCallback\r
+//==== LABEL Check with optional arguments destroyBonding(valid_address, valid_successCallback)\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:destroyBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MOA MAST\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), successCallback,\r
+    onBondingSuccess, onBondingError, powerOnSuccess;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      add_result_callback(function () {\r
+            clearBonding(REMOTE_DEVICE_ADDRESS);\r
+        });\r
+\r
+        successCallback = t.step_func(function () {\r
+            t.done();\r
+        });\r
+\r
+        onBondingSuccess = t.step_func(function () {\r
+            adapter.destroyBonding(REMOTE_DEVICE_ADDRESS, successCallback);\r
+        });\r
+\r
+        onBondingError = t.step_func(function (e) {\r
+            assert_unreached("onBondingError exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index a868a90536f50cf9cde2516103b8d92b3989c735..1bb98e16b5d7dee6718c77679d165581bdc05a80 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Witold Choinkowski <w.choinkowsk@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
 -->
 <html>
 
@@ -39,14 +39,16 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA MC
 test(function () {
-    var globalBluetoothAdapter, param = [1, "aaa",  [1, 2, 3], {}], i;
-    globalBluetoothAdapter = tizen.bluetooth.getDefaultAdapter();
-
-    for (i = 0; i < param.length; i++) {
-        assert_throws(TYPE_MISMATCH_EXCEPTION,
-            function () {
-                globalBluetoothAdapter.destroyBonding(REMOTE_DEVICE_ADDRESS, param[i], null);
-            }, "Given incorrect successCallback.");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        var globalBluetoothAdapter, param = [1, "aaa", [1, 2, 3], {}], i;
+        globalBluetoothAdapter = tizen.bluetooth.getDefaultAdapter();
+
+        for (i = 0; i < param.length; i++) {
+            assert_throws(TYPE_MISMATCH_EXCEPTION,
+                function () {
+                    globalBluetoothAdapter.destroyBonding(REMOTE_DEVICE_ADDRESS, param[i], null);
+                }, "Given incorrect successCallback.");
+        }
     }
 }, document.title);
 
index 7e5b888ddc5c3fb9df66ee382a34df7317b93818..d9fc481efe31a13a7f8cd21c990a4099f198b355 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Witold Choinkowski <w.choinkowsk@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
 -->
 <html>
 
@@ -39,14 +39,16 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA MC
 test(function () {
-    var globalBluetoothAdapter, param = [1, "aaa", [1, 2, 3], {}], i;
-    globalBluetoothAdapter = tizen.bluetooth.getDefaultAdapter();
-
-    for (i = 0; i < param.length; i++) {
-        assert_throws(TYPE_MISMATCH_EXCEPTION,
-            function () {
-                globalBluetoothAdapter.destroyBonding(REMOTE_DEVICE_ADDRESS, null, param[i]);
-            }, "Given incorrect errorCallback.");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        var globalBluetoothAdapter, param = [1, "aaa", [1, 2, 3], {}], i;
+        globalBluetoothAdapter = tizen.bluetooth.getDefaultAdapter();
+
+        for (i = 0; i < param.length; i++) {
+            assert_throws(TYPE_MISMATCH_EXCEPTION,
+                function () {
+                    globalBluetoothAdapter.destroyBonding(REMOTE_DEVICE_ADDRESS, null, param[i]);
+                }, "Given incorrect errorCallback.");
+        }
     }
 }, document.title);
 
index 1110c35a1ecd0b202285dda636931cff95f894e5..cc5e571e19eefffd7763808fdb675dc892bf2225 100755 (executable)
@@ -1,77 +1,83 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_discoverDevices</title>
-<meta charset="utf-8">
-<meta name="timeout" content="long"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_discoverDevices
-//==== LABEL Check with non-optional arguments discoverDevices(valid_successCallback)
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 300
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MMINA MR
-
-setup({timeout: 300000});
-
-var adapter = null, t = async_test(document.title, {timeout: 300000}), stopDiscoverySuccess,
-    discoverDevicesSuccessCB, retValue = null;
-
-t.step(function () {
-    discoverDevicesSuccessCB = {
-        onstarted: t.step_func(function () {
-        }),
-        ondevicefound: t.step_func(function (device) {
-        }),
-        ondevicedisappeared: function (address) {
-        },
-        onfinished: t.step_func(function (devices) {
-            if(devices.length > 0){
-                assert_equals(retValue, undefined, "discoverDevices returns wrong value");
-                t.done();
-            }else{
-                setTimeout(stopDiscoverySuccess, 1000);
-            }
-        })
-    };
-
-    stopDiscoverySuccess = t.step_func(function () {
-        retValue = adapter.discoverDevices(discoverDevicesSuccessCB);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_discoverDevices</title>\r
+<meta charset="utf-8">\r
+<meta name="timeout" content="long"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_discoverDevices\r
+//==== LABEL Check with non-optional arguments discoverDevices(valid_successCallback)\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 300\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MMINA MR\r
+\r
+setup({timeout: 300000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 300000}), stopDiscoverySuccess,\r
+    discoverDevicesSuccessCB, retValue = null;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        discoverDevicesSuccessCB = {\r
+            onstarted: t.step_func(function () {\r
+            }),\r
+            ondevicefound: t.step_func(function (device) {\r
+            }),\r
+            ondevicedisappeared: function (address) {\r
+            },\r
+            onfinished: t.step_func(function (devices) {\r
+                if (devices.length > 0) {\r
+                    assert_equals(retValue, undefined, "discoverDevices returns wrong value");\r
+                    t.done();\r
+                } else {\r
+                    setTimeout(stopDiscoverySuccess, 1000);\r
+                }\r
+            })\r
+        };\r
+\r
+        stopDiscoverySuccess = t.step_func(function () {\r
+            retValue = adapter.discoverDevices(discoverDevicesSuccessCB);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index cbb97c378444716829018eacd90b2946cb5a1c58..b194d29fffc4ef588d10d7f20d246533ce880d16 100755 (executable)
@@ -1,72 +1,76 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Witold Choinkowski <w.choinkowsk@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_discoverDevices_callback_onerror</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_discoverDevices_callback_onerror
-//==== LABEL Check if error callback of discoverDevices method invoked
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the test device MUST be turned off.
-//==== TEST_CRITERIA MERRCB
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}), discoverDevicesSuccessCB, errorCallback;
-t.step(function () {
-
-    discoverDevicesSuccessCB = {
-        onstarted: t.step_func(function () {
-            assert_unreached("invalid onstarted invoked");
-        }),
-        ondevicefound: t.step_func(function (device) {
-            assert_unreached("invalid ondevicefound invoked");
-        }),
-        ondevicedisappeared: t.step_func(function (address) {
-            assert_unreached("invalid ondevicedisappeared invoked");
-        }),
-        onfinished: t.step_func(function (devices) {
-            assert_unreached("invalid onfinished invoked");
-        })
-    };
-
-    errorCallback = t.step_func(function (error) {
-        assert_equals(error.name, "ServiceNotAvailableError", "expected another error");
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    adapter.discoverDevices(discoverDevicesSuccessCB, errorCallback);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Witold Choinkowski <w.choinkowsk@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_discoverDevices_callback_onerror</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_discoverDevices_callback_onerror\r
+//==== LABEL Check if error callback of discoverDevices method invoked\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the test device MUST be turned off.\r
+//==== TEST_CRITERIA MERRCB\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), discoverDevicesSuccessCB, errorCallback;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      discoverDevicesSuccessCB = {\r
+            onstarted: t.step_func(function () {\r
+                assert_unreached("invalid onstarted invoked");\r
+            }),\r
+            ondevicefound: t.step_func(function (device) {\r
+                assert_unreached("invalid ondevicefound invoked");\r
+            }),\r
+            ondevicedisappeared: t.step_func(function (address) {\r
+                assert_unreached("invalid ondevicedisappeared invoked");\r
+            }),\r
+            onfinished: t.step_func(function (devices) {\r
+                assert_unreached("invalid onfinished invoked");\r
+            })\r
+        };\r
+\r
+        errorCallback = t.step_func(function (error) {\r
+            assert_equals(error.name, "ServiceNotAvailableError", "expected another error");\r
+            t.done();\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        adapter.discoverDevices(discoverDevicesSuccessCB, errorCallback);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index e6776180fa1e49fc21ef121c7cab24c9da550f4d..324686ad44993c602ebf3f985f557ca03065ff8d 100755 (executable)
@@ -1,82 +1,86 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
-  may be used to endorse or promote products derived from this work without
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothAdapter_discoverDevices_callback_successful</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script type="text/javascript">
-//==== TEST: BluetoothAdapter_discoverDevices_callback_successful
-//==== LABEL Check if successful callback of discoverDevices method invoked
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MOA MAST
-setup({timeout: 180000, explicit_done:true});
-var t = async_test(document.title, {timeout: 180000}), adapter, discoverDevicesErrorCallback, stopDiscoverySuccess,
-    discoverDevicesSuccessCallback;
-t.step(function () {
-
-    discoverDevicesSuccessCallback = {
-        onstarted: t.step_func(function () {
-            t.done();
-        }),
-        ondevicefound: t.step_func(function (device) {
-        }),
-        ondevicedisappeared: function (address) {
-        },
-        onfinished: t.step_func(function (devices) {
-        })
-    };
-
-    discoverDevicesErrorCallback = t.step_func(function (e){
-        assert_unreached("discoverDevicesErrorCallback" + e.message);
-    });
-
-    stopDiscoverySuccess = t.step_func(function (){
-        adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesErrorCallback);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setBluetoothDiscoveryCleanup(adapter);
-    stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+  this list of conditions and the following disclaimer in the documentation\r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+  may be used to endorse or promote products derived from this work without\r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_discoverDevices_callback_successful</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script type="text/javascript">\r
+//==== TEST: BluetoothAdapter_discoverDevices_callback_successful\r
+//==== LABEL Check if successful callback of discoverDevices method invoked\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MOA MAST\r
+setup({timeout: 180000, explicit_done:true});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, discoverDevicesErrorCallback, stopDiscoverySuccess,\r
+    discoverDevicesSuccessCallback;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+        discoverDevicesSuccessCallback = {\r
+            onstarted: t.step_func(function () {\r
+                t.done();\r
+            }),\r
+            ondevicefound: t.step_func(function (device) {\r
+            }),\r
+            ondevicedisappeared: function (address) {\r
+            },\r
+            onfinished: t.step_func(function (devices) {\r
+            })\r
+        };\r
+\r
+        discoverDevicesErrorCallback = t.step_func(function (e) {\r
+            assert_unreached("discoverDevicesErrorCallback" + e.message);\r
+        });\r
+\r
+        stopDiscoverySuccess = t.step_func(function () {\r
+            adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesErrorCallback);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setBluetoothDiscoveryCleanup(adapter);\r
+        stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index ba0ad25717debdd20d3bff943f72d40b74998abd..d4271a8bff8e8a64c4f6c5591c844ab79e6be1ec 100755 (executable)
@@ -1,71 +1,75 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_discoverDevices_errorCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_discoverDevices_errorCallback_TypeMismatch
-//==== LABEL Check whether discoverDevices() method called with invalid errorCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
-    successCallback, errorCallback, stopDiscoverySuccess, conversionTable;
-t.step(function () {
-    conversionTable = getTypeConversionExceptions("functionObject", true);
-
-    successCallback = t.step_func(function (e) {
-        assert_unreached("errorCallback exception:" + e.message);
-    });
-
-    stopDiscoverySuccess = t.step_func(function () {
-        for(i = 0; i < conversionTable.length; i++) {
-            errorCallback = conversionTable[i][0];
-            exceptionName = conversionTable[i][1];
-
-            assert_throws({name: exceptionName},
-                function () {
-                    adapter.discoverDevices(successCallback, errorCallback);
-                }, "Given incorrect errorCallback.");
-        }
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_discoverDevices_errorCallback_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_discoverDevices_errorCallback_TypeMismatch\r
+//==== LABEL Check whether discoverDevices() method called with invalid errorCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+    successCallback, errorCallback, stopDiscoverySuccess, conversionTable;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+        conversionTable = getTypeConversionExceptions("functionObject", true);\r
+        successCallback = t.step_func(function (e) {\r
+            assert_unreached("errorCallback exception:" + e.message);\r
+        });\r
+\r
+        stopDiscoverySuccess = t.step_func(function () {\r
+            for (i = 0; i < conversionTable.length; i++) {\r
+                errorCallback = conversionTable[i][0];\r
+                exceptionName = conversionTable[i][1];\r
+\r
+                assert_throws({ name: exceptionName },\r
+                    function () {\r
+                        adapter.discoverDevices(successCallback, errorCallback);\r
+                    }, "Given incorrect errorCallback.");\r
+            }\r
+            t.done();\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 062ab9249e1f14769ac53980e32c3207f5bcf400..cb954543f15779fa6e2725b14e215f1c2d660b02 100755 (executable)
@@ -1,70 +1,75 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_discoverDevices_errorCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_discoverDevices_errorCallback_invalid_cb
-//==== LABEL Check argument discoverDevices() errorCallback validation
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName = "TypeMismatchError",
-    successCallback, incorrectCallback, stopDiscoverySuccess;
-t.step(function () {
-    successCallback =t.step_func( function () {
-        assert_unreached("Method discoverDevices shouldn't end successfully.");
-    });
-
-    incorrectCallback = {
-        onerror: t.step_func(function (error) {
-            assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
-        })
-    };
-
-    stopDiscoverySuccess = t.step_func(function () {
-        assert_throws({name: exceptionName},
-            function () {
-                adapter.discoverDevices(successCallback, incorrectCallback);
-            }, "Given incorrect errorCallback.");
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_discoverDevices_errorCallback_invalid_cb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_discoverDevices_errorCallback_invalid_cb\r
+//==== LABEL Check argument discoverDevices() errorCallback validation\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName = "TypeMismatchError",\r
+    successCallback, incorrectCallback, stopDiscoverySuccess;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+        successCallback = t.step_func(function () {\r
+            assert_unreached("Method discoverDevices shouldn't end successfully.");\r
+        });\r
+\r
+        incorrectCallback = {\r
+            onerror: t.step_func(function (error) {\r
+                assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);\r
+            })\r
+        };\r
+\r
+        stopDiscoverySuccess = t.step_func(function () {\r
+            assert_throws({ name: exceptionName },\r
+                function () {\r
+                    adapter.discoverDevices(successCallback, incorrectCallback);\r
+                }, "Given incorrect errorCallback.");\r
+            t.done();\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index dbdc28af05b749047882cffd2f4e52609114348b..6f4509437921dee46594d4dfb336c6ad5182cfbe 100755 (executable)
@@ -26,7 +26,7 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
+Lei, ZhanX <zhanx.lei@intel.com>
 
 -->
 <html>
@@ -45,10 +45,12 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA ME
 test(function () {
-    var adapter = tizen.bluetooth.getDefaultAdapter();
-    assert_true("discoverDevices" in adapter, "Method discoverDevices does not exist in bluetooth adapter.");
-    check_method_exists(adapter, "discoverDevices");
-}, document.title);
+      if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+          var adapter = tizen.bluetooth.getDefaultAdapter();
+          assert_true("discoverDevices" in adapter, "Method discoverDevices does not exist in bluetooth adapter.");
+          check_method_exists(adapter, "discoverDevices");
+      }
+    }, document.title);
 
 </script>
 </body>
index e38b968dfca5258644c1ce2377974ead8783e512..e55c7b3d73bed55bad24021be46c27788450b3eb 100755 (executable)
@@ -1,73 +1,78 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Witold Choinkowski <w.choinkowsk@samsung.com>
--->
-<html>
-
-<head>
-<title>BluetoothAdapter_discoverDevices_invalid_callback_name</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script>
-
-//==== TEST: BluetoothAdapter_discoverDevices_invalid_callback_name
-//==== LABEL Check whether discoverDevices() method called with invalid successCallback throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter = tizen.bluetooth.getDefaultAdapter(), discoverDevicesSuccessCallback,
-    stopDiscoverySuccessCB, stopDiscoverySuccess;
-t.step(function () {
-
-    stopDiscoverySuccessCB = t.step_func(function () {
-        t.done();
-    });
-
-    discoverDevicesSuccessCallback = {
-        invalid: t.step_func(function () {}),
-        ondevicefound: t.step_func(function () {}),
-        ondevicedisappeared: t.step_func(function () {}),
-        onfinished: t.step_func(function () {})
-    };
-
-    stopDiscoverySuccess = t.step_func(function () {
-        try {
-            adapter.discoverDevices(discoverDevicesSuccessCallback);
-            adapter.stopDiscovery(stopDiscoverySuccessCB);
-        } catch(e) {
-            assert_unreached("exception shouldn't be thrown");
-        }
-    });
-
-    stopDiscovery(t, adapter, stopDiscoverySuccess);
-}, "BluetoothAdapter_discoverDevices_invalid_callback_name");
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Witold Choinkowski <w.choinkowsk@samsung.com>\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothAdapter_discoverDevices_invalid_callback_name</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+\r
+//==== TEST: BluetoothAdapter_discoverDevices_invalid_callback_name\r
+//==== LABEL Check whether discoverDevices() method called with invalid successCallback throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+setup({ timeout: 180000 });\r
+var t = async_test(document.title, { timeout: 180000 }), adapter = tizen.bluetooth.getDefaultAdapter(), discoverDevicesSuccessCallback,\r
+    stopDiscoverySuccessCB, stopDiscoverySuccess;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+        stopDiscoverySuccessCB = t.step_func(function () {\r
+            t.done();\r
+        });\r
+\r
+        discoverDevicesSuccessCallback = {\r
+            invalid: t.step_func(function () { }),\r
+            ondevicefound: t.step_func(function () { }),\r
+            ondevicedisappeared: t.step_func(function () { }),\r
+            onfinished: t.step_func(function () { })\r
+        };\r
+\r
+        stopDiscoverySuccess = t.step_func(function () {\r
+            try {\r
+                adapter.discoverDevices(discoverDevicesSuccessCallback);\r
+                adapter.stopDiscovery(stopDiscoverySuccessCB);\r
+            } catch (e) {\r
+                assert_unreached("exception shouldn't be thrown");\r
+            }\r
+\r
+        });\r
+\r
+        stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+    } else {\r
+        t.done();\r
+    }\r
+}, "BluetoothAdapter_discoverDevices_invalid_callback_name");\r
+\r
+</script>\r
+</body>\r
+\r
+</html>
\ No newline at end of file
index de0ab83ec50e771373b32f15f2281f6929ad5a0f..7e0aa0018eb1a6014ed4768fe15daeb385cca22e 100755 (executable)
@@ -1,59 +1,63 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_discoverDevices_missarg</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_discoverDevices_missarg
-//==== LABEL Check discoverDevices with missing non-optional argument
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MMA
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, stopDiscoverySuccess;
-t.step(function () {
-
-    stopDiscoverySuccess = t.step_func(function () {
-        assert_throws ({name:"TypeMismatchError"},
-            function () {
-                adapter.discoverDevices();
-            }, "Method with non optional argument.");
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_discoverDevices_missarg</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_discoverDevices_missarg\r
+//==== LABEL Check discoverDevices with missing non-optional argument\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MMA\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, stopDiscoverySuccess;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      stopDiscoverySuccess = t.step_func(function () {\r
+            assert_throws({ name: "TypeMismatchError" },\r
+                function () {\r
+                    adapter.discoverDevices();\r
+                }, "Method with non optional argument.");\r
+            t.done();\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index da75ca88be5ed778214026614593b06bb494443b..68fe616d5c4fc9f712c42cf4b1211664b3d4a131 100755 (executable)
@@ -1,85 +1,91 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
-  may be used to endorse or promote products derived from this work without
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothAdapter_discoverDevices_onfinish_successful</title>
-<meta charset="utf-8">
-<meta name="timeout" content="long"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_discoverDevices_onfinish_successful
-//==== LABEL Check if onfinish method of successful callback of discoverDevices method invoked
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 300
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MOA MAST
-
-setup({timeout: 300000});
-
-var t = async_test(document.title, {timeout: 300000}), adapter, stopDiscoverySuccess, discoverDevicesSuccessCallback,
-    discoverDevicesErrorCB;
-
-t.step(function () {
-    discoverDevicesSuccessCallback = {
-        onstarted: t.step_func(function () {
-        }),
-        ondevicefound: t.step_func(function (device) {
-        }),
-        ondevicedisappeared: t.step_func(function (address) {
-        }),
-        onfinished: t.step_func(function (devices) {
-            t.done();
-        })
-    };
-
-    discoverDevicesErrorCB = t.step_func(function (e) {
-        assert_unreached("discoverDevicesErrorCB exception:" + e.message);
-    });
-
-    stopDiscoverySuccess = t.step_func(function () {
-        adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesErrorCB);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+  this list of conditions and the following disclaimer in the documentation\r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+  may be used to endorse or promote products derived from this work without\r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_discoverDevices_onfinish_successful</title>\r
+<meta charset="utf-8">\r
+<meta name="timeout" content="long"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_discoverDevices_onfinish_successful\r
+//==== LABEL Check if onfinish method of successful callback of discoverDevices method invoked\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 300\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MOA MAST\r
+\r
+setup({timeout: 300000});\r
+\r
+var t = async_test(document.title, {timeout: 300000}), adapter, stopDiscoverySuccess, discoverDevicesSuccessCallback,\r
+    discoverDevicesErrorCB;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        discoverDevicesSuccessCallback = {\r
+            onstarted: t.step_func(function () {\r
+            }),\r
+            ondevicefound: t.step_func(function (device) {\r
+            }),\r
+            ondevicedisappeared: t.step_func(function (address) {\r
+            }),\r
+            onfinished: t.step_func(function (devices) {\r
+                t.done();\r
+            })\r
+        };\r
+\r
+        discoverDevicesErrorCB = t.step_func(function (e) {\r
+            assert_unreached("discoverDevicesErrorCB exception:" + e.message);\r
+        });\r
+\r
+        stopDiscoverySuccess = t.step_func(function () {\r
+            adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesErrorCB);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 1407195ba9d935a78576aea9d9223a646a0be03c..b8df979bc3cfe40adcdab9c6b4d09f4a43bf0949 100755 (executable)
@@ -1,90 +1,94 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
-  may be used to endorse or promote products derived from this work without
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothAdapter_discoverDevices_onfound_deviceaddress</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_discoverDevices_onfound_deviceaddress
-//==== LABEL Check if device address is found
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MOA MAST
-
-setup({timeout: 180000, explicit_done:true});
-var t = async_test(document.title, {timeout: 180000}), adapter, discoverDevicesError, stopDiscoverySuccess,
-    discoverDevicesSuccessCallback;
-t.step(function () {
-
-    discoverDevicesSuccessCallback = {
-        onstarted: t.step_func(function () {
-        }),
-        ondevicefound: t.step_func(function (device) {
-            assert_not_equals(device.address, null, "device address in ondevicefound");
-
-            t.done();
-        }),
-        ondevicedisappeared: t.step_func(function (address) {
-
-        }),
-        onfinished: t.step_func(function (devices) {
-            if (devices.length === 0) {
-                setTimeout(stopDiscoverySuccess, 1000);
-            }
-        })
-    };
-
-    discoverDevicesError = t.step_func(function (e) {
-        assert_unreached("discoverDevicesError exception:" + e.message);
-    });
-
-    stopDiscoverySuccess = t.step_func(function () {
-        adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setBluetoothDiscoveryCleanup(adapter);
-    stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+  this list of conditions and the following disclaimer in the documentation\r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+  may be used to endorse or promote products derived from this work without\r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_discoverDevices_onfound_deviceaddress</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_discoverDevices_onfound_deviceaddress\r
+//==== LABEL Check if device address is found\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MOA MAST\r
+\r
+setup({timeout: 180000, explicit_done:true});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, discoverDevicesError, stopDiscoverySuccess,\r
+    discoverDevicesSuccessCallback;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+        discoverDevicesSuccessCallback = {\r
+            onstarted: t.step_func(function () {\r
+            }),\r
+            ondevicefound: t.step_func(function (device) {\r
+                assert_not_equals(device.address, null, "device address in ondevicefound");\r
+\r
+                t.done();\r
+            }),\r
+            ondevicedisappeared: t.step_func(function (address) {\r
+\r
+            }),\r
+            onfinished: t.step_func(function (devices) {\r
+                if (devices.length === 0) {\r
+                    setTimeout(stopDiscoverySuccess, 1000);\r
+                }\r
+            })\r
+        };\r
+\r
+        discoverDevicesError = t.step_func(function (e) {\r
+            assert_unreached("discoverDevicesError exception:" + e.message);\r
+        });\r
+\r
+        stopDiscoverySuccess = t.step_func(function () {\r
+            adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setBluetoothDiscoveryCleanup(adapter);\r
+        stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 248d8cc0afcda9478b83a6d570331a8495683960..fbf2934cf82d2974090f85e1bf71e5c0b6f7347e 100755 (executable)
@@ -1,89 +1,93 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
-  may be used to endorse or promote products derived from this work without
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothAdapter_discoverDevices_onfound_devicename</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_discoverDevices_onfound_devicename
-//==== LABEL Check if device name is found
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MOA MAST
-setup({timeout:180000, explicit_done:true});
-var t = async_test(document.title, {timeout: 180000}), adapter, discoverDevicesError, stopDiscoverySuccess,
-    discoverDevicesSuccessCallback;
-t.step(function () {
-
-    discoverDevicesSuccessCallback = {
-        onstarted: t.step_func(function () {
-        }),
-        ondevicefound: t.step_func(function (device) {
-            assert_not_equals(device.name, null, "device name in ondevicefound");
-
-            t.done();
-        }),
-        ondevicedisappeared: t.step_func(function (address) {
-
-        }),
-        onfinished: t.step_func(function (devices) {
-            if (devices.length === 0) {
-                setTimeout(stopDiscoverySuccess, 1000);
-            }
-        })
-    };
-
-    discoverDevicesError = t.step_func(function (e) {
-        assert_unreached("discoverDevicesError exception:" + e.message);
-    });
-
-    stopDiscoverySuccess = t.step_func(function () {
-        adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setBluetoothDiscoveryCleanup(adapter);
-    stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+  this list of conditions and the following disclaimer in the documentation\r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+  may be used to endorse or promote products derived from this work without\r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_discoverDevices_onfound_devicename</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_discoverDevices_onfound_devicename\r
+//==== LABEL Check if device name is found\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MOA MAST\r
+setup({timeout:180000, explicit_done:true});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, discoverDevicesError, stopDiscoverySuccess,\r
+    discoverDevicesSuccessCallback;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      discoverDevicesSuccessCallback = {\r
+            onstarted: t.step_func(function () {\r
+            }),\r
+            ondevicefound: t.step_func(function (device) {\r
+                assert_not_equals(device.name, null, "device name in ondevicefound");\r
+\r
+                t.done();\r
+            }),\r
+            ondevicedisappeared: t.step_func(function (address) {\r
+\r
+            }),\r
+            onfinished: t.step_func(function (devices) {\r
+                if (devices.length === 0) {\r
+                    setTimeout(stopDiscoverySuccess, 1000);\r
+                }\r
+            })\r
+        };\r
+\r
+        discoverDevicesError = t.step_func(function (e) {\r
+            assert_unreached("discoverDevicesError exception:" + e.message);\r
+        });\r
+\r
+        stopDiscoverySuccess = t.step_func(function () {\r
+            adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setBluetoothDiscoveryCleanup(adapter);\r
+        stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index e4148dced29c7b37d60df9e7098b5faf7a244b24..16fde4d5259d674247410bbf1de2822ac515ea13 100755 (executable)
@@ -1,90 +1,94 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
-  may be used to endorse or promote products derived from this work without
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothAdapter_discoverDevices_onfound_successful</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_discoverDevices_onfound_successful
-//==== LABEL Check if onfound method of successful callback of discoverDevices method invoked
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MOA MAST
-
-setup({timeout:180000, explicit_done:true});
-var t = async_test(document.title, {timeout: 180000}), adapter, stopDiscoverySuccess, discoverDevicesSuccessCallback,
-    discoverDevicesError;
-t.step(function () {
-
-    discoverDevicesSuccessCallback = {
-        onstarted: t.step_func(function () {
-        }),
-        ondevicefound: t.step_func(function (device) {
-            check_bluetooth_device(device);
-
-            t.done();
-        }),
-        ondevicedisappeared: t.step_func(function (address) {
-
-        }),
-        onfinished: t.step_func(function (devices) {
-            if (devices.length === 0) {
-                setTimeout(stopDiscoverySuccess, 1000);
-            }
-        })
-    };
-
-    discoverDevicesError = t.step_func(function (e) {
-        assert_unreached("discoverDevicesError exception:" + e.message);
-    });
-
-    stopDiscoverySuccess = t.step_func(function () {
-        adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setBluetoothDiscoveryCleanup(adapter);
-    stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+  this list of conditions and the following disclaimer in the documentation\r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+  may be used to endorse or promote products derived from this work without\r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_discoverDevices_onfound_successful</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_discoverDevices_onfound_successful\r
+//==== LABEL Check if onfound method of successful callback of discoverDevices method invoked\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MOA MAST\r
+\r
+setup({timeout:180000, explicit_done:true});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, stopDiscoverySuccess, discoverDevicesSuccessCallback,\r
+    discoverDevicesError;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      discoverDevicesSuccessCallback = {\r
+            onstarted: t.step_func(function () {\r
+            }),\r
+            ondevicefound: t.step_func(function (device) {\r
+                check_bluetooth_device(device);\r
+\r
+                t.done();\r
+            }),\r
+            ondevicedisappeared: t.step_func(function (address) {\r
+\r
+            }),\r
+            onfinished: t.step_func(function (devices) {\r
+                if (devices.length === 0) {\r
+                    setTimeout(stopDiscoverySuccess, 1000);\r
+                }\r
+            })\r
+        };\r
+\r
+        discoverDevicesError = t.step_func(function (e) {\r
+            assert_unreached("discoverDevicesError exception:" + e.message);\r
+        });\r
+\r
+        stopDiscoverySuccess = t.step_func(function () {\r
+            adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setBluetoothDiscoveryCleanup(adapter);\r
+        stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 8da49423aa5d0c96b5f5c30f11900b6e6b8b91b7..e099de1444a6000f7277e285543489174d9f633e 100755 (executable)
@@ -1,71 +1,77 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_discoverDevices_successCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_discoverDevices_successCallback_TypeMismatch
-//==== LABEL Check whether discoverDevices() method called with invalid successCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
-    conversionTable, errorCallback, stopDiscoverySuccess, successCallback;
-t.step(function () {
-    conversionTable = getTypeConversionExceptions("object", false);
-
-    errorCallback = t.step_func(function (e) {
-        assert_unreached("errorCallback exception:" + e.message);
-    });
-
-    stopDiscoverySuccess = t.step_func(function () {
-        for(i = 0; i < conversionTable.length; i++) {
-            successCallback = conversionTable[i][0];
-            exceptionName = conversionTable[i][1];
-
-            assert_throws({name: exceptionName},
-                function () {
-                    adapter.discoverDevices(successCallback, errorCallback);
-                }, "Given incorrect successCallback.");
-        }
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_discoverDevices_successCallback_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_discoverDevices_successCallback_TypeMismatch\r
+//==== LABEL Check whether discoverDevices() method called with invalid successCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+    conversionTable, errorCallback, stopDiscoverySuccess, successCallback;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        conversionTable = getTypeConversionExceptions("object", false);\r
+\r
+        errorCallback = t.step_func(function (e) {\r
+            assert_unreached("errorCallback exception:" + e.message);\r
+        });\r
+\r
+        stopDiscoverySuccess = t.step_func(function () {\r
+            for (i = 0; i < conversionTable.length; i++) {\r
+                successCallback = conversionTable[i][0];\r
+                exceptionName = conversionTable[i][1];\r
+\r
+                assert_throws({ name: exceptionName },\r
+                    function () {\r
+                        adapter.discoverDevices(successCallback, errorCallback);\r
+                    }, "Given incorrect successCallback.");\r
+            }\r
+            t.done();\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 883b1a43eb5839c1eb8f1a189d7db4ef662bacf9..732dc4820b286402e1dd8d97d52a3b189cd43266 100755 (executable)
@@ -1,70 +1,74 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_discoverDevices_successCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_discoverDevices_successCallback_invalid_cb
-//==== LABEL Check discoverDevices() argument successCallback validation - use simple function
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
-    incorrectCallback, i, stopDiscoverySuccess, discoverDevicesError, exceptionName = "TypeMismatchError", incorrectListeners;
-t.step(function () {
-    incorrectListeners = getListenerConversionExceptions(["onstarted", "ondevicefound", "ondevicedisappeared", "onfinished"]);
-
-    discoverDevicesError = t.step_func(function (e) {
-        assert_unreached("discoverDevicesError exception:" + e.message);
-    });
-
-    stopDiscoverySuccess = t.step_func(function () {
-        for(i = 0; i < incorrectListeners.length; i++) {
-            incorrectCallback = incorrectListeners[i][0];
-            exceptionName = incorrectListeners[i][1];
-            assert_throws({name: exceptionName},
-                function () {
-                    adapter.discoverDevices(incorrectCallback, discoverDevicesError);
-                }, "Given incorrect successCallback.");
-        }
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_discoverDevices_successCallback_invalid_cb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_discoverDevices_successCallback_invalid_cb\r
+//==== LABEL Check discoverDevices() argument successCallback validation - use simple function\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+    incorrectCallback, i, stopDiscoverySuccess, discoverDevicesError, exceptionName = "TypeMismatchError", incorrectListeners;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+        incorrectListeners = getListenerConversionExceptions(["onstarted", "ondevicefound", "ondevicedisappeared", "onfinished"]);\r
+        discoverDevicesError = t.step_func(function (e) {\r
+            assert_unreached("discoverDevicesError exception:" + e.message);\r
+        });\r
+\r
+        stopDiscoverySuccess = t.step_func(function () {\r
+            for (i = 0; i < incorrectListeners.length; i++) {\r
+                incorrectCallback = incorrectListeners[i][0];\r
+                exceptionName = incorrectListeners[i][1];\r
+                assert_throws({ name: exceptionName },\r
+                    function () {\r
+                        adapter.discoverDevices(incorrectCallback, discoverDevicesError);\r
+                    }, "Given incorrect successCallback.");\r
+            }\r
+            t.done();\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 8d884e164c1fd4fd43db9ed8b61d28c9a9b929e5..4099d6aba37641d2efe8787c767f2bd2e3abb0ad 100755 (executable)
@@ -1,75 +1,81 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_discoverDevices_with_errorCallback</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_discoverDevices_with_errorCallback
-//==== LABEL Check with non-optional arguments discoverDevices(valid_successCallback, errorCallback)
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MOA MAST
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, discoverDevicesErrorCB, stopDiscoverySuccess,
-    discoverDevicesSuccessCB;
-t.step(function () {
-    discoverDevicesSuccessCB = {
-        onstarted: t.step_func(function () {
-        }),
-        ondevicefound: t.step_func(function (device) {
-        }),
-        ondevicedisappeared: function (address) {
-        },
-        onfinished: t.step_func(function (devices) {
-            if(devices.length > 0){
-                t.done();
-            }else{
-                setTimeout(stopDiscoverySuccess, 1000);
-            }
-        })
-    };
-
-    discoverDevicesErrorCB = t.step_func(function (e) {
-        assert_unreached("discoverDevicesErrorCB exception:" + e.message);
-    });
-
-    stopDiscoverySuccess = t.step_func(function () {
-        adapter.discoverDevices(discoverDevicesSuccessCB, discoverDevicesErrorCB);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_discoverDevices_with_errorCallback</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_discoverDevices_with_errorCallback\r
+//==== LABEL Check with non-optional arguments discoverDevices(valid_successCallback, errorCallback)\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MOA MAST\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, discoverDevicesErrorCB, stopDiscoverySuccess,\r
+    discoverDevicesSuccessCB;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        discoverDevicesSuccessCB = {\r
+            onstarted: t.step_func(function () {\r
+            }),\r
+            ondevicefound: t.step_func(function (device) {\r
+            }),\r
+            ondevicedisappeared: function (address) {\r
+            },\r
+            onfinished: t.step_func(function (devices) {\r
+                if (devices.length > 0) {\r
+                    t.done();\r
+                } else {\r
+                    setTimeout(stopDiscoverySuccess, 1000);\r
+                }\r
+            })\r
+        };\r
+\r
+        discoverDevicesErrorCB = t.step_func(function (e) {\r
+            assert_unreached("discoverDevicesErrorCB exception:" + e.message);\r
+        });\r
+\r
+        stopDiscoverySuccess = t.step_func(function () {\r
+            adapter.discoverDevices(discoverDevicesSuccessCB, discoverDevicesErrorCB);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 448328d84d4c9314299b03cde571649d7084ee70..0e0a7b3af42caa99eb7b001684171e05123584c4 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -38,8 +38,10 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA OBX
 test(function () {
-    var adapter = tizen.bluetooth.getDefaultAdapter();
-    check_extensibility(adapter);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        var adapter = tizen.bluetooth.getDefaultAdapter();
+        check_extensibility(adapter);
+    }
 }, document.title);
 
 </script>
index 23c254c7c38cbabcf45cfe092f8dac63818a6447..3ab30fb754be23faba5956e62522321ae09eef48 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Witold Choinkowski <w.choinkowsk@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
 -->
 <html>
 
@@ -40,15 +40,17 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA MR MNA
 test(function () {
-    var globalBluetoothAdapter = tizen.bluetooth.getDefaultAdapter();
-    assert_type(globalBluetoothAdapter.setName, "function", "setName: ");
-    assert_type(globalBluetoothAdapter.discoverDevices, "function", "discoverDevices: ");
-    assert_type(globalBluetoothAdapter.stopDiscovery, "function", "stopDiscovery: ");
-    assert_type(globalBluetoothAdapter.getKnownDevices, "function", "getKnownDevices: ");
-    assert_type(globalBluetoothAdapter.getDevice, "function", "getDevice: ");
-    assert_type(globalBluetoothAdapter.createBonding, "function", "createBonding: ");
-    assert_type(globalBluetoothAdapter.destroyBonding, "function", "destroyBonding: ");
-    assert_type(globalBluetoothAdapter.registerRFCOMMServiceByUUID, "function", "registerRFCOMMServiceByUUID: ");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        var globalBluetoothAdapter = tizen.bluetooth.getDefaultAdapter();
+        assert_type(globalBluetoothAdapter.setName, "function", "setName: ");
+        assert_type(globalBluetoothAdapter.discoverDevices, "function", "discoverDevices: ");
+        assert_type(globalBluetoothAdapter.stopDiscovery, "function", "stopDiscovery: ");
+        assert_type(globalBluetoothAdapter.getKnownDevices, "function", "getKnownDevices: ");
+        assert_type(globalBluetoothAdapter.getDevice, "function", "getDevice: ");
+        assert_type(globalBluetoothAdapter.createBonding, "function", "createBonding: ");
+        assert_type(globalBluetoothAdapter.destroyBonding, "function", "destroyBonding: ");
+        assert_type(globalBluetoothAdapter.registerRFCOMMServiceByUUID, "function", "registerRFCOMMServiceByUUID: ");
+    }
 }, document.title);
 
 </script>
index 574e637a06df98143a68734d95f9c66c48a40f70..7c815d5e98ea326f815238f382b5ae56f1a8b9e6 100755 (executable)
@@ -1,77 +1,81 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_getDevice</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script type="text/javascript">
-//==== TEST: BluetoothAdapter_getDevice
-//==== LABEL Check with non-optional arguments getDevice(valid_address, valid_successCallback)
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getDevice M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MMINA MAST MR
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
-    onBondingSuccess, onBondingError, powerOnSuccess, gotDeviceInfo, retValue = null;
-t.step(function () {
-
-    add_result_callback(function() {
-        clearBonding(REMOTE_DEVICE_ADDRESS);
-    });
-
-    gotDeviceInfo = t.step_func(function (device) {
-        check_bluetooth_device(device);
-        assert_equals(retValue, undefined, "Argument getDevice returns wrong value.");
-        t.done();
-    });
-
-    onBondingSuccess = t.step_func(function () {
-        retValue = adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo);
-    });
-
-    onBondingError = t.step_func(function (e) {
-        assert_unreached("onBondingError exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_getDevice</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script type="text/javascript">\r
+//==== TEST: BluetoothAdapter_getDevice\r
+//==== LABEL Check with non-optional arguments getDevice(valid_address, valid_successCallback)\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getDevice M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MMINA MAST MR\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+    onBondingSuccess, onBondingError, powerOnSuccess, gotDeviceInfo, retValue = null;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      add_result_callback(function () {\r
+            clearBonding(REMOTE_DEVICE_ADDRESS);\r
+        });\r
+\r
+        gotDeviceInfo = t.step_func(function (device) {\r
+            check_bluetooth_device(device);\r
+            assert_equals(retValue, undefined, "Argument getDevice returns wrong value.");\r
+            t.done();\r
+        });\r
+\r
+        onBondingSuccess = t.step_func(function () {\r
+            retValue = adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo);\r
+        });\r
+\r
+        onBondingError = t.step_func(function (e) {\r
+            assert_unreached("onBondingError exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index ece941c93bac82d2aec1c7a51f8a62c43a63755d..addbf32853ccdb26af9b45c6235cbe7b9591e0df 100755 (executable)
@@ -1,71 +1,75 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification, 
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list 
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice, 
-  this list of conditions and the following disclaimer in the documentation 
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors 
-  may be used to endorse or promote products derived from this work without 
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
-  
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_getDevice_callback_onerror</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_getDevice_callback_onerror
-//==== LABEL Check if error callback of getDevice method invoked
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getDevice M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the test device MUST be turned off.
-//==== TEST_CRITERIA MERRCB
-
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOffSuccess, gotDeviceInfo, gotDeviceError;
-t.step(function () {
-
-    gotDeviceInfo = t.step_func(function (device) {
-        assert_unreached("Method getDevice shouldn't end successful.");
-    });
-
-    gotDeviceError = t.step_func(function (error) {
-        assert_equals(error.name, "ServiceNotAvailableError", "Wrong value of error name in gotDeviceError.");
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification, \r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list \r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice, \r
+  this list of conditions and the following disclaimer in the documentation \r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors \r
+  may be used to endorse or promote products derived from this work without \r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" \r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE \r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE \r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, \r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, \r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, \r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY \r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING \r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, \r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  \r
+  \r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_getDevice_callback_onerror</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_getDevice_callback_onerror\r
+//==== LABEL Check if error callback of getDevice method invoked\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getDevice M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the test device MUST be turned off.\r
+//==== TEST_CRITERIA MERRCB\r
+\r
+setup({ timeout: 180000 });\r
+var t = async_test(document.title, { timeout: 180000 }), adapter, powerOffSuccess, gotDeviceInfo, gotDeviceError;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+        gotDeviceInfo = t.step_func(function (device) {\r
+            assert_unreached("Method getDevice shouldn't end successful.");\r
+        });\r
+\r
+        gotDeviceError = t.step_func(function (error) {\r
+            assert_equals(error.name, "ServiceNotAvailableError", "Wrong value of error name in gotDeviceError.");\r
+            t.done();\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);\r
+\r
+      } else {\r
+          t.done();\r
+      }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index f87deaf193d5ccf174449923e0afe075aafe1de6..6c48ac5a71eafd2492f64c2140fb34067f17096a 100755 (executable)
@@ -1,71 +1,77 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_getDevice_errorCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_getDevice_errorCallback_TypeMismatch
-//==== LABEL Check whether getDevice() method called with invalid errorCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getDevice M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
-    conversionTable, successCallback, powerOnSuccess, errorCallback;
-t.step(function () {
-    conversionTable = getTypeConversionExceptions("functionObject", true);
-
-    successCallback = t.step_func(function () {
-        assert_unreached("Method getDevice shouldn't end successfully.");
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        for(i = 0; i < conversionTable.length; i++) {
-            errorCallback = conversionTable[i][0];
-            exceptionName = conversionTable[i][1];
-
-            assert_throws({name: exceptionName},
-                function () {
-                    adapter.getDevice(REMOTE_DEVICE_ADDRESS, successCallback, errorCallback);
-                }, "Given incorrect errorCallback.");
-        }
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_getDevice_errorCallback_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_getDevice_errorCallback_TypeMismatch\r
+//==== LABEL Check whether getDevice() method called with invalid errorCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getDevice M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+    conversionTable, successCallback, powerOnSuccess, errorCallback;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+        successCallback = t.step_func(function () {\r
+            assert_unreached("Method getDevice shouldn't end successfully.");\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            for (i = 0; i < conversionTable.length; i++) {\r
+                errorCallback = conversionTable[i][0];\r
+                exceptionName = conversionTable[i][1];\r
+\r
+                assert_throws({ name: exceptionName },\r
+                    function () {\r
+                        adapter.getDevice(REMOTE_DEVICE_ADDRESS, successCallback, errorCallback);\r
+                    }, "Given incorrect errorCallback.");\r
+            }\r
+            t.done();\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 83bda1321eb35a02c7846c1cbc2adb9951219977..79398bc2a5cc78ccefedcc33609cf9a2081135b5 100755 (executable)
@@ -1,70 +1,76 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_getDevice_errorCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_getDevice_errorCallback_invalid_cb
-//==== LABEL Check getDevice() argument errorCallback validation - use {onerror: function (){}}
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getDevice M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName = "TypeMismatchError",
-    incorrectCallback, getDeviceSuccess, powerOnSuccess;
-t.step(function () {
-    incorrectCallback = {
-        onerror: t.step_func(function (e) {
-            assert_unreached("Invalid errorCallback invoked: " + e.name + ": " + e.message);
-        })
-    };
-
-    getDeviceSuccess = t.step_func(function () {
-        assert_unreached("Method getDevice shouldn't end successfully.");
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        assert_throws({name: exceptionName},
-            function () {
-                adapter.getDevice(REMOTE_DEVICE_ADDRESS, getDeviceSuccess, incorrectCallback);
-            }, "Given incorrect errorCallback.");
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_getDevice_errorCallback_invalid_cb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_getDevice_errorCallback_invalid_cb\r
+//==== LABEL Check getDevice() argument errorCallback validation - use {onerror: function (){}}\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getDevice M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName = "TypeMismatchError",\r
+    incorrectCallback, getDeviceSuccess, powerOnSuccess;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        incorrectCallback = {\r
+            onerror: t.step_func(function (e) {\r
+                assert_unreached("Invalid errorCallback invoked: " + e.name + ": " + e.message);\r
+            })\r
+        };\r
+\r
+        getDeviceSuccess = t.step_func(function () {\r
+            assert_unreached("Method getDevice shouldn't end successfully.");\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            assert_throws({ name: exceptionName },\r
+                function () {\r
+                    adapter.getDevice(REMOTE_DEVICE_ADDRESS, getDeviceSuccess, incorrectCallback);\r
+                }, "Given incorrect errorCallback.");\r
+            t.done();\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 2e079cbaa796892e014cde30b49bdaf21e2e69b0..5a5e7d9d0ce0f501ed328c65cb4869f3fb89ecfe 100755 (executable)
@@ -26,8 +26,8 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lei, ZhanX <zhanx.lei@intel.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -47,10 +47,12 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA ME
 test(function () {
-    var adapter = tizen.bluetooth.getDefaultAdapter();
-    assert_true("getDevice" in adapter, "Method getDevice does not exist in bluetooth adapter.");
-    check_method_exists(adapter, "getDevice");
-}, document.title);
+      if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+var adapter = tizen.bluetooth.getDefaultAdapter();
+assert_true("getDevice" in adapter, "Method getDevice does not exist in bluetooth adapter.");
+check_method_exists(adapter, "getDevice");
+      }
+    }, document.title);
 
 </script>
 </body>
index 20de958c66fa7d21153d6befe7fc7d2ad2575777..afa74c440a131740f26504402234fa71db2565f3 100755 (executable)
@@ -1,59 +1,63 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_getDevice_missarg</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_getDevice_missarg
-//==== LABEL Check getDevice with missing non-optional argument
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getDevice M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MMA
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess;
-t.step(function () {
-
-    powerOnSuccess = t.step_func(function () {
-        assert_throws ({name:"TypeMismatchError"},
-            function () {
-                adapter.getDevice();
-            }, "Method with non optional argument.");
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_getDevice_missarg</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_getDevice_missarg\r
+//==== LABEL Check getDevice with missing non-optional argument\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getDevice M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MMA\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      powerOnSuccess = t.step_func(function () {\r
+            assert_throws({ name: "TypeMismatchError" },\r
+                function () {\r
+                    adapter.getDevice();\r
+                }, "Method with non optional argument.");\r
+            t.done();\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 55ae2d8ad490333aedf1b46e7c90f95841256d03..dcd6a3b2a4978dd3c70acf1190f7280f40c08869 100755 (executable)
@@ -1,71 +1,77 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_getDevice_successCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_getDevice_successCallback_TypeMismatch
-//==== LABEL Check whether getDevice() method called with invalid successCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getDevice M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
-    conversionTable, errorCallback, powerOnSuccess, successCallback;
-t.step(function () {
-    conversionTable = getTypeConversionExceptions("functionObject", false);
-
-    errorCallback = t.step_func(function (e) {
-        assert_unreached("errorCallback exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        for(i = 0; i < conversionTable.length; i++) {
-            successCallback = conversionTable[i][0];
-            exceptionName = conversionTable[i][1];
-
-            assert_throws({name: exceptionName},
-                function () {
-                    adapter.getDevice(REMOTE_DEVICE_ADDRESS, successCallback, errorCallback);
-                }, "Given incorrect successCallback.");
-        }
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_getDevice_successCallback_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_getDevice_successCallback_TypeMismatch\r
+//==== LABEL Check whether getDevice() method called with invalid successCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getDevice M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+    conversionTable, errorCallback, powerOnSuccess, successCallback;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        conversionTable = getTypeConversionExceptions("functionObject", false);\r
+\r
+        errorCallback = t.step_func(function (e) {\r
+            assert_unreached("errorCallback exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            for (i = 0; i < conversionTable.length; i++) {\r
+                successCallback = conversionTable[i][0];\r
+                exceptionName = conversionTable[i][1];\r
+\r
+                assert_throws({ name: exceptionName },\r
+                    function () {\r
+                        adapter.getDevice(REMOTE_DEVICE_ADDRESS, successCallback, errorCallback);\r
+                    }, "Given incorrect successCallback.");\r
+            }\r
+            t.done();\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index f16b17551d95b2028726c28d6914f6663f0c5534..0d9cc93ea77ebfcd3593346fdf341158675d583f 100755 (executable)
@@ -1,70 +1,76 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_getDevice_successCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_getDevice_successCallback_invalid_cb
-//==== LABEL Check if successful callback of getDevice() method invoked
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getDevice M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName = "TypeMismatchError",
-    incorrectCallback, getDeviceError, powerOnSuccess;
-t.step(function () {
-    incorrectCallback = {
-        onsuccess: t.step_func(function () {
-            assert_unreached("Method getDevice shouldn't end successfully.");
-        })
-    };
-
-    getDeviceError = t.step_func(function (e) {
-        assert_unreached("getDeviceError exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        assert_throws({name: exceptionName},
-            function () {
-                adapter.getDevice(REMOTE_DEVICE_ADDRESS, incorrectCallback, getDeviceError);
-            }, "Given incorrect successCallback.");
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_getDevice_successCallback_invalid_cb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_getDevice_successCallback_invalid_cb\r
+//==== LABEL Check if successful callback of getDevice() method invoked\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getDevice M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName = "TypeMismatchError",\r
+    incorrectCallback, getDeviceError, powerOnSuccess;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        incorrectCallback = {\r
+            onsuccess: t.step_func(function () {\r
+                assert_unreached("Method getDevice shouldn't end successfully.");\r
+            })\r
+        };\r
+\r
+        getDeviceError = t.step_func(function (e) {\r
+            assert_unreached("getDeviceError exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            assert_throws({ name: exceptionName },\r
+                function () {\r
+                    adapter.getDevice(REMOTE_DEVICE_ADDRESS, incorrectCallback, getDeviceError);\r
+                }, "Given incorrect successCallback.");\r
+            t.done();\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index ae0058c7d6fc95c5f7605ce30aa5e4932660728a..68ed26e3c4ade9820000d9c3b216db103bac8fdb 100755 (executable)
@@ -1,88 +1,92 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
-  may be used to endorse or promote products derived from this work without
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-        Lukasz Bardeli <l.bardeli@samsung.com>
-        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothAdapter_getDevice_with_errorCallback</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script type="text/javascript">
-//==== TEST: BluetoothAdapter_getDevice_with_errorCallback
-//==== LABEL Check with optional arguments getDevice(valid_address, valid_successCallback, valid_errorCallback)
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getDevice M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MOA
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
-    gotDeviceInfo, gotDeviceError, onBondingSuccess, onBondingError;
-t.step(function () {
-
-    add_result_callback(function() {
-        clearBonding(REMOTE_DEVICE_ADDRESS);
-    });
-
-    gotDeviceInfo = t.step_func(function (device) {
-        check_bluetooth_device(device);
-        t.done();
-    });
-
-    gotDeviceError = t.step_func(function (e) {
-        assert_unreached("gotDeviceError exception:" + e.message);
-    });
-
-    onBondingSuccess = t.step_func(function () {
-        adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);
-    });
-
-    onBondingError = t.step_func(function (e) {
-        assert_unreached("onBondingError exception:" + e.message);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
-
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+  this list of conditions and the following disclaimer in the documentation\r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+  may be used to endorse or promote products derived from this work without\r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_getDevice_with_errorCallback</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script type="text/javascript">\r
+//==== TEST: BluetoothAdapter_getDevice_with_errorCallback\r
+//==== LABEL Check with optional arguments getDevice(valid_address, valid_successCallback, valid_errorCallback)\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getDevice M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MOA\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+    gotDeviceInfo, gotDeviceError, onBondingSuccess, onBondingError;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      add_result_callback(function () {\r
+            clearBonding(REMOTE_DEVICE_ADDRESS);\r
+        });\r
+\r
+        gotDeviceInfo = t.step_func(function (device) {\r
+            check_bluetooth_device(device);\r
+            t.done();\r
+        });\r
+\r
+        gotDeviceError = t.step_func(function (e) {\r
+            assert_unreached("gotDeviceError exception:" + e.message);\r
+        });\r
+\r
+        onBondingSuccess = t.step_func(function () {\r
+            adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);\r
+        });\r
+\r
+        onBondingError = t.step_func(function (e) {\r
+            assert_unreached("onBondingError exception:" + e.message);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index dac7e87fb9980773dccef9dc36b504eee4943849..03786feb1b710f4383b258d2a3e774229b7b15fe 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Witold Choinkowski <w.choinkowsk@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
 -->
 <html>
 
@@ -39,13 +39,15 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA MC
 test(function () {
-    var globalBluetoothAdapter, param = [null, undefined, 1, "aaa",  [1, 2, 3], {}], i;
-    globalBluetoothAdapter = tizen.bluetooth.getDefaultAdapter();
-    for (i = 0; i < param.length; i++) {
-        assert_throws(TYPE_MISMATCH_EXCEPTION,
-            function () {
-                globalBluetoothAdapter.getDevice(REMOTE_DEVICE_ADDRESS, param[i], null);
-            }, "Given incorrect successCallback.");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        var globalBluetoothAdapter, param = [null, undefined, 1, "aaa", [1, 2, 3], {}], i;
+        globalBluetoothAdapter = tizen.bluetooth.getDefaultAdapter();
+        for (i = 0; i < param.length; i++) {
+            assert_throws(TYPE_MISMATCH_EXCEPTION,
+                function () {
+                    globalBluetoothAdapter.getDevice(REMOTE_DEVICE_ADDRESS, param[i], null);
+                }, "Given incorrect successCallback.");
+        }
     }
 }, document.title);
 
index 2eceaab11e940ac479b7c5eaf0c51f2a790485ee..4fd975178fc320033b7ebc8577ef9e0dbb42962d 100755 (executable)
@@ -1,87 +1,91 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
--->
-<html>
-
-<head>
-<title>BluetoothAdapter_getKnownDevices</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_getKnownDevices
-//==== LABEL Check with optional arguments getKnownDevices(valid_successCallback)
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MMINA MAST MR
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, testDeviceSuccessCB, discoverSuccess, discoverError,
-    stopDiscoverySuccess, retValue = null;
-t.step(function () {
-
-    testDeviceSuccessCB = t.step_func(function (devices) {
-        check_bluetooth_device_array(devices);
-        check_bluetooth_device(devices[0]);
-        assert_equals(retValue, undefined, "Method getKnownDevices returns wrong value.");
-
-        t.done();
-    });
-
-    discoverSuccess = {
-        onstarted: t.step_func(function () {
-        }),
-        ondevicefound: t.step_func(function (device) {
-        }),
-        ondevicedisappeared: function (address) {
-        },
-        onfinished: t.step_func(function (devices) {
-            if(devices.length > 0){
-                check_bluetooth_device_array(devices);
-                retValue = adapter.getKnownDevices(testDeviceSuccessCB);
-            }else{
-                setTimeout(stopDiscoverySuccess, 1000);
-            }
-        })
-    };
-
-    discoverError = t.step_func(function (e) {
-        assert_unreached("discoverError exception:" + e.message);
-    });
-
-
-    stopDiscoverySuccess = t.step_func(function () {
-        adapter.discoverDevices(discoverSuccess, discoverError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothAdapter_getKnownDevices</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_getKnownDevices\r
+//==== LABEL Check with optional arguments getKnownDevices(valid_successCallback)\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MMINA MAST MR\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, testDeviceSuccessCB, discoverSuccess, discoverError,\r
+    stopDiscoverySuccess, retValue = null;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      testDeviceSuccessCB = t.step_func(function (devices) {\r
+            check_bluetooth_device_array(devices);\r
+            check_bluetooth_device(devices[0]);\r
+            assert_equals(retValue, undefined, "Method getKnownDevices returns wrong value.");\r
+\r
+            t.done();\r
+        });\r
+\r
+        discoverSuccess = {\r
+            onstarted: t.step_func(function () {\r
+            }),\r
+            ondevicefound: t.step_func(function (device) {\r
+            }),\r
+            ondevicedisappeared: function (address) {\r
+            },\r
+            onfinished: t.step_func(function (devices) {\r
+                if (devices.length > 0) {\r
+                    check_bluetooth_device_array(devices);\r
+                    retValue = adapter.getKnownDevices(testDeviceSuccessCB);\r
+                } else {\r
+                    setTimeout(stopDiscoverySuccess, 1000);\r
+                }\r
+            })\r
+        };\r
+\r
+        discoverError = t.step_func(function (e) {\r
+            assert_unreached("discoverError exception:" + e.message);\r
+        });\r
+\r
+\r
+        stopDiscoverySuccess = t.step_func(function () {\r
+            adapter.discoverDevices(discoverSuccess, discoverError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 5e329d7cae13349f7be3d855d449a0453c48090a..f8b9fe4367d22fa718a9bffc602c0548b893d415 100755 (executable)
@@ -1,73 +1,79 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification, 
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list 
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice, 
-  this list of conditions and the following disclaimer in the documentation 
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors 
-  may be used to endorse or promote products derived from this work without 
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
-  
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_getKnownDevices_callback_onerror</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_getKnownDevices_callback_onerror
-//==== LABEL Check if error callback of getKnownDevices method invoked
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the test device MUST be turned off.
-//==== TEST_CRITERIA MERRCB
-
-setup({timeout: 180000});
-
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOffSuccess, getKnownDevicesSuccess, getKnownDevicesError;
-t.step(function () {
-
-    getKnownDevicesSuccess = t.step_func(function (devices) {
-        assert_unreached("Method getKnownDevices shouldn't end successful.");
-    });
-
-    getKnownDevicesError = t.step_func(function (e) {
-        assert_equals(e.name, "ServiceNotAvailableError", "Wrong value of error name in getKnownDevicesError.");
-        t.done();
-    });
-
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    adapter.getKnownDevices(getKnownDevicesSuccess, getKnownDevicesError);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification, \r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list \r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice, \r
+  this list of conditions and the following disclaimer in the documentation \r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors \r
+  may be used to endorse or promote products derived from this work without \r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" \r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE \r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE \r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, \r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, \r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, \r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY \r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING \r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, \r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  \r
+  \r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_getKnownDevices_callback_onerror</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_getKnownDevices_callback_onerror\r
+//==== LABEL Check if error callback of getKnownDevices method invoked\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the test device MUST be turned off.\r
+//==== TEST_CRITERIA MERRCB\r
+\r
+setup({timeout: 180000});\r
+\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOffSuccess, getKnownDevicesSuccess, getKnownDevicesError;\r
+t.step(function () {\r
+      if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+\r
+getKnownDevicesSuccess = t.step_func(function (devices) {\r
+  assert_unreached("Method getKnownDevices shouldn't end successful.");\r
+});\r
+\r
+getKnownDevicesError = t.step_func(function (e) {\r
+  assert_equals(e.name, "ServiceNotAvailableError", "Wrong value of error name in getKnownDevicesError.");\r
+  t.done();\r
+});\r
+\r
+\r
+adapter = tizen.bluetooth.getDefaultAdapter();\r
+adapter.getKnownDevices(getKnownDevicesSuccess, getKnownDevicesError);\r
+\r
+      } else {\r
+t.done();\r
+      }\r
+    });\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 0fd3136ef83f3da54052de397e02a47d69be5369..609e2089cd5215ddae73b17f90de74fd0ba116d5 100755 (executable)
@@ -1,74 +1,80 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
-  may be used to endorse or promote products derived from this work without
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothAdapter_getKnownDevices_callback_successful</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_getKnownDevices_callback_successful
-//==== LABEL Check if successful callback of getKnownDevices method invoked
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MOA
-
-setup({timeout: 180000});
-
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, getKnownDevicesSuccess, getKnownDevicesError;
-t.step(function () {
-
-    getKnownDevicesSuccess = t.step_func(function (devices) {
-        t.done();
-    });
-
-    getKnownDevicesError = t.step_func(function (e) {
-        assert_unreached("getKnownDevicesError exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.getKnownDevices(getKnownDevicesSuccess, getKnownDevicesError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+  this list of conditions and the following disclaimer in the documentation\r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+  may be used to endorse or promote products derived from this work without\r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_getKnownDevices_callback_successful</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_getKnownDevices_callback_successful\r
+//==== LABEL Check if successful callback of getKnownDevices method invoked\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MOA\r
+\r
+setup({timeout: 180000});\r
+\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, getKnownDevicesSuccess, getKnownDevicesError;\r
+t.step(function () {\r
+      if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+\r
+getKnownDevicesSuccess = t.step_func(function (devices) {\r
+  t.done();\r
+});\r
+\r
+getKnownDevicesError = t.step_func(function (e) {\r
+  assert_unreached("getKnownDevicesError exception:" + e.message);\r
+});\r
+\r
+powerOnSuccess = t.step_func(function () {\r
+  adapter.getKnownDevices(getKnownDevicesSuccess, getKnownDevicesError);\r
+});\r
+\r
+adapter = tizen.bluetooth.getDefaultAdapter();\r
+setPowered(t, adapter, powerOnSuccess);\r
+\r
+      } else {\r
+t.done();\r
+      }\r
+    });\r
+\r
+</script>\r
+</body>\r
+</html>\r
index e85359d96f147c97ab7de0cb85c7b0881e192e79..0d21c83d6d4a410b8a723da787f282b4397936ea 100755 (executable)
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Witold Choinkowski <w.choinkowsk@samsung.com>
--->
-<html>
-<head>
-<title>BluetoothAdapter_getKnownDevices_check_types</title>
-<meta charset="utf-8">
-<meta name="timeout" content="long"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_getKnownDevices_check_types
-//==== LABEL Check whether all known Bluetooth devices are listed properly (part 2)
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 300
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MMINA
-
-setup({timeout: 300000});
-
-var t = async_test(document.title, {timeout: 300000}), adapter, stopDiscoverySuccess, discoverSuccess, discoverError,
-    i, testDeviceSuccessCB, testMultipleDevicesSuccessCB;
-
-t.step(function () {
-    testDeviceSuccessCB = t.step_func(function (device) {
-        assert_type(device.name, "string", "Device name type check:");
-        assert_type(device.address, "string", "Device address type check:");
-        assert_type(device.deviceClass, "object", "Device deviceClass type check:");
-        assert_type(device.isBonded, "boolean", "Device isBonded type check:");
-        assert_type(device.isTrusted, "boolean", "Device isTrusted type check:");
-        assert_type(device.isConnected, "boolean", "Device isConnected type check:");
-        assert_type(device.deviceClass.major, "octet", "Device deviceClass.major type check:");
-        assert_type(device.deviceClass.minor, "octet", "Device deviceClass.minor type check:");
-        assert_type(device.deviceClass.services, "object", "Device deviceClass.services type check:");
-        assert_type(device.deviceClass.hasService, "function", "Device deviceClass.hasService type check:");
-        assert_type(device.deviceClass.hasService(0), "boolean", "Device deviceClass.hasService return type check:");
-        t.done();
-    });
-
-    testMultipleDevicesSuccessCB = t.step_func(function (devices) {
-        assert_not_equals(devices.length, 0, "No devices was found");
-        for (i = 0; i < devices.length; i++) {
-            testDeviceSuccessCB(devices[i]);
-        }
-    });
-
-    discoverSuccess = {
-        onstarted: t.step_func(function () {
-        }),
-        ondevicefound: t.step_func(function (device) {
-        }),
-        ondevicedisappeared: function (address) {
-        },
-        onfinished: t.step_func(function (devices) {
-            if(devices.length > 0){
-                adapter.getKnownDevices(testMultipleDevicesSuccessCB);
-            }else{
-                setTimeout(stopDiscoverySuccess, 1000);
-            }
-        })
-    };
-
-    discoverError = t.step_func(function (e) {
-        assert_unreached("discoverError exception:" + e.message);
-    });
-
-    stopDiscoverySuccess = t.step_func(function () {
-        adapter.discoverDevices(discoverSuccess, discoverError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Witold Choinkowski <w.choinkowsk@samsung.com>\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_getKnownDevices_check_types</title>\r
+<meta charset="utf-8">\r
+<meta name="timeout" content="long"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_getKnownDevices_check_types\r
+//==== LABEL Check whether all known Bluetooth devices are listed properly (part 2)\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 300\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MMINA\r
+\r
+setup({timeout: 300000});\r
+\r
+var t = async_test(document.title, {timeout: 300000}), adapter, stopDiscoverySuccess, discoverSuccess, discoverError,\r
+    i, testDeviceSuccessCB, testMultipleDevicesSuccessCB;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        testDeviceSuccessCB = t.step_func(function (device) {\r
+            assert_type(device.name, "string", "Device name type check:");\r
+            assert_type(device.address, "string", "Device address type check:");\r
+            assert_type(device.deviceClass, "object", "Device deviceClass type check:");\r
+            assert_type(device.isBonded, "boolean", "Device isBonded type check:");\r
+            assert_type(device.isTrusted, "boolean", "Device isTrusted type check:");\r
+            assert_type(device.isConnected, "boolean", "Device isConnected type check:");\r
+            assert_type(device.deviceClass.major, "octet", "Device deviceClass.major type check:");\r
+            assert_type(device.deviceClass.minor, "octet", "Device deviceClass.minor type check:");\r
+            assert_type(device.deviceClass.services, "object", "Device deviceClass.services type check:");\r
+            assert_type(device.deviceClass.hasService, "function", "Device deviceClass.hasService type check:");\r
+            assert_type(device.deviceClass.hasService(0), "boolean", "Device deviceClass.hasService return type check:");\r
+            t.done();\r
+        });\r
+\r
+        testMultipleDevicesSuccessCB = t.step_func(function (devices) {\r
+            assert_not_equals(devices.length, 0, "No devices was found");\r
+            for (i = 0; i < devices.length; i++) {\r
+                testDeviceSuccessCB(devices[i]);\r
+            }\r
+        });\r
+\r
+        discoverSuccess = {\r
+            onstarted: t.step_func(function () {\r
+            }),\r
+            ondevicefound: t.step_func(function (device) {\r
+            }),\r
+            ondevicedisappeared: function (address) {\r
+            },\r
+            onfinished: t.step_func(function (devices) {\r
+                if (devices.length > 0) {\r
+                    adapter.getKnownDevices(testMultipleDevicesSuccessCB);\r
+                } else {\r
+                    setTimeout(stopDiscoverySuccess, 1000);\r
+                }\r
+            })\r
+        };\r
+\r
+        discoverError = t.step_func(function (e) {\r
+            assert_unreached("discoverError exception:" + e.message);\r
+        });\r
+\r
+        stopDiscoverySuccess = t.step_func(function () {\r
+            adapter.discoverDevices(discoverSuccess, discoverError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 2a99e9154470e14c788243b2d67ef22d90e6cbb3..3bafaf2a1ee6bcd6aefe054972d1920cb895571b 100755 (executable)
@@ -1,71 +1,77 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_getKnownDevices_errorCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_getKnownDevices_errorCallback_TypeMismatch
-//==== LABEL Check whether getKnownDevices() method called with invalid errorCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
-    conversionTable, successCallback, powerOnSuccess, errorCallback;
-t.step(function () {
-    conversionTable = getTypeConversionExceptions("functionObject", true);
-
-    successCallback = t.step_func(function () {
-        assert_unreached("successCallback shouldn't be call");
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        for(i = 0; i < conversionTable.length; i++) {
-            errorCallback = conversionTable[i][0];
-            exceptionName = conversionTable[i][1];
-
-            assert_throws({name: exceptionName},
-            function () {
-                adapter.getKnownDevices(successCallback, errorCallback);
-            }, "Given incorrect errorCallback.");
-        }
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_getKnownDevices_errorCallback_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_getKnownDevices_errorCallback_TypeMismatch\r
+//==== LABEL Check whether getKnownDevices() method called with invalid errorCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+    conversionTable, successCallback, powerOnSuccess, errorCallback;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+        successCallback = t.step_func(function () {\r
+            assert_unreached("successCallback shouldn't be call");\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            for (i = 0; i < conversionTable.length; i++) {\r
+                errorCallback = conversionTable[i][0];\r
+                exceptionName = conversionTable[i][1];\r
+\r
+                assert_throws({ name: exceptionName },\r
+                    function () {\r
+                        adapter.getKnownDevices(successCallback, errorCallback);\r
+                    }, "Given incorrect errorCallback.");\r
+            }\r
+            t.done();\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 24e409b1a2172c2c90bdc1796c2b9de739022421..c37520773a515054c80f813cbe8cb54662a9b539 100755 (executable)
@@ -1,70 +1,76 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_getKnownDevices_errorCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_getKnownDevices_errorCallback_invalid_cb
-//==== LABEL Check getKnownDevices() argument errorCallback validation - use {onerror: function (){}}
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName = "TypeMismatchError",
-    incorrectCallback, getKnownDevicesSuccess, powerOnSuccess;
-t.step(function () {
-    incorrectCallback = {
-        onerror: t.step_func(function (e) {
-            assert_unreached("Invalid errorCallback invoked: " + e.name + ": " + e.message);
-        })
-    };
-
-    getKnownDevicesSuccess = t.step_func(function () {
-        assert_unreached("Method getKnownDevices shouldn't end successfully.");
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        assert_throws({name: exceptionName},
-            function () {
-                adapter.getKnownDevices(getKnownDevicesSuccess, incorrectCallback);
-            }, "Given incorrect errorCallback.");
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_getKnownDevices_errorCallback_invalid_cb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_getKnownDevices_errorCallback_invalid_cb\r
+//==== LABEL Check getKnownDevices() argument errorCallback validation - use {onerror: function (){}}\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName = "TypeMismatchError",\r
+    incorrectCallback, getKnownDevicesSuccess, powerOnSuccess;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        incorrectCallback = {\r
+            onerror: t.step_func(function (e) {\r
+                assert_unreached("Invalid errorCallback invoked: " + e.name + ": " + e.message);\r
+            })\r
+        };\r
+\r
+        getKnownDevicesSuccess = t.step_func(function () {\r
+            assert_unreached("Method getKnownDevices shouldn't end successfully.");\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            assert_throws({ name: exceptionName },\r
+                function () {\r
+                    adapter.getKnownDevices(getKnownDevicesSuccess, incorrectCallback);\r
+                }, "Given incorrect errorCallback.");\r
+            t.done();\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 26910f4d0a9f131b9c89de894a2426eea13ebbee..dd401c3843dd31c1565d82acbb6cacbbe6cffead 100755 (executable)
@@ -26,7 +26,7 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
+Lei, ZhanX <zhanx.lei@intel.com>
 
 -->
 <html>
@@ -46,10 +46,12 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA ME
 test(function () {
-    var adapter = tizen.bluetooth.getDefaultAdapter();
-    assert_true("getKnownDevices" in adapter, "Method getKnownDevices does not exist in bluetooth adapter.");
-    check_method_exists(adapter, "getKnownDevices");
-}, document.title);
+      if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+var adapter = tizen.bluetooth.getDefaultAdapter();
+assert_true("getKnownDevices" in adapter, "Method getKnownDevices does not exist in bluetooth adapter.");
+check_method_exists(adapter, "getKnownDevices");
+      }
+    }, document.title);
 
 </script>
 </body>
index e39e15145c273e4738d4dbe4a781ac9b1c014d9c..5ab577e03d6b5ff76b4ff013932f220ab250ecef 100755 (executable)
@@ -1,59 +1,63 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_getKnownDevices_missarg</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_getKnownDevices_missarg
-//==== LABEL Check getKnownDevices with missing non-optional argument
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MMA
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess;
-t.step(function () {
-
-    powerOnSuccess = t.step_func(function () {
-        assert_throws ({name:"TypeMismatchError"},
-            function () {
-                adapter.getKnownDevices();
-            }, "Method with non optional argument.");
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_getKnownDevices_missarg</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_getKnownDevices_missarg\r
+//==== LABEL Check getKnownDevices with missing non-optional argument\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MMA\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      powerOnSuccess = t.step_func(function () {\r
+            assert_throws({ name: "TypeMismatchError" },\r
+                function () {\r
+                    adapter.getKnownDevices();\r
+                }, "Method with non optional argument.");\r
+            t.done();\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 4a4ee32780e5e6cf6d29406890e69e03c3c0ec7c..9fbcbe858ada3f78f12846a4013dd630430966fc 100755 (executable)
@@ -1,71 +1,77 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_getKnownDevices_successCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_getKnownDevices_successCallback_TypeMismatch
-//==== LABEL Check whether getKnownDevices() method called with invalid successCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
-    conversionTable, errorCallback, powerOnSuccess, successCallback;
-t.step(function () {
-    conversionTable = getTypeConversionExceptions("functionObject", false);
-
-    errorCallback = t.step_func(function (e) {
-        assert_unreached("errorCallback exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        for(i = 0; i < conversionTable.length; i++) {
-            successCallback = conversionTable[i][0];
-            exceptionName = conversionTable[i][1];
-
-            assert_throws({name: exceptionName},
-                function () {
-                    adapter.getKnownDevices(successCallback, errorCallback);
-                }, "Given incorrect successCallback.");
-        }
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_getKnownDevices_successCallback_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_getKnownDevices_successCallback_TypeMismatch\r
+//==== LABEL Check whether getKnownDevices() method called with invalid successCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+    conversionTable, errorCallback, powerOnSuccess, successCallback;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        conversionTable = getTypeConversionExceptions("functionObject", false);\r
+\r
+        errorCallback = t.step_func(function (e) {\r
+            assert_unreached("errorCallback exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            for (i = 0; i < conversionTable.length; i++) {\r
+                successCallback = conversionTable[i][0];\r
+                exceptionName = conversionTable[i][1];\r
+\r
+                assert_throws({ name: exceptionName },\r
+                    function () {\r
+                        adapter.getKnownDevices(successCallback, errorCallback);\r
+                    }, "Given incorrect successCallback.");\r
+            }\r
+            t.done();\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index a67d4a29daaf814dd4b8f5d178fd391f8b5df07a..7abe2676a0c012cad7300efe7076c9434c8abd50 100755 (executable)
@@ -1,70 +1,76 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_getKnownDevices_successCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_getKnownDevices_successCallback_invalid_cb
-//==== LABEL Check getKnownDevices() argument successCallback validation - use {onsuccess: function (){}}
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
-    incorrectCallback, getKnownDevicesError, powerOnSuccess, exceptionName = "TypeMismatchError";
-t.step(function () {
-    incorrectCallback = {
-        onsuccess: t.step_func(function () {
-            assert_unreached("Method getKnownDevices shouldn't end successfully.");
-        })
-    };
-
-    getKnownDevicesError = t.step_func(function (e) {
-        assert_unreached("getKnownDevicesError exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        assert_throws({name: exceptionName},
-            function () {
-                adapter.getKnownDevices(incorrectCallback, getKnownDevicesError);
-            }, "Given incorrect successCallback.");
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_getKnownDevices_successCallback_invalid_cb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_getKnownDevices_successCallback_invalid_cb\r
+//==== LABEL Check getKnownDevices() argument successCallback validation - use {onsuccess: function (){}}\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+    incorrectCallback, getKnownDevicesError, powerOnSuccess, exceptionName = "TypeMismatchError";\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        incorrectCallback = {\r
+            onsuccess: t.step_func(function () {\r
+                assert_unreached("Method getKnownDevices shouldn't end successfully.");\r
+            })\r
+        };\r
+\r
+        getKnownDevicesError = t.step_func(function (e) {\r
+            assert_unreached("getKnownDevicesError exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            assert_throws({ name: exceptionName },\r
+                function () {\r
+                    adapter.getKnownDevices(incorrectCallback, getKnownDevicesError);\r
+                }, "Given incorrect successCallback.");\r
+            t.done();\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 162a1715894191f26533f8340fcd885fdf770bd0..421bafefcf31e3f02603bd5fe304a62528d3c9f8 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Witold Choinkowski <w.choinkowsk@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
 -->
 <html>
 
@@ -39,14 +39,16 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA MC
 test(function () {
-    var globalBluetoothAdapter, param = [null, undefined, 1, "aaa",  [1, 2, 3], {}], i;
-    globalBluetoothAdapter = tizen.bluetooth.getDefaultAdapter(1);
-
-    for (i = 0; i < param.length; i++) {
-        assert_throws(TYPE_MISMATCH_EXCEPTION,
-            function () {
-                globalBluetoothAdapter.getKnownDevices(param[i], null);
-            }, "Given incorrect successCallback.");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        var globalBluetoothAdapter, param = [null, undefined, 1, "aaa", [1, 2, 3], {}], i;
+        globalBluetoothAdapter = tizen.bluetooth.getDefaultAdapter(1);
+
+        for (i = 0; i < param.length; i++) {
+            assert_throws(TYPE_MISMATCH_EXCEPTION,
+                function () {
+                    globalBluetoothAdapter.getKnownDevices(param[i], null);
+                }, "Given incorrect successCallback.");
+        }
     }
 }, document.title);
 
index 27fb96ea05f86e2077a2804fcdf994272a90f7d9..b1be21c59d25265258da91ec1db9326c7097e530 100755 (executable)
@@ -1,92 +1,98 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
--->
-<html>
-
-<head>
-<title>BluetoothAdapter_getKnownDevices_with_errorCallback</title>
-<meta charset="utf-8">
-<meta name="timeout" content="long"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_getKnownDevices_with_errorCallback
-//==== LABEL Check with optional arguments getKnownDevices(valid_successCallback, valid_errorCallback)
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 300
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MOA
-
-setup({timeout: 300000});
-
-var t = async_test(document.title, {timeout: 300000}), adapter, getKnownDevicesErrorCB, testDeviceSuccessCB,
-    testMultipleDevicesSuccessCB, discoverSuccess, discoverError, stopDiscoverySuccess;
-
-t.step(function () {
-    getKnownDevicesErrorCB = t.step_func(function (e) {
-        assert_unreached("onError exception:" + e.message);
-    });
-
-    testDeviceSuccessCB = t.step_func(function (device) {
-        check_bluetooth_device(device);
-        t.done();
-    });
-
-    testMultipleDevicesSuccessCB = t.step_func(function (devices) {
-        testDeviceSuccessCB(devices[0]);
-    });
-
-    discoverSuccess = {
-        onstarted: t.step_func(function () {
-        }),
-        ondevicefound: t.step_func(function (device) {
-        }),
-        ondevicedisappeared: function (address) {
-        },
-        onfinished: t.step_func(function (devices) {
-            if (devices.length > 0){
-                adapter.getKnownDevices(testMultipleDevicesSuccessCB, getKnownDevicesErrorCB);
-            }else{
-                setTimeout(stopDiscoverySuccess, 1000);
-            }
-        })
-    };
-
-    discoverError = t.step_func(function (e) {
-        assert_unreached("discoverError exception:" + e.message);
-    });
-
-    stopDiscoverySuccess = t.step_func(function () {
-        adapter.discoverDevices(discoverSuccess, discoverError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothAdapter_getKnownDevices_with_errorCallback</title>\r
+<meta charset="utf-8">\r
+<meta name="timeout" content="long"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_getKnownDevices_with_errorCallback\r
+//==== LABEL Check with optional arguments getKnownDevices(valid_successCallback, valid_errorCallback)\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 300\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MOA\r
+\r
+setup({timeout: 300000});\r
+\r
+var t = async_test(document.title, {timeout: 300000}), adapter, getKnownDevicesErrorCB, testDeviceSuccessCB,\r
+    testMultipleDevicesSuccessCB, discoverSuccess, discoverError, stopDiscoverySuccess;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        getKnownDevicesErrorCB = t.step_func(function (e) {\r
+            assert_unreached("onError exception:" + e.message);\r
+        });\r
+\r
+        testDeviceSuccessCB = t.step_func(function (device) {\r
+            check_bluetooth_device(device);\r
+            t.done();\r
+        });\r
+\r
+        testMultipleDevicesSuccessCB = t.step_func(function (devices) {\r
+            testDeviceSuccessCB(devices[0]);\r
+        });\r
+\r
+        discoverSuccess = {\r
+            onstarted: t.step_func(function () {\r
+            }),\r
+            ondevicefound: t.step_func(function (device) {\r
+            }),\r
+            ondevicedisappeared: function (address) {\r
+            },\r
+            onfinished: t.step_func(function (devices) {\r
+                if (devices.length > 0) {\r
+                    adapter.getKnownDevices(testMultipleDevicesSuccessCB, getKnownDevicesErrorCB);\r
+                } else {\r
+                    setTimeout(stopDiscoverySuccess, 1000);\r
+                }\r
+            })\r
+        };\r
+\r
+        discoverError = t.step_func(function (e) {\r
+            assert_unreached("discoverError exception:" + e.message);\r
+        });\r
+\r
+        stopDiscoverySuccess = t.step_func(function () {\r
+            adapter.discoverDevices(discoverSuccess, discoverError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index c94ca4e6d73ba8305cfbc4dd637c404049ff8402..46f79461f90303d0bafc3732b9efd1f41c4e45ee 100755 (executable)
@@ -26,7 +26,7 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
+Lei, ZhanX <zhanx.lei@intel.com>
 
 -->
 <html>
@@ -47,9 +47,11 @@ Authors:
 //==== TEST_CRITERIA AE AT ARO
 var adapter = null;
 test(function () {
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    check_readonly(adapter, "name", adapter.name, "string", REMOTE_DEVICE_NAME + "Tizen");
-}, document.title);
+      if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+adapter = tizen.bluetooth.getDefaultAdapter();
+check_readonly(adapter, "name", adapter.name, "string", REMOTE_DEVICE_NAME + "Tizen");
+      }
+    }, document.title);
 
 </script>
 </body>
index eaecedd4733c297d2d089048a2d652290a348cab..e19ee6c4085986d6eab0d6f055726313b77cc837 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -38,7 +38,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA NIO
 test(function () {
-    check_no_interface_object("BluetoothAdapter");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_no_interface_object("BluetoothAdapter");
+    }
 }, document.title);
 
 </script>
index de90b13945532f689f84fb5f07aad8b85fa140cf..e43e94c2b6c1b4f41771df767dfbca3021ed28fe 100755 (executable)
@@ -26,7 +26,7 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
+Lei, ZhanX <zhanx.lei@intel.com>
 
 -->
 <html>
@@ -47,9 +47,11 @@ Authors:
 //==== TEST_CRITERIA AE AT ARO
 var adapter = null;
 test(function () {
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    check_readonly(adapter, "powered", adapter.powered, "boolean", !(adapter.powered));
-}, document.title);
+      if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+adapter = tizen.bluetooth.getDefaultAdapter();
+check_readonly(adapter, "powered", adapter.powered, "boolean", !(adapter.powered));
+      }
+    }, document.title);
 
 </script>
 </body>
index 4b4ebcbdbf75de1dac5b87d79254b98160395a28..27584d5540269a3b28593fd4e4589e0b831f2862 100755 (executable)
@@ -1,77 +1,83 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
-  may be used to endorse or promote products derived from this work without
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothAdapter_registerRFCOMMServiceByUUID</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID
-//==== LABEL Check with optional arguments registerRFCOMMServiceByUUID(valid_uuid, valid_name, valid_successCallback)
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MMINA MAST MR
-setup({timeout:180000, explicit_done:true});
-var adapter = null, t = async_test(document.title, {timeout: 180000}), registerRFCOMMServiceByUUIDSuccess,
-    powerOnSuccess, retValue = null;
-t.step(function () {
-
-    registerRFCOMMServiceByUUIDSuccess = t.step_func(function (handler) {
-        setBluetoothHandlerCleanup(handler);
-        assert_true("uuid" in handler, "No uuid in recordHandler.");
-        assert_true("name" in handler, "No name in recordHandler.");
-        assert_true("isConnected" in handler, "No isConnected in recordHandler.");
-        assert_true("onconnect" in handler, "No onconnect in recordHandler.");
-        assert_type(handler.unregister, "function", "Method unregister does not exist.");
-        assert_equals(retValue, undefined, "Method registerRFCOMMServiceByUUID returns wrong value.");
-        handler.unregister();
-        t.done();
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        retValue = adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+  this list of conditions and the following disclaimer in the documentation\r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+  may be used to endorse or promote products derived from this work without\r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_registerRFCOMMServiceByUUID</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID\r
+//==== LABEL Check with optional arguments registerRFCOMMServiceByUUID(valid_uuid, valid_name, valid_successCallback)\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MMINA MAST MR\r
+setup({timeout:180000, explicit_done:true});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), registerRFCOMMServiceByUUIDSuccess,\r
+    powerOnSuccess, retValue = null;\r
+t.step(function () {\r
+      if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+\r
+registerRFCOMMServiceByUUIDSuccess = t.step_func(function (handler) {\r
+  setBluetoothHandlerCleanup(handler);\r
+  assert_true("uuid" in handler, "No uuid in recordHandler.");\r
+  assert_true("name" in handler, "No name in recordHandler.");\r
+  assert_true("isConnected" in handler, "No isConnected in recordHandler.");\r
+  assert_true("onconnect" in handler, "No onconnect in recordHandler.");\r
+  assert_type(handler.unregister, "function", "Method unregister does not exist.");\r
+  assert_equals(retValue, undefined, "Method registerRFCOMMServiceByUUID returns wrong value.");\r
+  handler.unregister();\r
+  t.done();\r
+});\r
+\r
+powerOnSuccess = t.step_func(function () {\r
+  retValue = adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess);\r
+});\r
+\r
+adapter = tizen.bluetooth.getDefaultAdapter();\r
+setPowered(t, adapter, powerOnSuccess);\r
+\r
+      } else {\r
+t.done();\r
+      }\r
+    });\r
+\r
+</script>\r
+</body>\r
+</html>\r
index e88913c33fae2918151ad4c242f9378460f780f6..00d2dbc1bb392cb3eaee81bc212e64d8a9956919 100755 (executable)
@@ -1,71 +1,77 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_registerRFCOMMServiceByUUID_errorCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID_errorCallback_TypeMismatch
-//==== LABEL Check whether registerRFCOMMServiceByUUID() method called with invalid errorCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
-    conversionTable, successCallback, powerOnSuccess, exceptionName, errorCallback;
-t.step(function () {
-    conversionTable = getTypeConversionExceptions("functionObject", true);
-
-    successCallback = t.step_func(function () {
-        assert_unreached("Method registerRFCOMMServiceByUUID shouldn't end successfully.");
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        for(i = 0; i < conversionTable.length; i++) {
-            errorCallback = conversionTable[i][0];
-            exceptionName = conversionTable[i][1];
-
-            assert_throws({name: exceptionName},
-                function () {
-                    adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", successCallback, errorCallback);
-                }, "Given incorrect errorCallback.");
-        }
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_registerRFCOMMServiceByUUID_errorCallback_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID_errorCallback_TypeMismatch\r
+//==== LABEL Check whether registerRFCOMMServiceByUUID() method called with invalid errorCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+    conversionTable, successCallback, powerOnSuccess, exceptionName, errorCallback;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+        successCallback = t.step_func(function () {\r
+            assert_unreached("Method registerRFCOMMServiceByUUID shouldn't end successfully.");\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            for (i = 0; i < conversionTable.length; i++) {\r
+                errorCallback = conversionTable[i][0];\r
+                exceptionName = conversionTable[i][1];\r
+\r
+                assert_throws({ name: exceptionName },\r
+                    function () {\r
+                        adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", successCallback, errorCallback);\r
+                    }, "Given incorrect errorCallback.");\r
+            }\r
+            t.done();\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index f9ed94834bb2c66405848ace1731e75755f26c4c..46903994ac2f05f102c3e8a79d17534f5ae3c80e 100755 (executable)
@@ -1,70 +1,76 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_registerRFCOMMServiceByUUID_errorCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID_errorCallback_invalid_cb
-//==== LABEL Check argument registerRFCOMMServiceByUUID() errorCallback validation
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
-    incorrectCallback, registerRFCOMMServiceByUUIDSuccess, powerOnSuccess, exceptionName = "TypeMismatchError";
-t.step(function () {
-    incorrectCallback = {
-        onerror: t.step_func(function (e) {
-            assert_unreached("Invalid errorCallback invoked: " + e.name + ": " + e.message);
-        })
-    };
-
-    registerRFCOMMServiceByUUIDSuccess = t.step_func(function () {
-        assert_unreached("Method registerRFCOMMServiceByUUID shouldn't end successfully.");
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        assert_throws({name: exceptionName},
-            function () {
-                adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess, incorrectCallback);
-            }, "Given incorrect errorCallback.");
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_registerRFCOMMServiceByUUID_errorCallback_invalid_cb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID_errorCallback_invalid_cb\r
+//==== LABEL Check argument registerRFCOMMServiceByUUID() errorCallback validation\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+    incorrectCallback, registerRFCOMMServiceByUUIDSuccess, powerOnSuccess, exceptionName = "TypeMismatchError";\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        incorrectCallback = {\r
+            onerror: t.step_func(function (e) {\r
+                assert_unreached("Invalid errorCallback invoked: " + e.name + ": " + e.message);\r
+            })\r
+        };\r
+\r
+        registerRFCOMMServiceByUUIDSuccess = t.step_func(function () {\r
+            assert_unreached("Method registerRFCOMMServiceByUUID shouldn't end successfully.");\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            assert_throws({ name: exceptionName },\r
+                function () {\r
+                    adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess, incorrectCallback);\r
+                }, "Given incorrect errorCallback.");\r
+            t.done();\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index b50d57f57e6203c626ae089815788b83a7aabeb6..23fb0a8ee7d5657205ac84c5d57ccfd66a92daa0 100755 (executable)
@@ -26,7 +26,7 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
+Lei, ZhanX <zhanx.lei@intel.com>
 
 -->
 <html>
@@ -46,10 +46,12 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA ME
 test(function () {
-    var adapter = tizen.bluetooth.getDefaultAdapter();
-    assert_true("registerRFCOMMServiceByUUID" in adapter, "Method registerRFCOMMServiceByUUID does not exist in bluetooth adapter.");
-    check_method_exists(adapter, "registerRFCOMMServiceByUUID");
-}, document.title);
+      if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+var adapter = tizen.bluetooth.getDefaultAdapter();
+assert_true("registerRFCOMMServiceByUUID" in adapter, "Method registerRFCOMMServiceByUUID does not exist in bluetooth adapter.");
+check_method_exists(adapter, "registerRFCOMMServiceByUUID");
+      }
+    }, document.title);
 
 </script>
 </body>
index c5d8ab0c820a80086fb98d8cfd732891140dbb9f..5b6dcf01adfded250b23a4efcd295c52ca9eca90 100755 (executable)
@@ -1,59 +1,63 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_registerRFCOMMServiceByUUID_missarg</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID_missarg
-//==== LABEL Check registerRFCOMMServiceByUUID with missing non-optional argument
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MMA
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess;
-t.step(function () {
-
-    powerOnSuccess = t.step_func(function () {
-        assert_throws ({name:"TypeMismatchError"},
-            function () {
-                adapter.registerRFCOMMServiceByUUID();
-            }, "Method with non optional argument.");
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_registerRFCOMMServiceByUUID_missarg</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID_missarg\r
+//==== LABEL Check registerRFCOMMServiceByUUID with missing non-optional argument\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MMA\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      powerOnSuccess = t.step_func(function () {\r
+            assert_throws({ name: "TypeMismatchError" },\r
+                function () {\r
+                    adapter.registerRFCOMMServiceByUUID();\r
+                }, "Method with non optional argument.");\r
+            t.done();\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index bae6b35dae76aa9724395112ce9d1dadb7145ca1..6c4b9b3aaf298855554b8252098e07f600842088 100755 (executable)
@@ -1,90 +1,94 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
-  may be used to endorse or promote products derived from this work without
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-        Lukasz Bardeli <l.bardeli@samsung.com>
-        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothAdapter_registerRFCOMMServiceByUUID_onconnect_successful</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<ul id="testdetails" style="display:none;">
-    <li>1. Push "Search" button on the remote device.</li>
-    <li>2. Select this device among found devices after discovering is finished.</li>
-    <li>3. Push "Connect to service" button on the remote device.</li>
-</ul>
-<script>
-//==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID_onconnect_successful
-//==== LABEL Check whether a service record is registered and onconnect is called
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== STEP Push [Search] button on the remote device after description is appeared..
-//==== EXPECT The test device is found by the remote device.
-//==== STEP Push [Connect to service] button on the remote device after selecting test device among found devices.
-//==== EXPECT onconnect is called.
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE tct-bt-helper MUST be launched on the remote device.
-//==== TEST_CRITERIA MOA MAST
-setup({timeout:180000, explicit_done:true});
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
-    registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError, visibleSuccess, visibleError;
-t.step(function () {
-
-    add_result_callback(function() {
-        clearBonding(REMOTE_DEVICE_ADDRESS);
-    });
-
-    registerRFCOMMServiceByUUIDSuccess = t.step_func(function (handler) {
-        setBluetoothHandlerCleanup(handler);
-        handler.onconnect = t.step_func(function (socket) {
-            t.done();
-        });
-        document.getElementById("testdetails").style["display"] = "";
-    });
-
-    registerRFCOMMServiceByUUIDError = t.step_func(function (e) {
-        assert_unreached("registerRFCOMMServiceByUUIDError exception:" + e.message);
-    });
-
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+  this list of conditions and the following disclaimer in the documentation\r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+  may be used to endorse or promote products derived from this work without\r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_registerRFCOMMServiceByUUID_onconnect_successful</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<ul id="testdetails" style="display:none;">\r
+    <li>1. Push "Search" button on the remote device.</li>\r
+    <li>2. Select this device among found devices after discovering is finished.</li>\r
+    <li>3. Push "Connect to service" button on the remote device.</li>\r
+</ul>\r
+<script>\r
+//==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID_onconnect_successful\r
+//==== LABEL Check whether a service record is registered and onconnect is called\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== STEP Push [Search] button on the remote device after description is appeared..\r
+//==== EXPECT The test device is found by the remote device.\r
+//==== STEP Push [Connect to service] button on the remote device after selecting test device among found devices.\r
+//==== EXPECT onconnect is called.\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE tct-bt-helper MUST be launched on the remote device.\r
+//==== TEST_CRITERIA MOA MAST\r
+setup({timeout:180000, explicit_done:true});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+    registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError, visibleSuccess, visibleError;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      add_result_callback(function () {\r
+            clearBonding(REMOTE_DEVICE_ADDRESS);\r
+        });\r
+\r
+        registerRFCOMMServiceByUUIDSuccess = t.step_func(function (handler) {\r
+            setBluetoothHandlerCleanup(handler);\r
+            handler.onconnect = t.step_func(function (socket) {\r
+                t.done();\r
+            });\r
+            document.getElementById("testdetails").style["display"] = "";\r
+        });\r
+\r
+        registerRFCOMMServiceByUUIDError = t.step_func(function (e) {\r
+            assert_unreached("registerRFCOMMServiceByUUIDError exception:" + e.message);\r
+        });\r
+\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 62ab653583af6e1940a3cf7fde886d95d2ba60ac..6319673862ba31732af81f64a17f1f7e5e03349b 100755 (executable)
@@ -1,75 +1,81 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification, 
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list 
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice, 
-  this list of conditions and the following disclaimer in the documentation 
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors 
-  may be used to endorse or promote products derived from this work without 
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
-  
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_registerRFCOMMServiceByUUID_onerror</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID_onerror
-//==== LABEL Check if error callback of registerRFCOMMServiceByUUID method invoked
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the test device MUST be turned off.
-//==== TEST_CRITERIA MERRCB
-
-setup({timeout: 180000, explicit_done:true});
-
-var t = async_test(document.title, {timeout: 180000}),
-    adapter, powerOffSuccess, chatServiceSuccessCallback, chatServiceErrorCallback;
-
-t.step(function () {
-
-    chatServiceSuccessCallback = t.step_func(function (handler) {
-        setBluetoothHandlerCleanup(handler);
-        assert_unreached("Method registerRFCOMMServiceByUUID shouldn't end successful.");
-    });
-
-    chatServiceErrorCallback = t.step_func(function (e) {
-        assert_equals(e.name, "ServiceNotAvailableError", "Wrong value of error name in chatServiceErrorCallback.");
-        t.done();
-        done();
-    });
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCallback, chatServiceErrorCallback);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification, \r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list \r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice, \r
+  this list of conditions and the following disclaimer in the documentation \r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors \r
+  may be used to endorse or promote products derived from this work without \r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" \r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE \r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE \r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, \r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, \r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, \r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY \r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING \r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, \r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  \r
+  \r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_registerRFCOMMServiceByUUID_onerror</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID_onerror\r
+//==== LABEL Check if error callback of registerRFCOMMServiceByUUID method invoked\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the test device MUST be turned off.\r
+//==== TEST_CRITERIA MERRCB\r
+\r
+setup({timeout: 180000, explicit_done:true});\r
+\r
+var t = async_test(document.title, {timeout: 180000}),\r
+    adapter, powerOffSuccess, chatServiceSuccessCallback, chatServiceErrorCallback;\r
+\r
+t.step(function () {\r
+      if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+\r
+chatServiceSuccessCallback = t.step_func(function (handler) {\r
+  setBluetoothHandlerCleanup(handler);\r
+  assert_unreached("Method registerRFCOMMServiceByUUID shouldn't end successful.");\r
+});\r
+\r
+chatServiceErrorCallback = t.step_func(function (e) {\r
+  assert_equals(e.name, "ServiceNotAvailableError", "Wrong value of error name in chatServiceErrorCallback.");\r
+  t.done();\r
+  done();\r
+});\r
+adapter = tizen.bluetooth.getDefaultAdapter();\r
+adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCallback, chatServiceErrorCallback);\r
+\r
+      } else {\r
+t.done();\r
+      }\r
+    });\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 1d60827f1d063bccedfab39a9fd626057bb8089c..d021ae634063e210db5894bfad8a2d11d24dee8a 100755 (executable)
@@ -1,71 +1,77 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_registerRFCOMMServiceByUUID_successCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID_successCallback_TypeMismatch
-//==== LABEL Check whether registerRFCOMMServiceByUUID() method called with invalid successCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
-    conversionTable, successCallback, errorCallback, powerOnSuccess;
-t.step(function () {
-    conversionTable = getTypeConversionExceptions("functionObject", false);
-
-    errorCallback = t.step_func(function (e) {
-        assert_unreached("Method registerRFCOMMServiceByUUID shouldn't end successfully.");
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        for(i = 0; i < conversionTable.length; i++) {
-            successCallback = conversionTable[i][0];
-            exceptionName = conversionTable[i][1];
-
-            assert_throws({name: exceptionName},
-                function () {
-                    adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", successCallback, errorCallback);
-                }, "Given incorrect successCallback.");
-        }
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_registerRFCOMMServiceByUUID_successCallback_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID_successCallback_TypeMismatch\r
+//==== LABEL Check whether registerRFCOMMServiceByUUID() method called with invalid successCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+    conversionTable, successCallback, errorCallback, powerOnSuccess;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        conversionTable = getTypeConversionExceptions("functionObject", false);\r
+\r
+        errorCallback = t.step_func(function (e) {\r
+            assert_unreached("Method registerRFCOMMServiceByUUID shouldn't end successfully.");\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            for (i = 0; i < conversionTable.length; i++) {\r
+                successCallback = conversionTable[i][0];\r
+                exceptionName = conversionTable[i][1];\r
+\r
+                assert_throws({ name: exceptionName },\r
+                    function () {\r
+                        adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", successCallback, errorCallback);\r
+                    }, "Given incorrect successCallback.");\r
+            }\r
+            t.done();\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 9f3be1438f815b675221412d1eac9c204d0c8cd4..34507fd84a1bc282c4019edd8fa8a58d5ca291be 100755 (executable)
@@ -1,70 +1,76 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_registerRFCOMMServiceByUUID_successCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID_successCallback_invalid_cb
-//==== LABEL Check argument registerRFCOMMServiceByUUID() successCallback validation - use {onsuccess: function (){}}
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
-    incorrectCallback, registerRFCOMMServiceByUUIDError, powerOnSuccess, exceptionName = "TypeMismatchError";
-t.step(function () {
-    incorrectCallback = {
-        onsuccess: t.step_func(function () {
-            assert_unreached("Method registerRFCOMMServiceByUUID shouldn't end successfully.");
-        })
-    };
-
-    registerRFCOMMServiceByUUIDError = t.step_func(function (e) {
-        assert_unreached("registerRFCOMMServiceByUUIDError exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        assert_throws({name: exceptionName},
-            function () {
-                adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", incorrectCallback, registerRFCOMMServiceByUUIDError);
-            }, "Given incorrect successCallback.");
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_registerRFCOMMServiceByUUID_successCallback_invalid_cb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID_successCallback_invalid_cb\r
+//==== LABEL Check argument registerRFCOMMServiceByUUID() successCallback validation - use {onsuccess: function (){}}\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+    incorrectCallback, registerRFCOMMServiceByUUIDError, powerOnSuccess, exceptionName = "TypeMismatchError";\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        incorrectCallback = {\r
+            onsuccess: t.step_func(function () {\r
+                assert_unreached("Method registerRFCOMMServiceByUUID shouldn't end successfully.");\r
+            })\r
+        };\r
+\r
+        registerRFCOMMServiceByUUIDError = t.step_func(function (e) {\r
+            assert_unreached("registerRFCOMMServiceByUUIDError exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            assert_throws({ name: exceptionName },\r
+                function () {\r
+                    adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", incorrectCallback, registerRFCOMMServiceByUUIDError);\r
+                }, "Given incorrect successCallback.");\r
+            t.done();\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index ad2796d5a2eb4b6eadfcee26e4d2a1aff0bcb858..828fed1caca63665004f8aa5fd2d64a24e475b2c 100755 (executable)
@@ -1,81 +1,85 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
-  may be used to endorse or promote products derived from this work without
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothAdapter_registerRFCOMMServiceByUUID_with_errorCallback</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID_with_errorCallback
-//==== LABEL Check with optional arguments registerRFCOMMServiceByUUID(valid_uuid, valid_name, valid_successCallback, valid_errorCallback)
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MOA
-setup({timeout: 180000, explicit_done:true});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
-    registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError, powerOnSuccess;
-t.step(function () {
-
-    registerRFCOMMServiceByUUIDSuccess = t.step_func(function (recordHandler) {
-        setBluetoothHandlerCleanup(recordHandler);
-        assert_true("uuid" in recordHandler, "No uuid in recordHandler.");
-        assert_true("name" in recordHandler, "No name in recordHandler.");
-        assert_true("isConnected" in recordHandler, "No isConnected in recordHandler.");
-        assert_true("onconnect" in recordHandler, "No onconnect in recordHandler.");
-        assert_type(recordHandler.unregister, "function", "Method unregister does not exist.");
-
-        t.done();
-    });
-
-    registerRFCOMMServiceByUUIDError = t.step_func(function (e) {
-        assert_unreached("registerRFCOMMServiceByUUIDError exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+  this list of conditions and the following disclaimer in the documentation\r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+  may be used to endorse or promote products derived from this work without\r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_registerRFCOMMServiceByUUID_with_errorCallback</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID_with_errorCallback\r
+//==== LABEL Check with optional arguments registerRFCOMMServiceByUUID(valid_uuid, valid_name, valid_successCallback, valid_errorCallback)\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MOA\r
+setup({timeout: 180000, explicit_done:true});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+    registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError, powerOnSuccess;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      registerRFCOMMServiceByUUIDSuccess = t.step_func(function (recordHandler) {\r
+            setBluetoothHandlerCleanup(recordHandler);\r
+            assert_true("uuid" in recordHandler, "No uuid in recordHandler.");\r
+            assert_true("name" in recordHandler, "No name in recordHandler.");\r
+            assert_true("isConnected" in recordHandler, "No isConnected in recordHandler.");\r
+            assert_true("onconnect" in recordHandler, "No onconnect in recordHandler.");\r
+            assert_type(recordHandler.unregister, "function", "Method unregister does not exist.");\r
+\r
+            t.done();\r
+        });\r
+\r
+        registerRFCOMMServiceByUUIDError = t.step_func(function (e) {\r
+            assert_unreached("registerRFCOMMServiceByUUIDError exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 6ec531866d5ff9d6bcfd9996f67602d7ae7a9227..6c3253add56860eae865c14a9da6f9185ee3c19b 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Witold Choinkowski <w.choinkowsk@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
 -->
 <html>
 
@@ -39,14 +39,16 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA MC
 test(function () {
-    var globalBluetoothAdapter, param = [null, undefined, 1, "aaa", {}, [], [1, 2, 3], {}], i;
-    globalBluetoothAdapter = tizen.bluetooth.getDefaultAdapter();
-
-    for (i = 0; i < param.length; i++) {
-        assert_throws(TYPE_MISMATCH_EXCEPTION,
-            function () {
-                globalBluetoothAdapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "name", param[i], null);
-            }, "Given incorrect successCallback.");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        var globalBluetoothAdapter, param = [null, undefined, 1, "aaa", {}, [], [1, 2, 3], {}], i;
+        globalBluetoothAdapter = tizen.bluetooth.getDefaultAdapter();
+
+        for (i = 0; i < param.length; i++) {
+            assert_throws(TYPE_MISMATCH_EXCEPTION,
+                function () {
+                    globalBluetoothAdapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "name", param[i], null);
+                }, "Given incorrect successCallback.");
+        }
     }
 }, document.title);
 
index e2bb7168c02f2e41a22a1f2182fdf8d148ece84c..75df0a3c81b7aaa69e25bb1dfcde478149972cdb 100755 (executable)
@@ -1,67 +1,73 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Witold Choinkowski <w.choinkowsk@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_setChangeListener</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_setChangeListener
-//==== LABEL Check with non-optional arguments setChangeListener(valid_listener)
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setChangeListener M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the test device MUST be turned on.
-//==== STEP Turn off Bluetooth after run.
-//==== EXPECT all subtests should be successful
-//==== TEST_CRITERIA MAST MR
-
-setup({timeout: 180000});
-
-var adapter, listener, retValue, t = async_test(document.title, {timeout: 180000});
-t.step(function () {
-    listener = {
-        onstatechanged: t.step_func(function (powered) {
-            assert_type(powered, "boolean", "Argument powered has wrong type.");
-            adapter.unsetChangeListener();
-            t.done();
-        }),
-        onnamechanged: t.step_func(function (name) {
-        }),
-        onvisibilitychanged: t.step_func(function (visible) {
-        })
-    };
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    retValue = adapter.setChangeListener(listener);
-    assert_equals(retValue, undefined, "Method setChangeListener did not return undefined.");
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Witold Choinkowski <w.choinkowsk@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_setChangeListener</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_setChangeListener\r
+//==== LABEL Check with non-optional arguments setChangeListener(valid_listener)\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setChangeListener M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the test device MUST be turned on.\r
+//==== STEP Turn off Bluetooth after run.\r
+//==== EXPECT all subtests should be successful\r
+//==== TEST_CRITERIA MAST MR\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter, listener, retValue, t = async_test(document.title, {timeout: 180000});\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        listener = {\r
+            onstatechanged: t.step_func(function (powered) {\r
+                assert_type(powered, "boolean", "Argument powered has wrong type.");\r
+                adapter.unsetChangeListener();\r
+                t.done();\r
+            }),\r
+            onnamechanged: t.step_func(function (name) {\r
+            }),\r
+            onvisibilitychanged: t.step_func(function (visible) {\r
+            })\r
+        };\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        retValue = adapter.setChangeListener(listener);\r
+        assert_equals(retValue, undefined, "Method setChangeListener did not return undefined.");\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 88742103bf2818b18bbaeb752aa663d74f714a54..09667ce78f20bb28379a7e08487b9dbb2ce2b33f 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Witold Choinkowski <w.choinkowsk@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
 
 -->
 <html>
@@ -40,9 +40,11 @@ Authors:
 
 var adapter;
 test(function () {
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    assert_true("setChangeListener" in adapter, "Method setChangeListener does not exist in bluetooth adapter.");
-    check_method_exists(adapter, "setChangeListener");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        adapter = tizen.bluetooth.getDefaultAdapter();
+        assert_true("setChangeListener" in adapter, "Method setChangeListener does not exist in bluetooth adapter.");
+        check_method_exists(adapter, "setChangeListener");
+    }
 }, document.title);
 
 </script>
index c6e62ccf02ff82c21122fd0802d53e53215924fe..c650032f37e8e6b481763a9786788cc932336a22 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Witold Choinkowski <w.choinkowsk@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
 
 -->
 <html>
@@ -40,15 +40,17 @@ Authors:
 
 var adapter, listener, exceptionName, i, conversionTable = getTypeConversionExceptions("object", false);
 test(function () {
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    for(i = 0; i < conversionTable.length; i++) {
-        listener = conversionTable[i][0];
-        exceptionName = conversionTable[i][1];
-
-        assert_throws({name: exceptionName},
-            function () {
-                adapter.setChangeListener(listener);
-            }, "Given incorrect listener.");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        adapter = tizen.bluetooth.getDefaultAdapter();
+        for (i = 0; i < conversionTable.length; i++) {
+            listener = conversionTable[i][0];
+            exceptionName = conversionTable[i][1];
+
+            assert_throws({ name: exceptionName },
+                function () {
+                    adapter.setChangeListener(listener);
+                }, "Given incorrect listener.");
+        }
     }
 }, document.title);
 
index e5f771a6c8920fee11fcc673c3f82b8e34394b09..c5dfafcb1760bde26f3fdd5414c59c56fef530db 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Witold Choinkowski <w.choinkowsk@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
 
 -->
 <html>
@@ -40,15 +40,17 @@ Authors:
 
 var adapter, incorrectListeners, incorrectListener, i, exceptionName;
 test(function () {
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    incorrectListeners = getListenerConversionExceptions(["onstatechanged", "onnamechanged", "onvisibilitychanged"]);
-    for(i = 0; i < incorrectListeners.length; i++) {
-        incorrectListener  = incorrectListeners[i][0];
-        exceptionName = incorrectListeners[i][1];
-        assert_throws({name: exceptionName},
-            function () {
-                adapter.setChangeListener(incorrectListener);
-            }, "Given incorrect listener.");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        adapter = tizen.bluetooth.getDefaultAdapter();
+        incorrectListeners = getListenerConversionExceptions(["onstatechanged", "onnamechanged", "onvisibilitychanged"]);
+        for (i = 0; i < incorrectListeners.length; i++) {
+            incorrectListener = incorrectListeners[i][0];
+            exceptionName = incorrectListeners[i][1];
+            assert_throws({ name: exceptionName },
+                function () {
+                    adapter.setChangeListener(incorrectListener);
+                }, "Given incorrect listener.");
+        }
     }
 }, document.title);
 
index 8481e4180b5b69e6a4ec9495541e06bf141325f7..841baa45640d4acabb48beaf0d27c09367d23477 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Witold Choinkowski <w.choinkowsk@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
 
 -->
 <html>
@@ -40,11 +40,13 @@ Authors:
 
 var adapter;
 test(function () {
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    assert_throws ({name:"TypeMismatchError"},
-        function () {
-            adapter.setChangeListener();
-        }, "Method with non optional argument.");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        adapter = tizen.bluetooth.getDefaultAdapter();
+        assert_throws({ name: "TypeMismatchError" },
+            function () {
+                adapter.setChangeListener();
+            }, "Method with non optional argument.");
+    }
 }, document.title);
 
 </script>
index 91fa44b2cefd438d0e71d2d5cce72e8d99dbbce5..e71060597d7ef01cb135d3cd2210935514b56435 100755 (executable)
@@ -1,57 +1,61 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_setName</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_setName
-//==== LABEL Check with non-optional arguments setName(valid_name)
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MMINA MR
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}), powerOnSuccess, retValue = null;
-t.step(function () {
-
-    powerOnSuccess = t.step_func(function () {
-        retValue = adapter.setName("myBluetooth");
-        assert_equals(retValue, undefined, "Method setName returns wrong value.");
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_setName</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_setName\r
+//==== LABEL Check with non-optional arguments setName(valid_name)\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MMINA MR\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), powerOnSuccess, retValue = null;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      powerOnSuccess = t.step_func(function () {\r
+            retValue = adapter.setName("myBluetooth");\r
+            assert_equals(retValue, undefined, "Method setName returns wrong value.");\r
+            t.done();\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index a408f02de8cf0ac6fa8c363b6bd790253860b7f0..a419b0aad314d48c42cafc77fc5be5fa152f73b7 100755 (executable)
@@ -1,70 +1,76 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification, 
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list 
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice, 
-  this list of conditions and the following disclaimer in the documentation 
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors 
-  may be used to endorse or promote products derived from this work without 
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
-  
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_setName_callback_error</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_setName_callback_error
-//==== LABEL Check if error callback of setName method invoked
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the test device MUST be turned off.
-//==== TEST_CRITERIA MERRCB
-
-setup({timeout: 180000});
-
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOffSuccess, setNameSuccess, setNameError;
-t.step(function () {
-
-    setNameSuccess = t.step_func(function () {
-        assert_unreached("Method setName shouldn't end successful.");
-    });
-
-    setNameError = t.step_func(function (e) {
-        assert_equals(e.name, "ServiceNotAvailableError", "Wrong value of error name in setNameError.");
-        t.done();
-    });
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    adapter.setName("myBluetooth", setNameSuccess, setNameError);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification, \r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list \r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice, \r
+  this list of conditions and the following disclaimer in the documentation \r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors \r
+  may be used to endorse or promote products derived from this work without \r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" \r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE \r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE \r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, \r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, \r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, \r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY \r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING \r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, \r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  \r
+  \r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_setName_callback_error</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_setName_callback_error\r
+//==== LABEL Check if error callback of setName method invoked\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the test device MUST be turned off.\r
+//==== TEST_CRITERIA MERRCB\r
+\r
+setup({timeout: 180000});\r
+\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOffSuccess, setNameSuccess, setNameError;\r
+t.step(function () {\r
+      if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+\r
+setNameSuccess = t.step_func(function () {\r
+  assert_unreached("Method setName shouldn't end successful.");\r
+});\r
+\r
+setNameError = t.step_func(function (e) {\r
+  assert_equals(e.name, "ServiceNotAvailableError", "Wrong value of error name in setNameError.");\r
+  t.done();\r
+});\r
+adapter = tizen.bluetooth.getDefaultAdapter();\r
+adapter.setName("myBluetooth", setNameSuccess, setNameError);\r
+\r
+      } else {\r
+t.done();\r
+      }\r
+    });\r
+\r
+</script>\r
+</body>\r
+</html>\r
index afb972438319287fa2401ff90f1b451499205084..669e7351ef5e153557733c8c4ab49d17769b6345 100755 (executable)
@@ -1,71 +1,77 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_setName_errorCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_setName_errorCallback_TypeMismatch
-//==== LABEL Check whether setName() method called with invalid errorCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
-    powerOnSuccess, errorCallback, successCallback, errorCallback, conversionTable;
-t.step(function () {
-    conversionTable = getTypeConversionExceptions("functionObject", true);
-
-    successCallback = t.step_func(function () {
-        assert_unreached("Method setName shouldn't end successfully.");
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        for(i = 0; i < conversionTable.length; i++) {
-            errorCallback = conversionTable[i][0];
-            exceptionName = conversionTable[i][1];
-
-            assert_throws({name: exceptionName},
-            function () {
-                adapter.setName("myBluetooth", successCallback, errorCallback);
-            }, "Given incorrect errorCallback.");
-        }
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_setName_errorCallback_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_setName_errorCallback_TypeMismatch\r
+//==== LABEL Check whether setName() method called with invalid errorCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+    powerOnSuccess, errorCallback, successCallback, errorCallback, conversionTable;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+        successCallback = t.step_func(function () {\r
+            assert_unreached("Method setName shouldn't end successfully.");\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            for (i = 0; i < conversionTable.length; i++) {\r
+                errorCallback = conversionTable[i][0];\r
+                exceptionName = conversionTable[i][1];\r
+\r
+                assert_throws({ name: exceptionName },\r
+                    function () {\r
+                        adapter.setName("myBluetooth", successCallback, errorCallback);\r
+                    }, "Given incorrect errorCallback.");\r
+            }\r
+            t.done();\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 6f3d329ce67e696face016467fb71c23983dbf4b..5bf3b5902d17ee9db2aafa860209517d81151fe5 100755 (executable)
@@ -1,70 +1,76 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->-->
-<html>
-<head>
-<title>BluetoothAdapter_setName_errorCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_setName_errorCallback_invalid_cb
-//==== LABEL Check argument setName() errorCallback validation
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName = "TypeMismatchError",
-    powerOnSuccess, incorrectCallback, successCallback;
-t.step(function () {
-    successCallback =t.step_func( function () {
-        assert_unreached("Method setName shouldn't end successfully.");
-    });
-
-    incorrectCallback = {
-        onerror: t.step_func(function (error) {
-            assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
-        })
-    };
-
-    powerOnSuccess = t.step_func(function () {
-        assert_throws({name: exceptionName},
-            function () {
-                adapter.setName("myBluetooth", successCallback, incorrectCallback);
-            }, "Given incorrect errorCallback.");
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_setName_errorCallback_invalid_cb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_setName_errorCallback_invalid_cb\r
+//==== LABEL Check argument setName() errorCallback validation\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName = "TypeMismatchError",\r
+    powerOnSuccess, incorrectCallback, successCallback;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        successCallback = t.step_func(function () {\r
+            assert_unreached("Method setName shouldn't end successfully.");\r
+        });\r
+\r
+        incorrectCallback = {\r
+            onerror: t.step_func(function (error) {\r
+                assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);\r
+            })\r
+        };\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            assert_throws({ name: exceptionName },\r
+                function () {\r
+                    adapter.setName("myBluetooth", successCallback, incorrectCallback);\r
+                }, "Given incorrect errorCallback.");\r
+            t.done();\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 4ffcdea34105d734d90801cd60c70eb1be817eeb..c34fa0a8024a4d1c8d75a520133b2f4a3e239b02 100755 (executable)
@@ -26,7 +26,7 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
+Lei, ZhanX <zhanx.lei@intel.com>
 
 -->
 <html>
@@ -46,10 +46,12 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA ME
 test(function () {
-    var adapter = tizen.bluetooth.getDefaultAdapter();
-    assert_true("setName" in adapter, "Method setName does not exist in bluetooth adapter.");
-    check_method_exists(adapter, "setName");
-}, document.title);
+      if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+var adapter = tizen.bluetooth.getDefaultAdapter();
+assert_true("setName" in adapter, "Method setName does not exist in bluetooth adapter.");
+check_method_exists(adapter, "setName");
+      }
+    }, document.title);
 
 </script>
 </body>
index 6158835500a4d1070ac7f800bdf5cb8f7e410333..07a2c892eea9bb24c465f63682473504f1ebad47 100755 (executable)
@@ -1,78 +1,84 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification, 
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list 
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice, 
-  this list of conditions and the following disclaimer in the documentation 
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors 
-  may be used to endorse or promote products derived from this work without 
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
-
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_setName_longname</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_setName_longname
-//==== LABEL Check if long name is set
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE Please wait at least 5 second before run test
-//==== TEST_CRITERIA MOA MAST
-
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, longname = "mybluetooth", setNameSuccess,
-    setNameError, i;
-t.step(function () {
-
-    setNameSuccess = t.step_func(function () {
-        assert_equals(adapter.name, longname, "Wrong value of attribute name in BluetoothAdapter.");
-        t.done();
-    });
-
-    setNameError = t.step_func(function (e) {
-        assert_unreached("setNameError exception " + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        for(i = 0; i < 12; i ++) {
-            longname = longname + "0123456789";
-        }
-        adapter.setName(longname, setNameSuccess, setNameError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification, \r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list \r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice, \r
+  this list of conditions and the following disclaimer in the documentation \r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors \r
+  may be used to endorse or promote products derived from this work without \r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" \r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE \r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE \r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, \r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, \r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, \r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY \r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING \r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, \r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  \r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_setName_longname</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_setName_longname\r
+//==== LABEL Check if long name is set\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE Please wait at least 5 second before run test\r
+//==== TEST_CRITERIA MOA MAST\r
+\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, longname = "mybluetooth", setNameSuccess,\r
+    setNameError, i;\r
+t.step(function () {\r
+      if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+\r
+setNameSuccess = t.step_func(function () {\r
+  assert_equals(adapter.name, longname, "Wrong value of attribute name in BluetoothAdapter.");\r
+  t.done();\r
+});\r
+\r
+setNameError = t.step_func(function (e) {\r
+  assert_unreached("setNameError exception " + e.message);\r
+});\r
+\r
+powerOnSuccess = t.step_func(function () {\r
+  for (i = 0; i < 12; i++) {\r
+    longname = longname + "0123456789";\r
+  }\r
+  adapter.setName(longname, setNameSuccess, setNameError);\r
+});\r
+\r
+adapter = tizen.bluetooth.getDefaultAdapter();\r
+setPowered(t, adapter, powerOnSuccess);\r
+\r
+      } else {\r
+t.done();\r
+      }\r
+    });\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 9deb52702b8d6d014da40b8a6db0253c676290e4..6368b30230abf01e18015eab7b4f6ddcf7042f42 100755 (executable)
@@ -1,71 +1,77 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_setName_successCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_setName_successCallback_TypeMismatch
-//==== LABEL Check whether setName() method called with invalid successCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
-    powerOnSuccess, errorCallback, conversionTable, exceptionName, successCallback;
-t.step(function () {
-    conversionTable = getTypeConversionExceptions("functionObject", true);
-
-    errorCallback = t.step_func(function (e) {
-        assert_unreached("errorCallback exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        for(i = 0; i < conversionTable.length; i++) {
-            successCallback = conversionTable[i][0];
-            exceptionName = conversionTable[i][1];
-
-            assert_throws({name: exceptionName},
-                function () {
-                    adapter.setName("myBluetooth", successCallback, errorCallback);
-                }, "Given incorrect successCallback.");
-        }
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_setName_successCallback_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_setName_successCallback_TypeMismatch\r
+//==== LABEL Check whether setName() method called with invalid successCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+    powerOnSuccess, errorCallback, conversionTable, exceptionName, successCallback;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+        errorCallback = t.step_func(function (e) {\r
+            assert_unreached("errorCallback exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            for (i = 0; i < conversionTable.length; i++) {\r
+                successCallback = conversionTable[i][0];\r
+                exceptionName = conversionTable[i][1];\r
+\r
+                assert_throws({ name: exceptionName },\r
+                    function () {\r
+                        adapter.setName("myBluetooth", successCallback, errorCallback);\r
+                    }, "Given incorrect successCallback.");\r
+            }\r
+            t.done();\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index fbc03b47902389a547467137d7898c3b15d086f5..b8298b09066c752636a6d6d667118f574932bd02 100755 (executable)
@@ -1,70 +1,76 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_setName_successCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_setName_successCallback_invalid_cb
-//==== LABEL Check argument setName() successCallback validation
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName = "TypeMismatchError",
-    powerOnSuccess, setNameError, incorrectCallback;
-t.step(function () {
-    incorrectCallback = {
-        onsuccess: t.step_func(function () {
-            assert_unreached("Method setName shouldn't end successfully.");
-        })
-    };
-
-    setNameError = t.step_func(function (e) {
-        assert_unreached("setNameError exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        assert_throws({name: exceptionName},
-            function () {
-                adapter.setName("myBluetooth", incorrectCallback, setNameError);
-            }, "Given incorrect successCallback.");
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+        Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_setName_successCallback_invalid_cb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_setName_successCallback_invalid_cb\r
+//==== LABEL Check argument setName() successCallback validation\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName = "TypeMismatchError",\r
+    powerOnSuccess, setNameError, incorrectCallback;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+        
+    incorrectCallback = {\r
+        onsuccess: t.step_func(function () {\r
+            assert_unreached("Method setName shouldn't end successfully.");\r
+        })\r
+    };\r
+\r
+    setNameError = t.step_func(function (e) {\r
+        assert_unreached("setNameError exception:" + e.message);\r
+    });\r
+\r
+    powerOnSuccess = t.step_func(function () {\r
+        assert_throws({name: exceptionName},\r
+            function () {\r
+                adapter.setName("myBluetooth", incorrectCallback, setNameError);\r
+            }, "Given incorrect successCallback.");\r
+        t.done();\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getDefaultAdapter();\r
+    setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 6d773164388112a341b19b03b4eacf517ea14dd4..416c15d47277bf505880f8981ce27e60464daaa6 100755 (executable)
@@ -1,75 +1,83 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
-  may be used to endorse or promote products derived from this work without
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothAdapter_setName_with_errorCallback</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_setName_with_errorCallback
-//==== LABEL Check if name attribute of adapter set
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE Please wait at least 5 second before run test
-//==== TEST_CRITERIA MOA MAST
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
-    setNameSuccess, setNameError, powerOnSuccess;
-
-setNameSuccess = t.step_func(function () {
-    assert_equals(adapter.name, "myBluetooth_with_Error", "Method setName did not set name attribute.");
-    t.done();
-});
-
-setNameError = t.step_func(function (e) {
-    assert_unreached("setNameError exception:" + e.message);
-});
-
-powerOnSuccess = t.step_func(function () {
-    adapter.setName("myBluetooth_with_Error", setNameSuccess, setNameError);
-});
-
-adapter = tizen.bluetooth.getDefaultAdapter();
-setPowered(t, adapter, powerOnSuccess);
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+  this list of conditions and the following disclaimer in the documentation\r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+  may be used to endorse or promote products derived from this work without\r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothAdapter_setName_with_errorCallback</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_setName_with_errorCallback\r
+//==== LABEL Check if name attribute of adapter set\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE Please wait at least 5 second before run test\r
+//==== TEST_CRITERIA MOA MAST\r
+setup({ timeout: 180000 });\r
+\r
+var adapter = null, t = async_test(document.title, { timeout: 180000 }),\r
+  setNameSuccess, setNameError, powerOnSuccess;\r
+\r
+t.step(function () {\r
+if (BT_SUPPORT) { // network.bluetooth support\r
+    setNameSuccess = t.step_func(function () {\r
+        assert_equals(adapter.name, "myBluetooth_with_Error", "Method setName did not set name attribute.");\r
+        t.done();\r
+    });\r
+\r
+    setNameError = t.step_func(function (e) {\r
+        assert_unreached("setNameError exception:" + e.message);\r
+    });\r
+\r
+    powerOnSuccess = t.step_func(function () {\r
+      adapter.setName("myBluetooth_with_Error", setNameSuccess, setNameError);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getDefaultAdapter();\r
+    setPowered(t, adapter, powerOnSuccess);\r
+} else {\r
+    t.done();\r
+}\r
+    });\r
+</script>\r
+</body>\r
+\r
+</html>
\ No newline at end of file
index 050c36c731689929009da6afb5889e455b344f0a..36f3583b52b5de5cbef271c2a9c9b78a7973c0f3 100755 (executable)
@@ -1,61 +1,65 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_setName_with_successCallback</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_setName_with_successCallback
-//==== LABEL Check with optional arguments setName(valid_name, successCallback)
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MOA MAST
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
-    setNameSuccessCB, powerOnSuccess, newName = "myBluetooth_with_Success";
-t.step(function () {
-
-    setNameSuccessCB = t.step_func(function () {
-        assert_equals(adapter.name, newName, "Method setName did not set name attribute.");
-        t.done();
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.setName(newName, setNameSuccessCB);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_setName_with_successCallback</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_setName_with_successCallback\r
+//==== LABEL Check with optional arguments setName(valid_name, successCallback)\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MOA MAST\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+    setNameSuccessCB, powerOnSuccess, newName = "myBluetooth_with_Success";\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      setNameSuccessCB = t.step_func(function () {\r
+            assert_equals(adapter.name, newName, "Method setName did not set name attribute.");\r
+            t.done();\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.setName(newName, setNameSuccessCB);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 09f4b52287c65bd0447d6a08268367e6bd109fc1..a994f98e4cb29d871c3a818439339919e43a6d44 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Witold Choinkowski <w.choinkowsk@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
 -->
 <html>
 
@@ -39,14 +39,16 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA MC
 test(function () {
-    var param = [1, "aaa",  [1, 2, 3], {}], i,
-    globalBluetoothAdapter = tizen.bluetooth.getDefaultAdapter(1);
-
-    for (i = 0; i < param.length; i++) {
-        assert_throws(TYPE_MISMATCH_EXCEPTION,
-            function () {
-                globalBluetoothAdapter.setName("aa", param[i], null);
-            }, "Given incorrect successCallback.");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        var param = [1, "aaa", [1, 2, 3], {}], i,
+            globalBluetoothAdapter = tizen.bluetooth.getDefaultAdapter(1);
+
+        for (i = 0; i < param.length; i++) {
+            assert_throws(TYPE_MISMATCH_EXCEPTION,
+                function () {
+                    globalBluetoothAdapter.setName("aa", param[i], null);
+                }, "Given incorrect successCallback.");
+        }
     }
 }, document.title);
 
index 4bb983e7105b08ec31120a10cd9486ab3c30a820..dd378bdff67dfef7a1e8d081756b501280050832 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Witold Choinkowski <w.choinkowsk@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
 -->
 <html>
 
@@ -39,14 +39,16 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA MC
 test(function () {
-    var globalBluetoothAdapter, param = [1, "aaa",  [1, 2, 3], {}], i;
-    globalBluetoothAdapter = tizen.bluetooth.getDefaultAdapter(1);
-
-    for (i = 0; i < param.length; i++) {
-        assert_throws(TYPE_MISMATCH_EXCEPTION,
-            function () {
-                globalBluetoothAdapter.setName("aa", null, param[i]);
-            }, "Given incorrect errorCallback.");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        var globalBluetoothAdapter, param = [1, "aaa", [1, 2, 3], {}], i;
+        globalBluetoothAdapter = tizen.bluetooth.getDefaultAdapter(1);
+
+        for (i = 0; i < param.length; i++) {
+            assert_throws(TYPE_MISMATCH_EXCEPTION,
+                function () {
+                    globalBluetoothAdapter.setName("aa", null, param[i]);
+                }, "Given incorrect errorCallback.");
+        }
     }
 }, document.title);
 
index f07feb7408c93dfbb9780ff5fcd8c7767f3a695d..4427c790026c03758a91db2ed8491e86f089fa64 100755 (executable)
@@ -1,76 +1,80 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
--->
-<html>
-
-<head>
-<title>BluetoothAdapter_stopDiscovery</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_stopDiscovery
-//==== LABEL Check with optional arguments stopDiscovery
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:stopDiscovery M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MMINA MR
-setup({timeout:180000, explicit_done:true});
-var adapter, t = async_test(document.title, {timeout: 180000}), discoverDevicesSuccessCB,
-    testBluetoothErrorCB, stopDiscoverySuccess, retValue = null;
-t.step(function () {
-
-    discoverDevicesSuccessCB = {
-        onstarted: t.step_func(function () {
-            retValue = adapter.stopDiscovery();
-            assert_equals(retValue, undefined, "stopDiscovery returns wrong value");
-            t.done();
-        }),
-        ondevicefound: t.step_func(function (device) {
-        }),
-        ondevicedisappeared: function (address) {
-        },
-        onfinished: t.step_func(function (devices) {
-        })
-    };
-
-    testBluetoothErrorCB = t.step_func(function (e) {
-        assert_unreached("testBluetoothErrorCB exception:" + e.message);
-    });
-
-    stopDiscoverySuccess = t.step_func(function () {
-        adapter.discoverDevices(discoverDevicesSuccessCB, testBluetoothErrorCB);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setBluetoothDiscoveryCleanup(adapter);
-    stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothAdapter_stopDiscovery</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_stopDiscovery\r
+//==== LABEL Check with optional arguments stopDiscovery\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:stopDiscovery M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MMINA MR\r
+setup({timeout:180000, explicit_done:true});\r
+var adapter, t = async_test(document.title, {timeout: 180000}), discoverDevicesSuccessCB,\r
+    testBluetoothErrorCB, stopDiscoverySuccess, retValue = null;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      discoverDevicesSuccessCB = {\r
+            onstarted: t.step_func(function () {\r
+                retValue = adapter.stopDiscovery();\r
+                assert_equals(retValue, undefined, "stopDiscovery returns wrong value");\r
+                t.done();\r
+            }),\r
+            ondevicefound: t.step_func(function (device) {\r
+            }),\r
+            ondevicedisappeared: function (address) {\r
+            },\r
+            onfinished: t.step_func(function (devices) {\r
+            })\r
+        };\r
+\r
+        testBluetoothErrorCB = t.step_func(function (e) {\r
+            assert_unreached("testBluetoothErrorCB exception:" + e.message);\r
+        });\r
+\r
+        stopDiscoverySuccess = t.step_func(function () {\r
+            adapter.discoverDevices(discoverDevicesSuccessCB, testBluetoothErrorCB);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setBluetoothDiscoveryCleanup(adapter);\r
+        stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 836e44a1748cc4da127e905688e68131373f28d8..21ab65a8fea0fd8f8a197f5d380b079d5e7c0c3e 100755 (executable)
@@ -1,61 +1,67 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Witold Choinkowski <w.choinkowsk@samsung.com>
-
--->
-<html>
-
-<head>
-<title>BluetoothAdapter_stopDiscovery_callback_onerror</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_stopDiscovery_callback_onerror
-//==== LABEL Check if error callback of stopDiscovery method invoked
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:stopDiscovery M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the test device MUST be turned off.
-//==== TEST_CRITERIA MERRCB
-setup({timeout: 180000});
-var adapter, t = async_test(document.title, {timeout: 180000}), successCallback, errorCallback;
-t.step(function () {
-    errorCallback = t.step_func(function (error) {
-        assert_equals(error.name, "ServiceNotAvailableError", "expected another error");
-        t.done();
-    });
-
-    successCallback = t.step_func(function () {
-        assert_unreached("invalid successCallback invoked");
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    adapter.stopDiscovery(successCallback, errorCallback);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Witold Choinkowski <w.choinkowsk@samsung.com>\r
+\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothAdapter_stopDiscovery_callback_onerror</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_stopDiscovery_callback_onerror\r
+//==== LABEL Check if error callback of stopDiscovery method invoked\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:stopDiscovery M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the test device MUST be turned off.\r
+//==== TEST_CRITERIA MERRCB\r
+setup({timeout: 180000});\r
+var adapter, t = async_test(document.title, {timeout: 180000}), successCallback, errorCallback;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        errorCallback = t.step_func(function (error) {\r
+            assert_equals(error.name, "ServiceNotAvailableError", "expected another error");\r
+            t.done();\r
+        });\r
+\r
+        successCallback = t.step_func(function () {\r
+            assert_unreached("invalid successCallback invoked");\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        adapter.stopDiscovery(successCallback, errorCallback);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 498b8de76aed12d9c53a87c8859a1a67ac3daef5..7f9d7899d5e00491e2c6f932c0a9b62d18d2821f 100755 (executable)
@@ -1,90 +1,96 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_stopDiscovery_errorCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_stopDiscovery_errorCallback_TypeMismatch
-//==== LABEL Check whether stopDiscovery() method called with invalid errorCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:stopDiscovery M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-setup({timeout: 180000});
-var adapter, t = async_test(document.title, {timeout: 180000}), exceptionName, i, discoverDevicesSuccessCallback,
-    conversionTable, successCallback, discoverDevicesError, stopDiscoverySuccess, errorCallback, stopDiscoverySuccessCB;
-t.step(function () {
-    conversionTable = getTypeConversionExceptions("functionObject", true);
-
-    successCallback = t.step_func(function () {
-        assert_unreached("Method stopDiscovery shouldn't end successfully.");
-    });
-
-    discoverDevicesError = t.step_func(function (e) {
-        assert_unreached("discoverDevicesError exception:" + e.message);
-    });
-
-    stopDiscoverySuccessCB = t.step_func(function () {
-        t.done();
-    });
-
-    stopDiscoverySuccess = t.step_func(function () {
-        discoverDevicesSuccessCallback = {
-            onstarted: t.step_func(function () {
-                for(i = 0; i < conversionTable.length; i++) {
-                    errorCallback = conversionTable[i][0];
-                    exceptionName = conversionTable[i][1];
-
-                    assert_throws({name: exceptionName},
-                        function () {
-                            adapter.stopDiscovery(successCallback, errorCallback);
-                        }, "Given incorrect errorCallback.");
-                }
-                adapter.stopDiscovery(stopDiscoverySuccessCB);
-            }),
-            ondevicefound: t.step_func(function (device) {
-            }),
-            ondevicedisappeared: t.step_func(function (address) {
-            }),
-            onfinished: t.step_func(function (devices) {
-            })
-        };
-
-        adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_stopDiscovery_errorCallback_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_stopDiscovery_errorCallback_TypeMismatch\r
+//==== LABEL Check whether stopDiscovery() method called with invalid errorCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:stopDiscovery M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+setup({timeout: 180000});\r
+var adapter, t = async_test(document.title, {timeout: 180000}), exceptionName, i, discoverDevicesSuccessCallback,\r
+    conversionTable, successCallback, discoverDevicesError, stopDiscoverySuccess, errorCallback, stopDiscoverySuccessCB;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+        successCallback = t.step_func(function () {\r
+            assert_unreached("Method stopDiscovery shouldn't end successfully.");\r
+        });\r
+\r
+        discoverDevicesError = t.step_func(function (e) {\r
+            assert_unreached("discoverDevicesError exception:" + e.message);\r
+        });\r
+\r
+        stopDiscoverySuccessCB = t.step_func(function () {\r
+            t.done();\r
+        });\r
+\r
+        stopDiscoverySuccess = t.step_func(function () {\r
+            discoverDevicesSuccessCallback = {\r
+                onstarted: t.step_func(function () {\r
+                    for (i = 0; i < conversionTable.length; i++) {\r
+                        errorCallback = conversionTable[i][0];\r
+                        exceptionName = conversionTable[i][1];\r
+\r
+                        assert_throws({ name: exceptionName },\r
+                            function () {\r
+                                adapter.stopDiscovery(successCallback, errorCallback);\r
+                            }, "Given incorrect errorCallback.");\r
+                    }\r
+                    adapter.stopDiscovery(stopDiscoverySuccessCB);\r
+                }),\r
+                ondevicefound: t.step_func(function (device) {\r
+                }),\r
+                ondevicedisappeared: t.step_func(function (address) {\r
+                }),\r
+                onfinished: t.step_func(function (devices) {\r
+                })\r
+            };\r
+\r
+            adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 3765e1bc95b24155156b3c4f42db1fab82e621d4..17df4a839954ea90f329d212ff5df05c98ea8bb2 100755 (executable)
@@ -1,90 +1,96 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_stopDiscovery_errorCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_stopDiscovery_errorCallback_invalid_cb
-//==== LABEL Check stopDiscovery() argument errorCallback validation
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:stopDiscovery M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-setup({timeout: 180000});
-var adapter, t = async_test(document.title, {timeout: 180000}),
-    exceptionName = "TypeMismatchError", incorrectCallback, stopDiscoverySuccess, discoverDevicesSuccessCallback,
-    discoverDevicesError, successCallback, discoverDevicesSuccessCallback, stopDiscoverySuccessCB;
-t.step(function () {
-    incorrectCallback = {
-        onerror: t.step_func(function (error) {
-            assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
-        })
-    };
-
-    successCallback = t.step_func(function (e) {
-        assert_unreached("Method stopDiscovery shouldn't end successfully.");
-    });
-
-    stopDiscoverySuccessCB = t.step_func(function () {
-        t.done();
-    });
-
-    discoverDevicesError = t.step_func(function (e) {
-        assert_unreached("discoverDevices() error callback invoked:name" + e.name + ", msg:" + e.message);
-    });
-
-    stopDiscoverySuccess = t.step_func(function () {
-        discoverDevicesSuccessCallback = {
-            onstarted: function () {
-                assert_throws({name: exceptionName},
-                    function () {
-                        adapter.stopDiscovery(successCallback, incorrectCallback);
-                    }, "Given incorrect errorCallback.");
-                adapter.stopDiscovery(stopDiscoverySuccessCB);
-            },
-            ondevicefound: function (device) {
-            },
-            ondevicedisappeared: function (address) {
-            },
-            onfinished: function (devices) {
-            }
-        };
-
-        adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_stopDiscovery_errorCallback_invalid_cb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_stopDiscovery_errorCallback_invalid_cb\r
+//==== LABEL Check stopDiscovery() argument errorCallback validation\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:stopDiscovery M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+setup({timeout: 180000});\r
+var adapter, t = async_test(document.title, {timeout: 180000}),\r
+    exceptionName = "TypeMismatchError", incorrectCallback, stopDiscoverySuccess, discoverDevicesSuccessCallback,\r
+    discoverDevicesError, successCallback, discoverDevicesSuccessCallback, stopDiscoverySuccessCB;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        incorrectCallback = {\r
+            onerror: t.step_func(function (error) {\r
+                assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);\r
+            })\r
+        };\r
+\r
+        successCallback = t.step_func(function (e) {\r
+            assert_unreached("Method stopDiscovery shouldn't end successfully.");\r
+        });\r
+\r
+        stopDiscoverySuccessCB = t.step_func(function () {\r
+            t.done();\r
+        });\r
+\r
+        discoverDevicesError = t.step_func(function (e) {\r
+            assert_unreached("discoverDevices() error callback invoked:name" + e.name + ", msg:" + e.message);\r
+        });\r
+\r
+        stopDiscoverySuccess = t.step_func(function () {\r
+            discoverDevicesSuccessCallback = {\r
+                onstarted: function () {\r
+                    assert_throws({ name: exceptionName },\r
+                        function () {\r
+                            adapter.stopDiscovery(successCallback, incorrectCallback);\r
+                        }, "Given incorrect errorCallback.");\r
+                    adapter.stopDiscovery(stopDiscoverySuccessCB);\r
+                },\r
+                ondevicefound: function (device) {\r
+                },\r
+                ondevicedisappeared: function (address) {\r
+                },\r
+                onfinished: function (devices) {\r
+                }\r
+            };\r
+\r
+            adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index ff39e6cd1ef351fd71db3d9999fd241a2805e1da..1d72fadaad5c2fe118f0be04dc42d982c302b793 100755 (executable)
@@ -26,7 +26,7 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
+Lei, ZhanX <zhanx.lei@intel.com>
 
 -->
 <html>
@@ -46,10 +46,12 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA ME
 test(function () {
-    var adapter = tizen.bluetooth.getDefaultAdapter();
-    assert_true("stopDiscovery" in adapter, "Method stopDiscovery does not exist in bluetooth adapter.");
-    check_method_exists(adapter, "stopDiscovery");
-}, document.title);
+      if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+var adapter = tizen.bluetooth.getDefaultAdapter();
+assert_true("stopDiscovery" in adapter, "Method stopDiscovery does not exist in bluetooth adapter.");
+check_method_exists(adapter, "stopDiscovery");
+      }
+    }, document.title);
 
 </script>
 </body>
index 696f2259dd9f38f29482880365d179aaf2afff6f..beac3c94a2c90c83472025b71822ef0d2d2f4e81 100755 (executable)
@@ -1,91 +1,97 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_stopDiscovery_successCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_stopDiscovery_successCallback_TypeMismatch
-//==== LABEL Check whether stopDiscovery() method called with invalid successCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:stopDiscovery M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i, discoverDevicesSuccessCallback,
-    stopDiscoverySuccess, discoverDevicesError, errorCallback, conversionTable, successCallback, stopDiscoverySuccessCB;
-t.step(function () {
-    conversionTable = getTypeConversionExceptions("functionObject", true);
-
-    errorCallback = t.step_func(function (e) {
-        assert_unreached("errorCallback exception:" + e.message);
-    });
-
-    stopDiscoverySuccessCB = t.step_func(function () {
-        t.done();
-    });
-
-    discoverDevicesError = t.step_func(function (e) {
-        assert_unreached("discoverDevicesError exception:" + e.message);
-    });
-
-    stopDiscoverySuccess = t.step_func(function () {
-        discoverDevicesSuccessCallback = {
-            onstarted: t.step_func(function () {
-                for(i = 0; i < conversionTable.length; i++) {
-                    successCallback = conversionTable[i][0];
-                    exceptionName = conversionTable[i][1];
-
-                    assert_throws({name: exceptionName},
-                        function () {
-                            adapter.stopDiscovery(successCallback, errorCallback);
-                        }, "Given incorrect successCallback.");
-                }
-                adapter.stopDiscovery(stopDiscoverySuccessCB);
-            }),
-            ondevicefound: t.step_func(function (device) {
-            }),
-            ondevicedisappeared: t.step_func(function (address) {
-            }),
-            onfinished: t.step_func(function (devices) {
-            })
-        };
-
-        adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_stopDiscovery_successCallback_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_stopDiscovery_successCallback_TypeMismatch\r
+//==== LABEL Check whether stopDiscovery() method called with invalid successCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:stopDiscovery M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i, discoverDevicesSuccessCallback,\r
+    stopDiscoverySuccess, discoverDevicesError, errorCallback, conversionTable, successCallback, stopDiscoverySuccessCB;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+        errorCallback = t.step_func(function (e) {\r
+            assert_unreached("errorCallback exception:" + e.message);\r
+        });\r
+\r
+        stopDiscoverySuccessCB = t.step_func(function () {\r
+            t.done();\r
+        });\r
+\r
+        discoverDevicesError = t.step_func(function (e) {\r
+            assert_unreached("discoverDevicesError exception:" + e.message);\r
+        });\r
+\r
+        stopDiscoverySuccess = t.step_func(function () {\r
+            discoverDevicesSuccessCallback = {\r
+                onstarted: t.step_func(function () {\r
+                    for (i = 0; i < conversionTable.length; i++) {\r
+                        successCallback = conversionTable[i][0];\r
+                        exceptionName = conversionTable[i][1];\r
+\r
+                        assert_throws({ name: exceptionName },\r
+                            function () {\r
+                                adapter.stopDiscovery(successCallback, errorCallback);\r
+                            }, "Given incorrect successCallback.");\r
+                    }\r
+                    adapter.stopDiscovery(stopDiscoverySuccessCB);\r
+                }),\r
+                ondevicefound: t.step_func(function (device) {\r
+                }),\r
+                ondevicedisappeared: t.step_func(function (address) {\r
+                }),\r
+                onfinished: t.step_func(function (devices) {\r
+                })\r
+            };\r
+\r
+            adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 95ca897766fec2b7c787aaf022206e2800abec01..7f014facf1bac2bc1d60ea6b4c995d9bd78c38f7 100755 (executable)
@@ -1,88 +1,94 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_stopDiscovery_successCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_stopDiscovery_successCallback_invalid_cb
-//==== LABEL Check stopDiscovery() argument successCallback validation - use {onsuccess: function (){}}
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:stopDiscovery M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), stopDiscoverySuccess, stopDiscoverySuccessCB, discoverDevicesSuccessCallback,
-    adapter, exceptionName = "TypeMismatchError", incorrectCallback, discoverDevicesError, stopDiscoveryError;
-
-t.step(function () {
-    incorrectCallback = {
-        onsuccess: t.step_func(function () {
-            assert_unreached("Method stopDiscovery shouldn't end successfully.");
-        })
-    };
-
-    stopDiscoverySuccessCB = t.step_func(function () {
-        t.done();
-    });
-
-    discoverDevicesError = t.step_func(function (e) {
-        assert_unreached("discoverDevicesError exception:" + e.message);
-    });
-
-    stopDiscoveryError = t.step_func(function (e) {
-        assert_unreached("stopDiscoveryError exception:" + e.message);
-    });
-
-    stopDiscoverySuccess = t.step_func(function () {
-        discoverDevicesSuccessCallback = {
-            onstarted: function () {
-                assert_throws({name: exceptionName},
-                    function () {
-                        adapter.stopDiscovery(incorrectCallback, stopDiscoveryError);
-                    }, "Given incorrect successCallback.");
-                adapter.stopDiscovery(stopDiscoverySuccessCB);
-            },
-            ondevicefound: function (device) {
-            },
-            ondevicedisappeared: function (address) {
-            },
-            onfinished: function (devices) {
-            }
-        };
-        adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_stopDiscovery_successCallback_invalid_cb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_stopDiscovery_successCallback_invalid_cb\r
+//==== LABEL Check stopDiscovery() argument successCallback validation - use {onsuccess: function (){}}\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:stopDiscovery M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), stopDiscoverySuccess, stopDiscoverySuccessCB, discoverDevicesSuccessCallback,\r
+    adapter, exceptionName = "TypeMismatchError", incorrectCallback, discoverDevicesError, stopDiscoveryError;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        incorrectCallback = {\r
+            onsuccess: t.step_func(function () {\r
+                assert_unreached("Method stopDiscovery shouldn't end successfully.");\r
+            })\r
+        };\r
+\r
+        stopDiscoverySuccessCB = t.step_func(function () {\r
+            t.done();\r
+        });\r
+\r
+        discoverDevicesError = t.step_func(function (e) {\r
+            assert_unreached("discoverDevicesError exception:" + e.message);\r
+        });\r
+\r
+        stopDiscoveryError = t.step_func(function (e) {\r
+            assert_unreached("stopDiscoveryError exception:" + e.message);\r
+        });\r
+\r
+        stopDiscoverySuccess = t.step_func(function () {\r
+            discoverDevicesSuccessCallback = {\r
+                onstarted: function () {\r
+                    assert_throws({ name: exceptionName },\r
+                        function () {\r
+                            adapter.stopDiscovery(incorrectCallback, stopDiscoveryError);\r
+                        }, "Given incorrect successCallback.");\r
+                    adapter.stopDiscovery(stopDiscoverySuccessCB);\r
+                },\r
+                ondevicefound: function (device) {\r
+                },\r
+                ondevicedisappeared: function (address) {\r
+                },\r
+                onfinished: function (devices) {\r
+                }\r
+            };\r
+            adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 56bf2a4291fb9fa539d79479ed5d23c8b3318204..ae79adb593ea64a7dbe32ba692205bfdf9268707 100755 (executable)
@@ -1,82 +1,88 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
--->
-<html>
-
-<head>
-<title>BluetoothAdapter_stopDiscovery_with_errorCallback</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_stopDiscovery_with_errorCallback
-//==== LABEL Check with optional arguments stopDiscovery(valid_successCallback, valid_errorCallback)
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:stopDiscovery M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MOA
-setup({timeout: 180000});
-
-var adapter, t = async_test(document.title, {timeout: 180000}),
-    stopDiscoverySuccessCB, stopDiscoveryErrorCB, discoverDevicesSuccessCB, testBluetoothErrorCB, stopDiscoverySuccess;
-
-t.step(function () {
-    stopDiscoverySuccessCB = t.step_func(function () {
-        t.done();
-    });
-
-    stopDiscoveryErrorCB = t.step_func(function (e) {
-        assert_unreached("stopDiscoveryErrorCB exception:" + e.message);
-    });
-
-    discoverDevicesSuccessCB = {
-        onstarted: t.step_func(function () {
-            adapter.stopDiscovery(stopDiscoverySuccessCB, stopDiscoveryErrorCB);
-        }),
-        ondevicefound: t.step_func(function (device) {
-        }),
-        ondevicedisappeared: function (address) {
-        },
-        onfinished: t.step_func(function (devices) {
-        })
-    };
-
-    testBluetoothErrorCB = t.step_func(function (e) {
-        assert_unreached("testBluetoothErrorCB exception:" + e.message);
-    });
-
-    stopDiscoverySuccess = t.step_func(function () {
-        adapter.discoverDevices(discoverDevicesSuccessCB, testBluetoothErrorCB);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    stopDiscovery(t, adapter, stopDiscoverySuccess);
-
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothAdapter_stopDiscovery_with_errorCallback</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_stopDiscovery_with_errorCallback\r
+//==== LABEL Check with optional arguments stopDiscovery(valid_successCallback, valid_errorCallback)\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:stopDiscovery M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MOA\r
+setup({timeout: 180000});\r
+\r
+var adapter, t = async_test(document.title, {timeout: 180000}),\r
+    stopDiscoverySuccessCB, stopDiscoveryErrorCB, discoverDevicesSuccessCB, testBluetoothErrorCB, stopDiscoverySuccess;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        stopDiscoverySuccessCB = t.step_func(function () {\r
+            t.done();\r
+        });\r
+\r
+        stopDiscoveryErrorCB = t.step_func(function (e) {\r
+            assert_unreached("stopDiscoveryErrorCB exception:" + e.message);\r
+        });\r
+\r
+        discoverDevicesSuccessCB = {\r
+            onstarted: t.step_func(function () {\r
+                adapter.stopDiscovery(stopDiscoverySuccessCB, stopDiscoveryErrorCB);\r
+            }),\r
+            ondevicefound: t.step_func(function (device) {\r
+            }),\r
+            ondevicedisappeared: function (address) {\r
+            },\r
+            onfinished: t.step_func(function (devices) {\r
+            })\r
+        };\r
+\r
+        testBluetoothErrorCB = t.step_func(function (e) {\r
+            assert_unreached("testBluetoothErrorCB exception:" + e.message);\r
+        });\r
+\r
+        stopDiscoverySuccess = t.step_func(function () {\r
+            adapter.discoverDevices(discoverDevicesSuccessCB, testBluetoothErrorCB);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 55ecdfcda171478d8f4d5d1641c71ee51308ccde..5e08c75157ab3b42d7b6c59f3e949c3d6ebbd87f 100755 (executable)
@@ -1,78 +1,82 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
--->
-<html>
-
-<head>
-<title>BluetoothAdapter_stopDiscovery_with_successCallback</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_stopDiscovery_with_successCallback
-//==== LABEL Check with optional arguments stopDiscovery(valid_successCallback)
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:stopDiscovery M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MR
-setup({timeout: 180000});
-
-var adapter, t = async_test(document.title, {timeout: 180000}),
-    stopDiscoverySuccessCB, discoverDevicesSuccessCB, testBluetoothErrorCB, stopDiscoverySuccess;
-t.step(function () {
-
-    stopDiscoverySuccessCB = t.step_func(function () {
-        t.done();
-    });
-
-    discoverDevicesSuccessCB = {
-        onstarted: t.step_func(function () {
-            adapter.stopDiscovery(stopDiscoverySuccessCB);
-        }),
-        ondevicefound: t.step_func(function (device) {
-        }),
-        ondevicedisappeared: function (address) {
-        },
-        onfinished: t.step_func(function (devices) {
-        })
-    };
-
-    testBluetoothErrorCB = t.step_func(function (e) {
-        assert_unreached("testBluetoothErrorCB exception:" + e.message);
-    });
-
-    stopDiscoverySuccess = t.step_func(function () {
-        adapter.discoverDevices(discoverDevicesSuccessCB, testBluetoothErrorCB);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    stopDiscovery(t, adapter, stopDiscoverySuccess);
-
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothAdapter_stopDiscovery_with_successCallback</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_stopDiscovery_with_successCallback\r
+//==== LABEL Check with optional arguments stopDiscovery(valid_successCallback)\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:stopDiscovery M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MR\r
+setup({timeout: 180000});\r
+\r
+var adapter, t = async_test(document.title, {timeout: 180000}),\r
+    stopDiscoverySuccessCB, discoverDevicesSuccessCB, testBluetoothErrorCB, stopDiscoverySuccess;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      stopDiscoverySuccessCB = t.step_func(function () {\r
+            t.done();\r
+        });\r
+\r
+        discoverDevicesSuccessCB = {\r
+            onstarted: t.step_func(function () {\r
+                adapter.stopDiscovery(stopDiscoverySuccessCB);\r
+            }),\r
+            ondevicefound: t.step_func(function (device) {\r
+            }),\r
+            ondevicedisappeared: function (address) {\r
+            },\r
+            onfinished: t.step_func(function (devices) {\r
+            })\r
+        };\r
+\r
+        testBluetoothErrorCB = t.step_func(function (e) {\r
+            assert_unreached("testBluetoothErrorCB exception:" + e.message);\r
+        });\r
+\r
+        stopDiscoverySuccess = t.step_func(function () {\r
+            adapter.discoverDevices(discoverDevicesSuccessCB, testBluetoothErrorCB);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index b9a6a497803c85a537c2a263006a9d63a1dd3933..4d8bff102e48416887e78acec20a26a9f8b12656 100755 (executable)
@@ -1,76 +1,82 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Witold Choinkowski <w.choinkowsk@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_unsetChangeListener</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_unsetChangeListener
-//==== LABEL Check unsetChangeListener of adapter
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:unsetChangeListener M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the test device MUST be turned on.
-//==== STEP Turn off Bluetooth after run.
-//==== EXPECT all subtests should be successful
-//==== STEP Turn on after test.
-//==== EXPECT all subtests should be successful
-//==== TEST_CRITERIA MNA MNAST MR
-
-setup({timeout: 180000});
-
-var adapter, listener, retValue, powerOffSuccess, t = async_test(document.title, {timeout: 180000});
-t.step(function () {
-    listener = {
-        onstatechanged: t.step_func(function (powered) {
-            assert_unreached("listener should be dropped");
-        }),
-        onnamechanged: t.step_func(function (name) {
-        }),
-        onvisibilitychanged: t.step_func(function (visible) {
-        })
-    };
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    adapter.setChangeListener(listener);
-
-    retValue = adapter.unsetChangeListener();
-    assert_equals(retValue, undefined, "unsetChangeListener did not return undefined");
-
-    var state = adapter.powered;
-    alert("Please turn bluetooth off.");
-    if (adapter.powered == state) {
-        assert_unreached("Bluetooth adapter state did not change. Please repeat.");
-    }
-    t.done();
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Witold Choinkowski <w.choinkowsk@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_unsetChangeListener</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_unsetChangeListener\r
+//==== LABEL Check unsetChangeListener of adapter\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:unsetChangeListener M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the test device MUST be turned on.\r
+//==== STEP Turn off Bluetooth after run.\r
+//==== EXPECT all subtests should be successful\r
+//==== STEP Turn on after test.\r
+//==== EXPECT all subtests should be successful\r
+//==== TEST_CRITERIA MNA MNAST MR\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter, listener, retValue, powerOffSuccess, t = async_test(document.title, {timeout: 180000});\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        listener = {\r
+            onstatechanged: t.step_func(function (powered) {\r
+                assert_unreached("listener should be dropped");\r
+            }),\r
+            onnamechanged: t.step_func(function (name) {\r
+            }),\r
+            onvisibilitychanged: t.step_func(function (visible) {\r
+            })\r
+        };\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        adapter.setChangeListener(listener);\r
+\r
+        retValue = adapter.unsetChangeListener();\r
+        assert_equals(retValue, undefined, "unsetChangeListener did not return undefined");\r
+\r
+        var state = adapter.powered;\r
+        alert("Please turn bluetooth off.");\r
+        if (adapter.powered == state) {\r
+            assert_unreached("Bluetooth adapter state did not change. Please repeat.");\r
+        }\r
+        t.done();\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index b967c64b1915a27f95376a4e288ed47152f29afc..4fc136a335400a994f42c5c73cd1ecbf2629f61b 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Witold Choinkowski <w.choinkowsk@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
 
 -->
 <html>
@@ -40,9 +40,11 @@ Authors:
 
 var adapter;
 test(function () {
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    assert_true("unsetChangeListener" in adapter, "Method unsetChangeListener does not exist in bluetooth adapter.");
-    check_method_exists(adapter, "unsetChangeListener");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        adapter = tizen.bluetooth.getDefaultAdapter();
+        assert_true("unsetChangeListener" in adapter, "Method unsetChangeListener does not exist in bluetooth adapter.");
+        check_method_exists(adapter, "unsetChangeListener");
+    }
 }, document.title);
 
 </script>
index ba2d7ca99eaa230700dfff63c43910ea0f223ddf..6d2f2e3c87682e3790ed942508bbe89f476de603 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Witold Choinkowski <w.choinkowsk@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
 
 -->
 <html>
@@ -40,8 +40,10 @@ Authors:
 var adapter;
 
 test(function () {
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    checkExtraArgument(adapter, "unsetChangeListener");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        adapter = tizen.bluetooth.getDefaultAdapter();
+        checkExtraArgument(adapter, "unsetChangeListener");
+    }
 }, document.title);
 
 </script>
index 7de9bbfc9ad60b6698f01fcf16db06ada74857af..80fec0a5212835f35bc0e21ce638d17db4f3cfca 100755 (executable)
@@ -26,7 +26,7 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
+Lei, ZhanX <zhanx.lei@intel.com>
 
 -->
 <html>
@@ -47,9 +47,11 @@ Authors:
 //==== TEST_CRITERIA AE AT ARO
 var adapter = null;
 test(function () {
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    check_readonly(adapter, "visible", adapter.visible, "boolean", !adapter.visible);
-}, document.title);
+                if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+                        adapter = tizen.bluetooth.getDefaultAdapter();
+                        check_readonly(adapter, "visible", adapter.visible, "boolean", !adapter.visible);
+                }
+        }, document.title);
 
 </script>
 </body>
index ffa04c2631c57246252f8ba88d87b3e118d09b54..d3925c0df6135252478fe5fcfedec2b5750716cd 100755 (executable)
@@ -18,8 +18,8 @@ limitations under the License.
 
 
 Authors:
-        Witold Choinkowski <w.choinkowsk@samsung.com>
-        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>
 
 -->
 <html>
@@ -55,95 +55,100 @@ Authors:
 
 setup({timeout: 180000});
 var t = async_test(document.title, {timeout: 180000}), adapter, gotDeviceInfo, gotDeviceError,
-        onBondingSuccess, onBondingError, powerOnSuccess, minor, major, devService;
+onBondingSuccess, onBondingError, powerOnSuccess, minor, major, devService;
 
 t.step(function () {
+    if (BT_SUPPORT) { // network.bluetooth support
 
-    add_result_callback(function() {
-        clearBonding(REMOTE_DEVICE_ADDRESS);
-    });
-
-    gotDeviceInfo = t.step_func(function (device) {
-
-        //BluetoothClass_attribute AT
-        test(function () {
-            assert_type(device.name, "string", "Device name type check:");
-            assert_type(device.address, "string", "Device address type check:");
-            assert_type(device.deviceClass.major, "octet", "Device deviceClass.major  type check:");
-            assert_type(device.deviceClass.minor, "octet", "Device deviceClass.minor type check:");
-            assert_type(device.deviceClass.services, "object", "Device deviceClass.services type check:");
-            assert_type(device.deviceClass.hasService, "function", "Device deviceClass.hasService type check:");
-            assert_type(device.deviceClass.hasService(0), "boolean", "Device deviceClass.hasService return type check:");
-        } , "BluetoothClass_attribute");
-
-        //BluetoothClass_extend OBX
-        test(function () {
-            check_extensibility(device.deviceClass);
-        }, "BluetoothClass_extend");
-
-        //BluetoothClass_hasService_exist ME
-        test(function () {
-            assert_true("hasService" in device.deviceClass, "hasService in gotDeviceInfo");
-            check_method_exists(device.deviceClass, "hasService");
-        }, "BluetoothClass_hasService_exist");
-
-        //BluetoothClass_major_attribute AE AT ARO
-        test(function () {
-            major = device.deviceClass.major;
-            check_readonly(device.deviceClass, "major", major, "number", "Tizen");
-        }, "BluetoothClass_major_attribute");
-
-        //BluetoothClass_minor_attribute AE AT ARO
-        test(function () {
-            minor = device.deviceClass.minor;
-            check_readonly(device.deviceClass, "minor", minor, "number", "Tizen");
-        }, "BluetoothClass_minor_attribute");
-
-        //BluetoothClass_services_attribute AE AT ARO
-        test(function () {
-            assert_own_property(device.deviceClass, "services", "No property service name.");
-            assert_type(device.deviceClass.services, "array", "device.deviceClass.services is type array.");
-            assert_true(device.deviceClass.services.length >= 0, "bluetooth device services not found");
-        }, "BluetoothClass_services_attribute");
-
-        if(device.deviceClass.services.length > 0) {
-            test(function () {
-                devService = device.deviceClass.services[0];
-                device.deviceClass.services[0] = null;
-                device.deviceClass.services = [];
-                assert_type(device.deviceClass.services[0], "unsigned short", "device.deviceClass.services[0] is type number.");
-                assert_true(devService === device.deviceClass.services[0], "device.deviceClass.services[0] readonly");
-            }, "BluetoothClass_services_readonly_attribute");
-        } else if(device.deviceClass.services.length === 0) {
-            test(function() {
-                device.deviceClass.services[0] = 'test';
-                assert_true( 0 === device.deviceClass.services.length, "device.deviceClass.services is readonly");
-            }, "BluetoothClass_services_readonly_attribute");
-        } else {
-            assert_unreached("Device has not services");
-        }
+        add_result_callback(function () {
+            clearBonding(REMOTE_DEVICE_ADDRESS);
+        });
 
-        t.done();
-    });
+        gotDeviceInfo = t.step_func(function (device) {
 
-    gotDeviceError = t.step_func(function (e) {
-        assert_unreached("gotDeviceError exception:" + e.message);
-    });
+            //BluetoothClass_attribute AT
+            test(function () {
+                assert_type(device.name, "string", "Device name type check:");
+                assert_type(device.address, "string", "Device address type check:");
+                assert_type(device.deviceClass.major, "octet", "Device deviceClass.major  type check:");
+                assert_type(device.deviceClass.minor, "octet", "Device deviceClass.minor type check:");
+                assert_type(device.deviceClass.services, "object", "Device deviceClass.services type check:");
+                assert_type(device.deviceClass.hasService, "function", "Device deviceClass.hasService type check:");
+                assert_type(device.deviceClass.hasService(0), "boolean", "Device deviceClass.hasService return type check:");
+            }, "BluetoothClass_attribute");
+
+            //BluetoothClass_extend OBX
+            test(function () {
+                check_extensibility(device.deviceClass);
+            }, "BluetoothClass_extend");
 
-    onBondingSuccess = t.step_func(function (device) {
-        adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);
-    });
+            //BluetoothClass_hasService_exist ME
+            test(function () {
+                assert_true("hasService" in device.deviceClass, "hasService in gotDeviceInfo");
+                check_method_exists(device.deviceClass, "hasService");
+            }, "BluetoothClass_hasService_exist");
 
-    onBondingError = t.step_func(function (e) {
-        assert_unreached("onBondingError exception:" + e.message);
-    });
+            //BluetoothClass_major_attribute AE AT ARO
+            test(function () {
+                major = device.deviceClass.major;
+                check_readonly(device.deviceClass, "major", major, "number", "Tizen");
+            }, "BluetoothClass_major_attribute");
 
-    powerOnSuccess = t.step_func(function () {
-        adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
-    });
+            //BluetoothClass_minor_attribute AE AT ARO
+            test(function () {
+                minor = device.deviceClass.minor;
+                check_readonly(device.deviceClass, "minor", minor, "number", "Tizen");
+            }, "BluetoothClass_minor_attribute");
 
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
+            //BluetoothClass_services_attribute AE AT ARO
+            test(function () {
+                assert_own_property(device.deviceClass, "services", "No property service name.");
+                assert_type(device.deviceClass.services, "array", "device.deviceClass.services is type array.");
+                assert_true(device.deviceClass.services.length >= 0, "bluetooth device services not found");
+            }, "BluetoothClass_services_attribute");
+
+            if (device.deviceClass.services.length > 0) {
+                test(function () {
+                    devService = device.deviceClass.services[0];
+                    device.deviceClass.services[0] = null;
+                    device.deviceClass.services = [];
+                    assert_type(device.deviceClass.services[0], "unsigned short", "device.deviceClass.services[0] is type number.");
+                    assert_true(devService === device.deviceClass.services[0], "device.deviceClass.services[0] readonly");
+                }, "BluetoothClass_services_readonly_attribute");
+            } else if (device.deviceClass.services.length === 0) {
+                test(function () {
+                    device.deviceClass.services[0] = 'test';
+                    assert_true(0 === device.deviceClass.services.length, "device.deviceClass.services is readonly");
+                }, "BluetoothClass_services_readonly_attribute");
+            } else {
+                assert_unreached("Device has not services");
+            }
+
+            t.done();
+        });
+
+        gotDeviceError = t.step_func(function (e) {
+            assert_unreached("gotDeviceError exception:" + e.message);
+        });
+
+        onBondingSuccess = t.step_func(function (device) {
+            adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);
+        });
+
+        onBondingError = t.step_func(function (e) {
+            assert_unreached("onBondingError exception:" + e.message);
+        });
+
+        powerOnSuccess = t.step_func(function () {
+            adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
+        });
+
+        adapter = tizen.bluetooth.getDefaultAdapter();
+        setPowered(t, adapter, powerOnSuccess);
+
+    } else {
+        t.done();
+    }
 });
 
 </script>
index 2c62c233095f608a3e8bde4f7179f4fecceb8101..eeb17f8bffa0e69d0a77429e5eeeeef9cd6b710b 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMajor, "AUDIO_VIDEO", 0x04, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMajor, "AUDIO_VIDEO", 0x04, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index f57faf71b8391973aba783bde5d663e57dac436d..3c196f5918b796e9fa040301907e8082b16656d6 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMajor, "COMPUTER", 0x01, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMajor, "COMPUTER", 0x01, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index cd275d07bbeb9a9d6ff4cf29b0b9df785e503eb9..74940921545225438f94917601d3d7130516264e 100755 (executable)
@@ -1,48 +1,48 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-
-<head>
-<title>BluetoothClassDeviceMajor_HEALTH_const</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothClassDeviceMajor_HEALTH_const
-//==== LABEL Check various identifiers of BluetoothClassDeviceMajor_HEALTH
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMajor:HEALTH A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
-test(function () {
-    check_const(tizen.bluetooth.deviceMajor, "HEALTH", 0x09, "number", 0x7B);
-}, document.title);
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+        Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothClassDeviceMajor_HEALTH_const</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothClassDeviceMajor_HEALTH_const\r
+//==== LABEL Check various identifiers of BluetoothClassDeviceMajor_HEALTH\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMajor:HEALTH A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO\r
+test(function () {\r
+    check_const(tizen.bluetooth.deviceMajor, "HEALTH", 0x09, "number", 0x7B);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 2eb94de97b91f3bc88817f746affcd8394e25d3d..7d1c2c236ed4e0192015bf1141b3002441d688db 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMajor, "IMAGING", 0x06, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMajor, "IMAGING", 0x06, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index cdd461830dceddb88be5f1617fda975c0515507e..1c4bfd77d678a90f40139fd2b6f823df8eba49ab 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMajor, "MISC", 0x00, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMajor, "MISC", 0x00, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index a76519a1e56c919c27742bc0f2fc69d81886b09f..ec68fbe210ae12b888f28316b931431c754146cc 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMajor, "NETWORK", 0x03, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMajor, "NETWORK", 0x03, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index bd73d18f0f74b9026e94b0a80e919951f70f255e..8c1a412c7fd1ac2364510874fbeb1ef75bddc528 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMajor, "PERIPHERAL", 0x05, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMajor, "PERIPHERAL", 0x05, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index f781a60ab02154bd750dc5f41db66ca8feaf6952..df2f34721ed7f9349c1cc3158ed5196655d3fba2 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMajor, "PHONE", 0x02, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMajor, "PHONE", 0x02, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 2603f1aed0d2891d5b360eb37de27af92c886a36..d9fc5a07474584895a2b376783978fdede0fe253 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMajor, "TOY", 0x08, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMajor, "TOY", 0x08, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 16f1b5b51b22b711e557faf1ac135d24a0623eb8..ed93b2c3876fe2854a1310fc657e725130df520f 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMajor, "UNCATEGORIZED", 0x1F, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMajor, "UNCATEGORIZED", 0x1F, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index e9f64f120d3460e5856fd166af5f3e84ea7c4e21..f415e32ce3961fabad9287d2dd44f1d10a41b12f 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMajor, "WEARABLE", 0x07, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMajor, "WEARABLE", 0x07, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 3d4356fe5cc95d195ba55298563a4057a2f62441..094bfbfea5951e4b10398b225cf0e37748f33e24 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -38,7 +38,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA OBX
 test(function () {
-    check_extensibility(tizen.bluetooth.deviceMajor);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_extensibility(tizen.bluetooth.deviceMajor);
+    }
 }, document.title);
 
 </script>
index 2e8e84964a37cbabb631f681a914fbe7e26719e4..ff6298049b193bc459b1823628ab5468a7c3bae5 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -38,7 +38,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA NIO
 test(function () {
-    check_no_interface_object("BluetoothClassDeviceMajor");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_no_interface_object("BluetoothClassDeviceMajor");
+    }
 }, document.title);
 
 </script>
index 340dc7e5a07795499b87b90f51ae0dc6b6459e93..552881e523dc540a7e66f5ef808cd807b04feae7 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "AV_CAMCORDER", 0x0d, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "AV_CAMCORDER", 0x0d, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 5d5af60db956d21f6e18b32106cea853a92aa9cf..ef8a3ec64336e713ef8ea8e0fa52989de68a7473 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "AV_CAR_AUDIO", 0x08, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "AV_CAR_AUDIO", 0x08, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 4707ce26f176ec0f8aac335e83353f9f8452b7fe..196246bb396dafbf808969baec2a31ba4e233063 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "AV_DISPLAY_AND_LOUDSPEAKER", 0x0f, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "AV_DISPLAY_AND_LOUDSPEAKER", 0x0f, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index c62d5ea49fd3e5b5046dd5b9f86ae42468f2eac7..877075626343128f8651ad26007db148bf94e68c 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "AV_GAMING_TOY", 0x12, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "AV_GAMING_TOY", 0x12, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index ed4e3a91338235abfad06f0603767555f6a24f6f..09dbc41625935af0048627c4f2217a4986aa1574 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "AV_HANDSFREE", 0x02, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "AV_HANDSFREE", 0x02, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 6b6b18536700ae25da156b7841e4abcdad491283..574e31da21304b58f8db87c453125fb01032c693 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "AV_HEADPHONES", 0x06, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "AV_HEADPHONES", 0x06, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 4bd672818b22a3b0ed04b28cc32ee75b68fda1ea..cca1d89b9c58ace7c214cf7ccd9c5e758f7cba94 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "AV_HIFI", 0x0a, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "AV_HIFI", 0x0a, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 0b11de7a101810d070eb7b2059661af33107aac3..3e8e09a2ac0877be96a056b11b4ccd5352924a85 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "AV_LOUDSPEAKER", 0x05, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "AV_LOUDSPEAKER", 0x05, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 358650704877f9c8574c8bcab832d39a7553e29d..a93c7249be77167ebcc06472f5a26c7b5c76e526 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "AV_MICROPHONE", 0x04, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "AV_MICROPHONE", 0x04, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index d084648557331166c462d70b8895a9e4f8100568..d4bc0c4a1cb9af5da1070cdd26100d52f1d0480a 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "AV_MONITOR", 0x0e, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "AV_MONITOR", 0x0e, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 43b000f1eac761bb4ed9dbdf9ebed6f48b7f50ad..45c057e10bea2a233a0779dd4f5eb2d59d6772ed 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "AV_PORTABLE_AUDIO", 0x07, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "AV_PORTABLE_AUDIO", 0x07, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index b22fd84469bef50af33fb00931418076f26583c3..cb720678e3e51416cca73548bef8bef5ca08b8f2 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "AV_SETTOP_BOX", 0x09, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "AV_SETTOP_BOX", 0x09, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 8ddb8ba1083e9f492e25a0fe51e2013505ba6d50..f1ac9a8b67455491de2d76457f47b744086c16a9 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "AV_UNRECOGNIZED", 0x00, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "AV_UNRECOGNIZED", 0x00, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 306d1a3700bc1871252ae11439e4ae50f453bfeb..2b6408bcd18b76697b3dc74edcf51bdc556d6bd2 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "AV_VCR", 0x0b, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "AV_VCR", 0x0b, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index b0a31b3e10f42621acadcf4113b827942b602512..51fc03958d86f36b4325e1d1918dbc10b3dc69b8 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "AV_VIDEO_CAMERA", 0x0c, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "AV_VIDEO_CAMERA", 0x0c, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 601b4dbd48cf02131236ac024ccf9b09df5d22b4..be63f43e881124a81c6a3db906a28a84a0a12816 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "AV_VIDEO_CONFERENCING", 0x10, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "AV_VIDEO_CONFERENCING", 0x10, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 61e7674f29a33dd938c37c2b31e8603e2a4d8fb5..ec48d0b0bc2bb2c6511d1e06bd7cf6901e795a0c 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "AV_WEARABLE_HEADSET", 0x01, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "AV_WEARABLE_HEADSET", 0x01, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index edd9b68089a01ddcba68d6d5c0042db50731304d..780d862d8b6b954f96b6240b5c172833ffea719a 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "COMPUTER_DESKTOP", 0x01, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "COMPUTER_DESKTOP", 0x01, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index dfdd39baf5a584de213ec9f8c84c9d0ac6324f8f..35e4e27d67bd031e5747a6e011cd872dd2e96271 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "COMPUTER_HANDHELD_PC_OR_PDA", 0x04, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "COMPUTER_HANDHELD_PC_OR_PDA", 0x04, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 72fec763a0f0971896549256d8954b20d0e05760..fccff02770867669506a41afee0961da95da6572 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "COMPUTER_LAPTOP", 0x03, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "COMPUTER_LAPTOP", 0x03, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 00fc523da3f4cef7c7d222ef1fa441c5df30e54a..4379083e0c60356a4761d58051a8ea0d72a42686 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "COMPUTER_PALM_PC_OR_PDA", 0x05, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "COMPUTER_PALM_PC_OR_PDA", 0x05, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index d21b776706827e63e18811a7de02cd0cf22edce5..d9e72151692fe5204ae8696f111dc1bfd124f5db 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "COMPUTER_SERVER", 0x02, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "COMPUTER_SERVER", 0x02, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index f0f65487bf065c750295e314e1f0a737ca50b6e2..f2339871ea09390edb4adcf65a41a2911af0ce20 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -39,7 +39,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "COMPUTER_UNCATEGORIZED", 0x00, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "COMPUTER_UNCATEGORIZED", 0x00, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 083d0d5275b98ca5414552f9383b481755088411..f65539b935186bd69de2672292d84ed2fefb1787 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -39,7 +39,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "COMPUTER_WEARABLE", 0x06, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "COMPUTER_WEARABLE", 0x06, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index dfcd8bb73fad3af6c033075bbe9519e8503b7f40..45fe1a11b71e5f144645d5b984a3e092268f918c 100755 (executable)
@@ -1,47 +1,47 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-
-<head>
-<title>BluetoothClassDeviceMinor_HEALTH_ANKLE_PROSTHESIS_const</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothClassDeviceMinor_HEALTH_ANKLE_PROSTHESIS_const
-//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_ANKLE_PROSTHESIS
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_ANKLE_PROSTHESIS A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
-test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "HEALTH_ANKLE_PROSTHESIS", 0x0d, "number", 0x7B);
-}, document.title);
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+        Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothClassDeviceMinor_HEALTH_ANKLE_PROSTHESIS_const</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothClassDeviceMinor_HEALTH_ANKLE_PROSTHESIS_const\r
+//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_ANKLE_PROSTHESIS\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_ANKLE_PROSTHESIS A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO\r
+test(function () {\r
+    check_const(tizen.bluetooth.deviceMinor, "HEALTH_ANKLE_PROSTHESIS", 0x0d, "number", 0x7B);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 0dc4e8663498d0192f0391345c5cd8797e6321f0..ee12adbf104bb5eff81effba123ac38ad15aff5a 100755 (executable)
@@ -1,48 +1,48 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-
-<head>
-<title>BluetoothClassDeviceMinor_HEALTH_BLOOD_PRESSURE_MONITOR_const</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothClassDeviceMinor_HEALTH_BLOOD_PRESSURE_MONITOR_const
-//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_BLOOD_PRESSURE_MONITOR
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_BLOOD_PRESSURE_MONITOR A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
-test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "HEALTH_BLOOD_PRESSURE_MONITOR", 0x01, "number", 0x7B);
-}, document.title);
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+        Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothClassDeviceMinor_HEALTH_BLOOD_PRESSURE_MONITOR_const</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothClassDeviceMinor_HEALTH_BLOOD_PRESSURE_MONITOR_const\r
+//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_BLOOD_PRESSURE_MONITOR\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_BLOOD_PRESSURE_MONITOR A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO\r
+test(function () {\r
+    check_const(tizen.bluetooth.deviceMinor, "HEALTH_BLOOD_PRESSURE_MONITOR", 0x01, "number", 0x7B);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>\r
index ec6121bf3340949b2c35a20339fcc4c0a4f41565..8339df1fc5b55f14581a0a3c3066eb8b1751fbb4 100755 (executable)
@@ -1,48 +1,48 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-
-<head>
-<title>BluetoothClassDeviceMinor_HEALTH_BODY_COMPOSITION_ANALYZER_const</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothClassDeviceMinor_HEALTH_BODY_COMPOSITION_ANALYZER_const
-//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_BODY_COMPOSITION_ANALYZER
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_BODY_COMPOSITION_ANALYZER A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
-test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "HEALTH_BODY_COMPOSITION_ANALYZER", 0x09, "number", 0x7B);
-}, document.title);
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+        Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothClassDeviceMinor_HEALTH_BODY_COMPOSITION_ANALYZER_const</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothClassDeviceMinor_HEALTH_BODY_COMPOSITION_ANALYZER_const\r
+//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_BODY_COMPOSITION_ANALYZER\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_BODY_COMPOSITION_ANALYZER A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO\r
+test(function () {\r
+    check_const(tizen.bluetooth.deviceMinor, "HEALTH_BODY_COMPOSITION_ANALYZER", 0x09, "number", 0x7B);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 3414700a38543165a8d0e3030a0af3bdba272ed7..95046b6bc1d2f4634824bdfe017f692391716730 100755 (executable)
@@ -1,48 +1,48 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-
-<head>
-<title>BluetoothClassDeviceMinor_HEALTH_DATA_DISPLAY_const</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothClassDeviceMinor_HEALTH_DATA_DISPLAY_const
-//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_DATA_DISPLAY
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_DATA_DISPLAY A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
-test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "HEALTH_DATA_DISPLAY", 0x07, "number", 0x7B);
-}, document.title);
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+        Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothClassDeviceMinor_HEALTH_DATA_DISPLAY_const</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothClassDeviceMinor_HEALTH_DATA_DISPLAY_const\r
+//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_DATA_DISPLAY\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_DATA_DISPLAY A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO\r
+test(function () {\r
+    check_const(tizen.bluetooth.deviceMinor, "HEALTH_DATA_DISPLAY", 0x07, "number", 0x7B);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 82e1a9da951e7b423b58fe200ec21f8233d2f5b3..124b129bf46f5f7cbe7409a863c739fb6469acf7 100755 (executable)
@@ -1,48 +1,48 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-
-<head>
-<title>BluetoothClassDeviceMinor_HEALTH_GLUCOSE_METER_const</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothClassDeviceMinor_HEALTH_GLUCOSE_METER_const
-//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_GLUCOSE_METER
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_GLUCOSE_METER A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
-test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "HEALTH_GLUCOSE_METER", 0x04, "number", 0x7B);
-}, document.title);
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+        Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothClassDeviceMinor_HEALTH_GLUCOSE_METER_const</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothClassDeviceMinor_HEALTH_GLUCOSE_METER_const\r
+//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_GLUCOSE_METER\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_GLUCOSE_METER A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO\r
+test(function () {\r
+    check_const(tizen.bluetooth.deviceMinor, "HEALTH_GLUCOSE_METER", 0x04, "number", 0x7B);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>\r
index b94307e912cdebd2b7b4c1a4e452ec872c3beb36..c2a9fdf23baa6ef0097c84b1a590fbac48fd7c37 100755 (executable)
@@ -1,48 +1,48 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-
-<head>
-<title>BluetoothClassDeviceMinor_HEALTH_KNEE_PROSTHESIS_const</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothClassDeviceMinor_HEALTH_KNEE_PROSTHESIS_const
-//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_KNEE_PROSTHESIS
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_KNEE_PROSTHESIS A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
-test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "HEALTH_KNEE_PROSTHESIS", 0x0c, "number", 0x7B);
-}, document.title);
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+        Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothClassDeviceMinor_HEALTH_KNEE_PROSTHESIS_const</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothClassDeviceMinor_HEALTH_KNEE_PROSTHESIS_const\r
+//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_KNEE_PROSTHESIS\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_KNEE_PROSTHESIS A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO\r
+test(function () {\r
+    check_const(tizen.bluetooth.deviceMinor, "HEALTH_KNEE_PROSTHESIS", 0x0c, "number", 0x7B);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 256b72457a2d0af114d789c8ec25ad058d0fb989..863c7c9cba883e2630672f1e346b6cabfb29d619 100755 (executable)
@@ -1,48 +1,48 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-
-<head>
-<title>BluetoothClassDeviceMinor_HEALTH_MEDICATION_MONITOR_const</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothClassDeviceMinor_HEALTH_MEDICATION_MONITOR_const
-//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_MEDICATION_MONITOR
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_MEDICATION_MONITOR A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
-test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "HEALTH_MEDICATION_MONITOR", 0x0b, "number", 0x7B);
-}, document.title);
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+        Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothClassDeviceMinor_HEALTH_MEDICATION_MONITOR_const</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothClassDeviceMinor_HEALTH_MEDICATION_MONITOR_const\r
+//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_MEDICATION_MONITOR\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_MEDICATION_MONITOR A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO\r
+test(function () {\r
+    check_const(tizen.bluetooth.deviceMinor, "HEALTH_MEDICATION_MONITOR", 0x0b, "number", 0x7B);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>\r
index d1eb04576151eddfe2dc3a5619f5218abde9714c..fbde11a3dffc199615b1ddfd8b07fb5617f929f0 100755 (executable)
@@ -1,48 +1,48 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-
-<head>
-<title>BluetoothClassDeviceMinor_HEALTH_PEAK_FLOW_MONITOR_const</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothClassDeviceMinor_HEALTH_PEAK_FLOW_MONITOR_const
-//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_PEAK_FLOW_MONITOR
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_PEAK_FLOW_MONITOR A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
-test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "HEALTH_PEAK_FLOW_MONITOR", 0x0a, "number", 0x7B);
-}, document.title);
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+        Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothClassDeviceMinor_HEALTH_PEAK_FLOW_MONITOR_const</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothClassDeviceMinor_HEALTH_PEAK_FLOW_MONITOR_const\r
+//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_PEAK_FLOW_MONITOR\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_PEAK_FLOW_MONITOR A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO\r
+test(function () {\r
+    check_const(tizen.bluetooth.deviceMinor, "HEALTH_PEAK_FLOW_MONITOR", 0x0a, "number", 0x7B);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>\r
index b9e2fbb5d24df00a4f5cb40313350c0790ff6a83..0a23fdea8c3c1e00ee18e18810d2196ac37b1641 100755 (executable)
@@ -1,48 +1,48 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-
-<head>
-<title>BluetoothClassDeviceMinor_HEALTH_PULSE_OXIMETER_const</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothClassDeviceMinor_HEALTH_PULSE_OXIMETER_const
-//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_PULSE_OXIMETER
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_PULSE_OXIMETER A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
-test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "HEALTH_PULSE_OXIMETER", 0x05, "number", 0x7B);
-}, document.title);
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+        Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothClassDeviceMinor_HEALTH_PULSE_OXIMETER_const</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothClassDeviceMinor_HEALTH_PULSE_OXIMETER_const\r
+//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_PULSE_OXIMETER\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_PULSE_OXIMETER A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO\r
+test(function () {\r
+    check_const(tizen.bluetooth.deviceMinor, "HEALTH_PULSE_OXIMETER", 0x05, "number", 0x7B);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>\r
index f0c3ad6dbc31d57f7e2f77b78ef0592de021e1f1..03950d418761bb4f2fda2e9f3876e60d353f9b9b 100755 (executable)
@@ -1,48 +1,48 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-
-<head>
-<title>BluetoothClassDeviceMinor_HEALTH_PULSE_RATE_MONITOR_const</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothClassDeviceMinor_HEALTH_PULSE_RATE_MONITOR_const
-//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_PULSE_RATE_MONITOR
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_PULSE_RATE_MONITOR A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
-test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "HEALTH_PULSE_RATE_MONITOR", 0x06, "number", 0x7B);
-}, document.title);
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+        Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothClassDeviceMinor_HEALTH_PULSE_RATE_MONITOR_const</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothClassDeviceMinor_HEALTH_PULSE_RATE_MONITOR_const\r
+//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_PULSE_RATE_MONITOR\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_PULSE_RATE_MONITOR A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO\r
+test(function () {\r
+    check_const(tizen.bluetooth.deviceMinor, "HEALTH_PULSE_RATE_MONITOR", 0x06, "number", 0x7B);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>\r
index c5a9c5540b2a121a4db892d73641f275d2228424..c9f8e930999fbd06f9a0974c93bdd73b9211e2e9 100755 (executable)
@@ -1,48 +1,48 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-
-<head>
-<title>BluetoothClassDeviceMinor_HEALTH_STEP_COUNTER_const</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothClassDeviceMinor_HEALTH_STEP_COUNTER_const
-//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_STEP_COUNTER
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_STEP_COUNTER A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
-test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "HEALTH_STEP_COUNTER", 0x08, "number", 0x7B);
-}, document.title);
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+        Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothClassDeviceMinor_HEALTH_STEP_COUNTER_const</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothClassDeviceMinor_HEALTH_STEP_COUNTER_const\r
+//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_STEP_COUNTER\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_STEP_COUNTER A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO\r
+test(function () {\r
+    check_const(tizen.bluetooth.deviceMinor, "HEALTH_STEP_COUNTER", 0x08, "number", 0x7B);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>\r
index c76354035c847ffe5e85dc582c73da43c9d551de..ecd430afc093546835af51e1914cf5c61df0506e 100755 (executable)
@@ -1,48 +1,48 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-
-<head>
-<title>BluetoothClassDeviceMinor_HEALTH_THERMOMETER_const</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothClassDeviceMinor_HEALTH_THERMOMETER_const
-//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_THERMOMETER
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_THERMOMETER A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
-test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "HEALTH_THERMOMETER", 0x02, "number", 0x7B);
-}, document.title);
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+        Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothClassDeviceMinor_HEALTH_THERMOMETER_const</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothClassDeviceMinor_HEALTH_THERMOMETER_const\r
+//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_THERMOMETER\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_THERMOMETER A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO\r
+test(function () {\r
+    check_const(tizen.bluetooth.deviceMinor, "HEALTH_THERMOMETER", 0x02, "number", 0x7B);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>\r
index a56ed83412ed58b442d21df480d490f8ae95ee3a..14067b71fb1eead9f5db10a82918728a9a2e2ff3 100755 (executable)
@@ -1,48 +1,48 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-
-<head>
-<title>BluetoothClassDeviceMinor_HEALTH_UNDEFINED_const</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothClassDeviceMinor_HEALTH_UNDEFINED_const
-//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_UNDEFINED
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_UNDEFINED A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
-test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "HEALTH_UNDEFINED", 0x00, "number", 0x7B);
-}, document.title);
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+        Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothClassDeviceMinor_HEALTH_UNDEFINED_const</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothClassDeviceMinor_HEALTH_UNDEFINED_const\r
+//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_UNDEFINED\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_UNDEFINED A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO\r
+test(function () {\r
+    check_const(tizen.bluetooth.deviceMinor, "HEALTH_UNDEFINED", 0x00, "number", 0x7B);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 01d460d9be6b667051fcd72c00fca894a1f44e15..b9dee90890ed0ba9728fc1677ec3faf5c72f5692 100755 (executable)
@@ -1,48 +1,48 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-
-<head>
-<title>BluetoothClassDeviceMinor_HEALTH_WEIGHING_SCALE_const</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothClassDeviceMinor_HEALTH_WEIGHING_SCALE_const
-//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_WEIGHING_SCALE
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_WEIGHING_SCALE A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
-test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "HEALTH_WEIGHING_SCALE", 0x03, "number", 0x7B);
-}, document.title);
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+        Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothClassDeviceMinor_HEALTH_WEIGHING_SCALE_const</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothClassDeviceMinor_HEALTH_WEIGHING_SCALE_const\r
+//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_WEIGHING_SCALE\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_WEIGHING_SCALE A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO\r
+test(function () {\r
+    check_const(tizen.bluetooth.deviceMinor, "HEALTH_WEIGHING_SCALE", 0x03, "number", 0x7B);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>\r
index f40382a085fd996ad9ad1a9eb28c836b7c87e70b..47a4dc8a8e2801a4b4e19e2b14fd9d7d8105954b 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "IMAGING_CAMERA", 0x08, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "IMAGING_CAMERA", 0x08, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index b5b5d67f014d3b3320b8a7bb05e3817afc62f695..1e8618b393d8ed0b8c5705b8c65b1117d6b5408f 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "IMAGING_DISPLAY", 0x04, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "IMAGING_DISPLAY", 0x04, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 4e01da72466cc9200513612599c3ab8524fe5e80..20fbab18f992c2f9202f5d8fce0b6fb40443bf76 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "IMAGING_PRINTER", 0x20, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "IMAGING_PRINTER", 0x20, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 0545165a85b83a5dd3e73610e4b81b1a7ecdd4d9..6a7550794855cd208965cd7bb15278044d03facd 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "IMAGING_SCANNER", 0x10, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "IMAGING_SCANNER", 0x10, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 63f4d783479814cf2c711d4827c9fa562c230ff1..cda75092ac9617cc625862a10290f71811ce00df 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "IMAGING_UNCATEGORIZED", 0x00, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "IMAGING_UNCATEGORIZED", 0x00, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index f9914566bcd34f1d728dab39054409d37f776f0d..dafed16be020dddfa2bb020435ef39e7bb64b8ff 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_CARD_READER", 0x06, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_CARD_READER", 0x06, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index b50b1e46d7d9da3cd991d1fc917ace4f85b4f5fa..7c99566c0e9f0be81031c3e9ac8ee6bf7e7a4471 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_DEGITIZER_TABLET", 0x05, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_DEGITIZER_TABLET", 0x05, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 1fe944b6646e443e2e9605386fb512f27a00bad4..128b64869ec59e1d928213b8205e1e8444cdd4ad 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_DIGITAL_PEN", 0x07, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_DIGITAL_PEN", 0x07, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 851087f8b58ea08637516e5151bc1701c1520629..bde0db3b79c8baaf82de107a844ac8fc2765e30f 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_GAMEPAD", 0x02, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_GAMEPAD", 0x02, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 6d946075a3060509d5439929c4bd16b78551646f..905caedf10cd105458212af4f673f8909dbfedd9 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_HANDHELD_INPUT_DEVICE", 0x09, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_HANDHELD_INPUT_DEVICE", 0x09, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index beb70d79fa2b9ee849fb4d05c975996858c8ae2e..eb20516b9d8f82eecb6e7b6a3e3a91b8f929efa7 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_HANDHELD_SCANNER", 0x08, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_HANDHELD_SCANNER", 0x08, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 08ef28d38e36376ae9b98bb457382276fcf67100..b9ee984e3ac4a35599a6dcef6fce6d5bb86b3f79 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_JOYSTICK", 0x01, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_JOYSTICK", 0x01, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index afa8841e79156b6eddd05af1450e8d232ed65cfc..d169609b4cf14a3ca66f828c4674c64829e28ed4 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_KEYBOARD_AND_POINTING_DEVICE", 0x30, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_KEYBOARD_AND_POINTING_DEVICE", 0x30, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 75822dcc443a5fc0ff2ac10b8bccc7bf696d242b..c0a83fc4759bd7a04f011afe242fdcc1a8a6666b 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_KEYBOARD", 0x10, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_KEYBOARD", 0x10, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 6e658218f6b8c99b23a9f60107703e2e6e3a9652..2ed74c746a6f1a7dd33f1f88006258f99a12974e 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_POINTING_DEVICE", 0x20, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_POINTING_DEVICE", 0x20, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 6637c7d155b14e76f5f921a3d187a9c4880af977..98c1a6d417a5ae3a3d7e174793197c7ee469e19f 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_REMOTE_CONTROL", 0x03, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_REMOTE_CONTROL", 0x03, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index a18c76ae58143372c806ffa8edad33d4c41631d9..7eb74bc81e718f3d16da521b80732b90025f8e34 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_SENSING_DEVICE", 0x04, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_SENSING_DEVICE", 0x04, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index dc6c0bfb4edac9ac887812b16ae6003b5e60effe..3f0f04b6b3dd888e29ade7d196b7f3e5ff0ee6ca 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_UNCATEGORIZED", 0, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_UNCATEGORIZED", 0, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index a1772b9e998973d539de67855756b847627835a9..2a4fb3eb96634a50dce6831fb768a7b616a16870 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "PHONE_CELLULAR", 0x01, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "PHONE_CELLULAR", 0x01, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index b57b7adf7964aa42fc9648acd5c027bb5a7ff353..010206f2fc5e2e3e7e482577e50b1f34ae6f2cb0 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "PHONE_CORDLESS", 0x02, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "PHONE_CORDLESS", 0x02, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 10ab110dfef9b87271bde8411f4beb74616be192..4938313fb27f212a67e02309ba87acfbbe086db7 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "PHONE_ISDN", 0x05, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "PHONE_ISDN", 0x05, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 623847ced47058b633e40e677562edc2d5db460e..af54686a63eedcb13d047bd1f469a877cc579fdb 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "PHONE_MODEM_OR_GATEWAY", 0x04, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "PHONE_MODEM_OR_GATEWAY", 0x04, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 06005f60a1c6ab80fe4d252ff07cd1c8293c6b94..594dfd024fdfe96ec172f7458b5a841bf1f92b5f 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "PHONE_SMARTPHONE", 0x03, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "PHONE_SMARTPHONE", 0x03, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 26357f6544f403493ce532d13028e67f6b27ddb5..e2b37bb4f3b466e23afe8c9640ca08a30e16c6fe 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "PHONE_UNCATEGORIZED", 0x00, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "PHONE_UNCATEGORIZED", 0x00, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 59f84d496b5612082f2ba23c9c9dc0ceaed57106..0bcb36cafe3e5ab4151d7a499bf536843ac32818 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "TOY_CONTROLLER", 0x04, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "TOY_CONTROLLER", 0x04, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 8d3551ee505060fe538a078ad8856f04d6ecab68..a14b8614eed56342c723c82c183f0efd433cbc99 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "TOY_DOLL", 0x03, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "TOY_DOLL", 0x03, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 459ee1e30325302f603042d7e0b7cd3c56853f4b..b908b07c7e94c358be960ba423c22b6585881d23 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "TOY_GAME", 0x05, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "TOY_GAME", 0x05, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 40bc84f56d41577ff8241504ae2cc12ffd66fa02..a9cef648458fb3bca49daba68a16755bf7268a54 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "TOY_ROBOT", 0x01, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "TOY_ROBOT", 0x01, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 5fda4377fc5276d6a19c2f5ad0b8bd51d547a934..a66e39d3616b93242f0ea8c823644b3b9987c8d3 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "TOY_VEHICLE", 0x02, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "TOY_VEHICLE", 0x02, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index ff513c0067756531f71ebfebfbb59c232e990a49..8c6016d0265b8ca1fc1287079edf7cc04556cf00 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "WEARABLE_GLASSES", 0x05, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "WEARABLE_GLASSES", 0x05, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index b9e579d46f36a223f15f491c977342f356595146..cea367add97bb829bf1ce8bc7c1fd81380c1c24e 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "WEARABLE_HELMET", 0x04, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "WEARABLE_HELMET", 0x04, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 4d81558c426e6a94dd1e46ac9a08c7df668da9c5..d25f82e978bfda416a9e073f32933f0f14975330 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "WEARABLE_JACKET", 0x03, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "WEARABLE_JACKET", 0x03, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 4cacc678e4e1b0e109780c23d15fd78de80b296d..d30e8b7c602afce5b8c9dc580553b03de2c54f75 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "WEARABLE_PAGER", 0x02, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "WEARABLE_PAGER", 0x02, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index d0aead3f732a5ca1ffc83500f37e69f4926f3ba0..6305301218f5185d68920000be417a85911c685a 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceMinor, "WEARABLE_WRITST_WATCH", 0x01, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceMinor, "WEARABLE_WRITST_WATCH", 0x01, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 94e9eac2f2f8800f024f4d7d3a6e0539d77b4303..d262da783b7de4b980637bf325de4a77f9069ae3 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -37,7 +37,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA OBX
 test(function () {
-    check_extensibility(tizen.bluetooth.deviceMinor);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_extensibility(tizen.bluetooth.deviceMinor);
+    }
 }, document.title);
 
 </script>
index a78aecb11d699e203a6fd2c81b1e8a91957ac148..83778510c1ecf828473a57dd546015a8be498d72 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -38,7 +38,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA NIO
 test(function () {
-    check_no_interface_object("BluetoothClassDeviceMinor");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_no_interface_object("BluetoothClassDeviceMinor");
+    }
 }, document.title);
 
 </script>
index b024540c3850888a76a01719ab2f5c3e96861f93..eba9748893bf5d4ed2a54c3737e6348bf7dcd764 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -41,7 +41,9 @@ Authors:
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 
 test(function () {
-    check_const(tizen.bluetooth.deviceService, "AUDIO", 0x0100, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceService, "AUDIO", 0x0100, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index bcdd3d17b98114734066cef8f182cd847a824526..134bc9f9610bef0089f7a22e94f8c9195a6c2c82 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceService, "CAPTURING", 0x0040, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceService, "CAPTURING", 0x0040, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 67a44745f2b4f52a805ad19a9850d9a424574967..cade3addf86a9a274b8ed235614c3980c5dede79 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -41,7 +41,9 @@ Authors:
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 
 test(function () {
-    check_const(tizen.bluetooth.deviceService, "INFORMATION", 0x0400, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceService, "INFORMATION", 0x0400, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 0d056547fc5f8a41484250dd887fe5fc74af1bc0..6337c35b0c07fb7ac3a8ffcec767c35290e81b1d 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -41,7 +41,9 @@ Authors:
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 
 test(function () {
-    check_const(tizen.bluetooth.deviceService, "LIMITED_DISCOVERABILITY", 0x0001, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceService, "LIMITED_DISCOVERABILITY", 0x0001, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index a2642a498732988ba4724f2c8efea9c834a7e6f6..a3e6cb3b8c98e677e89454c9723578ff7fdcee6b 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceService, "NETWORKING", 0x0010, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceService, "NETWORKING", 0x0010, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index adb6d79aeb3ee41be8431a6fe60520a185875397..477c0345c61be7c93f51bed5efc9674bb5d7fe3c 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceService, "OBJECT_TRANSFER", 0x0080, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceService, "OBJECT_TRANSFER", 0x0080, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index 7c2ab8416d2ecddbcd5494f0b820a37aa9acfaf3..21267f151936873dad8a9ca334e30b4906a51aa6 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceService, "POSITIONING", 0x0008, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceService, "POSITIONING", 0x0008, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index ac3818cd5b83c9e415387ef7f177ccae5a886a1d..2732b165eb64a9793669833a19ef12f7a909d2ab 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceService, "RENDERING", 0x0020, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceService, "RENDERING", 0x0020, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index f999fed788901e03fbbf5ccd7fc74ffcddf5f800..ee9e969a9d6861345644c5aa98bd532808a1629f 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -40,7 +40,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 test(function () {
-    check_const(tizen.bluetooth.deviceService, "TELEPHONY", 0x0200, "number", 0x7B);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth.deviceService, "TELEPHONY", 0x0200, "number", 0x7B);
+    }
 }, document.title);
 
 </script>
index c8c860d2cc2bc67724531e657e25060d1c42ae92..e3e4b79c8518ca4e8b44ef8b87d884376111da01 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -38,7 +38,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA OBX
 test(function () {
-    check_extensibility(tizen.bluetooth.deviceService);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_extensibility(tizen.bluetooth.deviceService);
+    }
 }, document.title);
 
 </script>
index 6b007d337d81e3a62ff33ac280692f2590fb9c9b..3fa6d09592e3f38661f7f88ddd34a96c885562e1 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -38,7 +38,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA NIO
 test(function () {
-    check_no_interface_object("BluetoothClassDeviceService");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_no_interface_object("BluetoothClassDeviceService");
+    }
 }, document.title);
 
 </script>
index be05a682e88bc20c6c65b73a2006b6d1c3390d9a..d5677687c4229c479f4126f6645d4ffdc79d9347 100755 (executable)
@@ -27,9 +27,9 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-        Lukasz Bardeli <l.bardeli@samsung.com>
-        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
+Lei, ZhanX <zhanx.lei@intel.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>
 
 -->
 
@@ -55,41 +55,46 @@ setup({timeout: 180000});
 var adapter = null, t = async_test(document.title, {timeout: 180000}), gotDeviceInfo,
     gotDeviceError, onBondingSuccess, onBondingError, powerOnSuccess;
 t.step(function () {
+    if (BT_SUPPORT) { // network.bluetooth support
 
-    add_result_callback(function() {
-        clearBonding(REMOTE_DEVICE_ADDRESS);
-    });
-
-    gotDeviceInfo = t.step_func(function (device) {
-        if (device.deviceClass.services.length > 0){
-            assert_true(device.deviceClass.hasService(device.deviceClass.services[0]), "hasService in gotDeviceInfo");
-            t.done();
-        } else if(device.deviceClass.services.length === 0) {
-            assert_true( 0 === device.deviceClass.services.length, "Empty Service in gotDeviceInfo");
-            t.done();
-        } else {
-            assert_unreached("Device has not services");
-        }
-    });
-
-    gotDeviceError = t.step_func(function (e) {
-        assert_unreached("gotDeviceError exception:" + e.message);
-    });
-
-    onBondingSuccess = t.step_func(function (device) {
-        adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);
-    });
-
-    onBondingError = t.step_func(function (e) {
-        assert_unreached("onBondingError exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
+        add_result_callback(function () {
+            clearBonding(REMOTE_DEVICE_ADDRESS);
+        });
+
+        gotDeviceInfo = t.step_func(function (device) {
+            if (device.deviceClass.services.length > 0) {
+                assert_true(device.deviceClass.hasService(device.deviceClass.services[0]), "hasService in gotDeviceInfo");
+                t.done();
+            } else if (device.deviceClass.services.length === 0) {
+                assert_true(0 === device.deviceClass.services.length, "Empty Service in gotDeviceInfo");
+                t.done();
+            } else {
+                assert_unreached("Device has not services");
+            }
+        });
+
+        gotDeviceError = t.step_func(function (e) {
+            assert_unreached("gotDeviceError exception:" + e.message);
+        });
+
+        onBondingSuccess = t.step_func(function (device) {
+            adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);
+        });
+
+        onBondingError = t.step_func(function (e) {
+            assert_unreached("onBondingError exception:" + e.message);
+        });
+
+        powerOnSuccess = t.step_func(function () {
+            adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
+        });
+
+        adapter = tizen.bluetooth.getDefaultAdapter();
+        setPowered(t, adapter, powerOnSuccess);
+
+    } else {
+        t.done();
+    }
 });
 
 </script>
index ac56f4d228bbfcd4485aa55a1ac6142e1c752a67..0854c61022e3ce5a370461d291db1b7305aaef00 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -38,7 +38,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA NIO
 test(function () {
-    check_no_interface_object("BluetoothClass");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_no_interface_object("BluetoothClass");
+    }
 }, document.title);
 
 </script>
index c109c67339a7c15c1877292fcc09e8aa966f6400..26332c360a12dc428f441b3afe5d3d6a293dcf8a 100755 (executable)
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Witold Choinkowski <w.choinkowsk@samsung.com>
-        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothDevice</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothDevice
-//==== LABEL Check BluetoothDevice attributes and functions
-//==== EXECUTION_TYPE manual
-//==== PRIORITY P3
-//==== STEP several tests executed from base test
-//==== EXPECT all subtests should be successful
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDeviceSuccessCallback:onsuccess M
-//==== TEST_CRITERIA CBT CBOA
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:address A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:deviceClass A
-//==== TEST_CRITERIA  AE AT ARO(loose)
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:isBonded M
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:isConnected A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:isTrusted A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:name A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:uuids A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:BluetoothDevice U
-//==== TEST_CRITERIA OBX
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:connectToServiceByUUID M
-//==== TEST_CRITERIA ME
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:connectToServiceByUUID M
-//==== TEST_CRITERIA MMA
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:connectToServiceByUUID M
-//==== TEST_CRITERIA MTCB
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:connectToServiceByUUID M
-//==== TEST_CRITERIA MC
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.
-
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, onBondingError, onBondingSuccess, errorCallback,
-    successCallback, exceptionName = "TypeMismatchError", conversionTable, conversionErrorCallback, conversionSuccessCallback,
-    incorrectSuccessCallback, incorrectErrorCallback, successCallback, errorCallback, deviceClassCP, fakeDeviceClass, devUuid, i;
-t.step(function () {
-
-    add_result_callback(function() {
-        clearBonding(REMOTE_DEVICE_ADDRESS);
-    });
-
-    incorrectSuccessCallback = {
-        onsuccess: t.step_func(function () {
-            assert_unreached("Invalid successCallback invoked");
-        })
-    };
-    incorrectErrorCallback = {
-        onerror: t.step_func(function () {
-            assert_unreached("Invalid errorCallback invoked: ");
-        })
-    };
-
-    successCallback = t.step_func(function () {
-        assert_unreached("successCallback exception");
-    });
-
-    errorCallback = t.step_func(function (e) {
-        assert_unreached("errorCallback exception:" + e.message);
-    });
-
-    onBondingSuccess = t.step_func(function (device) {
-        //BluetoothDeviceSuccessCallback CBT CBOA
-        test(function () {
-            assert_true("name" in device, "No name in device");
-            assert_true("address" in device, "No address in device");
-            assert_true("deviceClass" in device, "No deviceClass in device");
-            assert_true("isBonded" in device, "No isBonded in device");
-            assert_true("isTrusted" in device, "No isTrusted in device");
-            assert_true("isConnected" in device, "No isConnected in device");
-            assert_true("uuids" in device, "No uuids in device");
-            assert_type(device.connectToServiceByUUID, "function", "Method connectToServiceByUUID does not exist.");
-        }, "BluetoothDeviceSuccessCallback_onsuccess");
-
-        //address AE AT ARO
-        test(function () {
-            check_readonly(device, "address", REMOTE_DEVICE_ADDRESS, "string", device.address + "Tizen");
-        } , "BluetoothDevice_address_attribute");
-
-        //deviceClass AE AT ARO(loose)
-        test(function () {
-            assert_own_property(device, "deviceClass", "device does not own deviceClass property.");
-            assert_own_property(device.deviceClass, "major", "device.deviceClass does not own major property.");
-            assert_own_property(device.deviceClass, "minor", "device.deviceClass does not own minor property.");
-            assert_own_property(device.deviceClass, "services", "device.deviceClass does not own services property.");
-
-            assert_type(device.deviceClass, "object", "Type of deviceClass is different.");
-
-            //deviceClass is obtained by getter so I can not directly test the override
-            deviceClassCP = device.deviceClass;
-            fakeDeviceClass = {
-                major:0x01,
-                minor:0x01,
-                services:[]
-            };
-            device.deviceClass = fakeDeviceClass;
-            assert_equals(device.deviceClass.major, deviceClassCP.major, "deviceClass can be modified.");
-            assert_equals(device.deviceClass.minor, deviceClassCP.minor, "deviceClass can be modified.");
-            assert_array_equals(device.deviceClass.services, deviceClassCP.services, "deviceClass can be modified.");
-        }, "BluetoothDevice_deviceClass_attribute");
-
-        //isBonded AE AT ARO
-        test(function () {
-            check_readonly(device, "isBonded", true, "boolean", false);
-        } , "BluetoothDevice_isBonded_attribute");
-
-        //isConnected AE AT ARO
-        test(function () {
-            check_readonly(device, "isConnected", device.isConnected, "boolean", !device.isConnected);
-        } , "BluetoothDevice_isConnected_attribute");
-
-        //isTrusted AE AT ARO
-        test(function () {
-            check_readonly(device, "isTrusted", device.isTrusted, "boolean", !device.isTrusted);
-        } , "BluetoothDevice_isTrusted_attribute");
-
-        //name AE AT ARO
-        test(function () {
-            check_readonly(device, "name", device.name, "string", device.name+"Tizen");
-        } , "BluetoothDevice_name_attribute");
-
-        //uuids AE AT ARO
-        test(function () {
-            assert_true("uuids" in device, "uuids in gotDeviceInfo");
-            assert_type(device.uuids, "array", "wrong type of uuids in device");
-            assert_true(device.uuids.length > 0, "bluetooth device uuids not found");
-
-            devUuid= device.uuids[0];
-            assert_type(device.uuids[0], "string", "device.uuids[0] is type string.");
-            device.uuids = [];
-            device.uuids[0] = "test string";
-            assert_true(devUuid === device.uuids[0], "device.uuids[0] readonly");
-        }, "BluetoothDevice_uuids_attribute");
-
-        //BluetoothDevice OBX
-        test(function () {
-            check_extensibility(device);
-        }, "BluetoothDevice_extend");
-
-        //connectToServiceByUUID ME
-        test(function () {
-            assert_true("connectToServiceByUUID" in device, "No connectToServiceByUUID in device");
-            check_method_exists(device, "connectToServiceByUUID");
-        }, "BluetoothDevice_connectToServiceByUUID_exist");
-
-        //connectToServiceByUUID MMA
-        test(function () {
-            assert_throws ({name:"TypeMismatchError"},
-                function () {
-                    device.connectToServiceByUUID();
-                }, "Method with non optional argument.");
-        }, "BluetoothDevice_connectToServiceByUUID_missarg");
-
-        //connectToServiceByUUID errorCallback MTCB
-        test(function () {
-            assert_throws({name: exceptionName},
-                function () {
-                device.connectToServiceByUUID(CHAT_SERVICE_UUID, successCallback, incorrectErrorCallback);
-            }, exceptionName + " should be thrown - given incorrect error callback.");
-        }, "BluetoothDevice_connectToServiceByUUID_errorCallback_invalid_cb");
-
-        //connectToServiceByUUID successCallback MTCB
-        test(function () {
-            assert_throws({name: exceptionName},
-                function () {
-                device.connectToServiceByUUID(CHAT_SERVICE_UUID, incorrectSuccessCallback, errorCallback);
-            }, exceptionName + " should be thrown - given incorrect error callback.");
-        }, "BluetoothDevice_connectToServiceByUUID_successCallback_invalid_cb");
-
-        //connectToServiceByUUID errorCallback MC
-        test(function () {
-            conversionTable = getTypeConversionExceptions("functionObject", true);
-            for(i = 0; i < conversionTable.length; i++) {
-                conversionErrorCallback = conversionTable[i][0];
-                exceptionName = conversionTable[i][1];
-
-                assert_throws({name: exceptionName},
-                    function () {
-                        device.connectToServiceByUUID(CHAT_SERVICE_UUID, successCallback, conversionErrorCallback);
-                    }, exceptionName + " should be thrown - given incorrect errorCallback.");
-            }
-        }, "BluetoothDevice_connectToServiceByUUID_errorCallback_TypeMismatch");
-
-        //connectToServiceByUUID successCallback MC
-        test(function () {
-            conversionTable = getTypeConversionExceptions("functionObject", false);
-            for(i = 0; i < conversionTable.length; i++) {
-                conversionSuccessCallback = conversionTable[i][0];
-                exceptionName = conversionTable[i][1];
-
-                assert_throws({name: exceptionName},
-                    function () {
-                        device.connectToServiceByUUID(CHAT_SERVICE_UUID, conversionSuccessCallback, errorCallback);
-                    }, exceptionName + " should be thrown - given incorrect successCallback.");
-            }
-        }, "BluetoothDevice_connectToServiceByUUID_successCallback_TypeMismatch");
-
-        t.done();
-    });
-
-    onBondingError = t.step_func(function (e) {
-        assert_unreached("onBondingError exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Witold Choinkowski <w.choinkowsk@samsung.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothDevice</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothDevice\r
+//==== LABEL Check BluetoothDevice attributes and functions\r
+//==== EXECUTION_TYPE manual\r
+//==== PRIORITY P3\r
+//==== STEP several tests executed from base test\r
+//==== EXPECT all subtests should be successful\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDeviceSuccessCallback:onsuccess M\r
+//==== TEST_CRITERIA CBT CBOA\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:address A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:deviceClass A\r
+//==== TEST_CRITERIA  AE AT ARO(loose)\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:isBonded M\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:isConnected A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:isTrusted A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:name A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:uuids A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:BluetoothDevice U\r
+//==== TEST_CRITERIA OBX\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:connectToServiceByUUID M\r
+//==== TEST_CRITERIA ME\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:connectToServiceByUUID M\r
+//==== TEST_CRITERIA MMA\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:connectToServiceByUUID M\r
+//==== TEST_CRITERIA MTCB\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:connectToServiceByUUID M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.\r
+\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, onBondingError, onBondingSuccess, errorCallback,\r
+    successCallback, exceptionName = "TypeMismatchError", conversionTable, conversionErrorCallback, conversionSuccessCallback,\r
+    incorrectSuccessCallback, incorrectErrorCallback, successCallback, errorCallback, deviceClassCP, fakeDeviceClass, devUuid, i;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      add_result_callback(function () {\r
+            clearBonding(REMOTE_DEVICE_ADDRESS);\r
+        });\r
+\r
+        incorrectSuccessCallback = {\r
+            onsuccess: t.step_func(function () {\r
+                assert_unreached("Invalid successCallback invoked");\r
+            })\r
+        };\r
+        incorrectErrorCallback = {\r
+            onerror: t.step_func(function () {\r
+                assert_unreached("Invalid errorCallback invoked: ");\r
+            })\r
+        };\r
+\r
+        successCallback = t.step_func(function () {\r
+            assert_unreached("successCallback exception");\r
+        });\r
+\r
+        errorCallback = t.step_func(function (e) {\r
+            assert_unreached("errorCallback exception:" + e.message);\r
+        });\r
+\r
+        onBondingSuccess = t.step_func(function (device) {\r
+            //BluetoothDeviceSuccessCallback CBT CBOA\r
+            test(function () {\r
+                assert_true("name" in device, "No name in device");\r
+                assert_true("address" in device, "No address in device");\r
+                assert_true("deviceClass" in device, "No deviceClass in device");\r
+                assert_true("isBonded" in device, "No isBonded in device");\r
+                assert_true("isTrusted" in device, "No isTrusted in device");\r
+                assert_true("isConnected" in device, "No isConnected in device");\r
+                assert_true("uuids" in device, "No uuids in device");\r
+                assert_type(device.connectToServiceByUUID, "function", "Method connectToServiceByUUID does not exist.");\r
+            }, "BluetoothDeviceSuccessCallback_onsuccess");\r
+\r
+            //address AE AT ARO\r
+            test(function () {\r
+                check_readonly(device, "address", REMOTE_DEVICE_ADDRESS, "string", device.address + "Tizen");\r
+            }, "BluetoothDevice_address_attribute");\r
+\r
+            //deviceClass AE AT ARO(loose)\r
+            test(function () {\r
+                assert_own_property(device, "deviceClass", "device does not own deviceClass property.");\r
+                assert_own_property(device.deviceClass, "major", "device.deviceClass does not own major property.");\r
+                assert_own_property(device.deviceClass, "minor", "device.deviceClass does not own minor property.");\r
+                assert_own_property(device.deviceClass, "services", "device.deviceClass does not own services property.");\r
+\r
+                assert_type(device.deviceClass, "object", "Type of deviceClass is different.");\r
+\r
+                //deviceClass is obtained by getter so I can not directly test the override\r
+                deviceClassCP = device.deviceClass;\r
+                fakeDeviceClass = {\r
+                    major: 0x01,\r
+                    minor: 0x01,\r
+                    services: []\r
+                };\r
+                device.deviceClass = fakeDeviceClass;\r
+                assert_equals(device.deviceClass.major, deviceClassCP.major, "deviceClass can be modified.");\r
+                assert_equals(device.deviceClass.minor, deviceClassCP.minor, "deviceClass can be modified.");\r
+                assert_array_equals(device.deviceClass.services, deviceClassCP.services, "deviceClass can be modified.");\r
+            }, "BluetoothDevice_deviceClass_attribute");\r
+\r
+            //isBonded AE AT ARO\r
+            test(function () {\r
+                check_readonly(device, "isBonded", true, "boolean", false);\r
+            }, "BluetoothDevice_isBonded_attribute");\r
+\r
+            //isConnected AE AT ARO\r
+            test(function () {\r
+                check_readonly(device, "isConnected", device.isConnected, "boolean", !device.isConnected);\r
+            }, "BluetoothDevice_isConnected_attribute");\r
+\r
+            //isTrusted AE AT ARO\r
+            test(function () {\r
+                check_readonly(device, "isTrusted", device.isTrusted, "boolean", !device.isTrusted);\r
+            }, "BluetoothDevice_isTrusted_attribute");\r
+\r
+            //name AE AT ARO\r
+            test(function () {\r
+                check_readonly(device, "name", device.name, "string", device.name + "Tizen");\r
+            }, "BluetoothDevice_name_attribute");\r
+\r
+            //uuids AE AT ARO\r
+            test(function () {\r
+                assert_true("uuids" in device, "uuids in gotDeviceInfo");\r
+                assert_type(device.uuids, "array", "wrong type of uuids in device");\r
+                assert_true(device.uuids.length > 0, "bluetooth device uuids not found");\r
+\r
+                devUuid = device.uuids[0];\r
+                assert_type(device.uuids[0], "string", "device.uuids[0] is type string.");\r
+                device.uuids = [];\r
+                device.uuids[0] = "test string";\r
+                assert_true(devUuid === device.uuids[0], "device.uuids[0] readonly");\r
+            }, "BluetoothDevice_uuids_attribute");\r
+\r
+            //BluetoothDevice OBX\r
+            test(function () {\r
+                check_extensibility(device);\r
+            }, "BluetoothDevice_extend");\r
+\r
+            //connectToServiceByUUID ME\r
+            test(function () {\r
+                assert_true("connectToServiceByUUID" in device, "No connectToServiceByUUID in device");\r
+                check_method_exists(device, "connectToServiceByUUID");\r
+            }, "BluetoothDevice_connectToServiceByUUID_exist");\r
+\r
+            //connectToServiceByUUID MMA\r
+            test(function () {\r
+                assert_throws({ name: "TypeMismatchError" },\r
+                    function () {\r
+                        device.connectToServiceByUUID();\r
+                    }, "Method with non optional argument.");\r
+            }, "BluetoothDevice_connectToServiceByUUID_missarg");\r
+\r
+            //connectToServiceByUUID errorCallback MTCB\r
+            test(function () {\r
+                assert_throws({ name: exceptionName },\r
+                    function () {\r
+                        device.connectToServiceByUUID(CHAT_SERVICE_UUID, successCallback, incorrectErrorCallback);\r
+                    }, exceptionName + " should be thrown - given incorrect error callback.");\r
+            }, "BluetoothDevice_connectToServiceByUUID_errorCallback_invalid_cb");\r
+\r
+            //connectToServiceByUUID successCallback MTCB\r
+            test(function () {\r
+                assert_throws({ name: exceptionName },\r
+                    function () {\r
+                        device.connectToServiceByUUID(CHAT_SERVICE_UUID, incorrectSuccessCallback, errorCallback);\r
+                    }, exceptionName + " should be thrown - given incorrect error callback.");\r
+            }, "BluetoothDevice_connectToServiceByUUID_successCallback_invalid_cb");\r
+\r
+            //connectToServiceByUUID errorCallback MC\r
+            test(function () {\r
+                conversionTable = getTypeConversionExceptions("functionObject", true);\r
+                for (i = 0; i < conversionTable.length; i++) {\r
+                    conversionErrorCallback = conversionTable[i][0];\r
+                    exceptionName = conversionTable[i][1];\r
+\r
+                    assert_throws({ name: exceptionName },\r
+                        function () {\r
+                            device.connectToServiceByUUID(CHAT_SERVICE_UUID, successCallback, conversionErrorCallback);\r
+                        }, exceptionName + " should be thrown - given incorrect errorCallback.");\r
+                }\r
+            }, "BluetoothDevice_connectToServiceByUUID_errorCallback_TypeMismatch");\r
+\r
+            //connectToServiceByUUID successCallback MC\r
+            test(function () {\r
+                conversionTable = getTypeConversionExceptions("functionObject", false);\r
+                for (i = 0; i < conversionTable.length; i++) {\r
+                    conversionSuccessCallback = conversionTable[i][0];\r
+                    exceptionName = conversionTable[i][1];\r
+\r
+                    assert_throws({ name: exceptionName },\r
+                        function () {\r
+                            device.connectToServiceByUUID(CHAT_SERVICE_UUID, conversionSuccessCallback, errorCallback);\r
+                        }, exceptionName + " should be thrown - given incorrect successCallback.");\r
+                }\r
+            }, "BluetoothDevice_connectToServiceByUUID_successCallback_TypeMismatch");\r
+\r
+            t.done();\r
+        });\r
+\r
+        onBondingError = t.step_func(function (e) {\r
+            assert_unreached("onBondingError exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 13b0e69901a8e88156325ea4ce44b369ee5c1969..e4e10833c2fbda90fa3a71a2901f50ad624222ee 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -38,7 +38,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CBNIO
 test(function () {
-    check_no_interface_object("BluetoothDeviceArraySuccessCallback");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_no_interface_object("BluetoothDeviceArraySuccessCallback");
+    }
 }, document.title);
 
 </script>
index 5e4d0b8fca3fe09dfd26dac2c90072ebe5d10c28..078c31eefe4ac6eb6f3c763d9cfe684e37bbcfce 100755 (executable)
@@ -1,92 +1,98 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothDeviceArraySuccessCallback_onsuccess</title>
-<meta charset="utf-8">
-<meta name="timeout" content="long"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothDeviceArraySuccessCallback_onsuccess
-//==== LABEL Check if BluetoothDeviceArraySuccessCallback callback is called and if its arguments have proper type
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 300
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDeviceArraySuccessCallback:onsuccess M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA CBOA CBT
-
-setup({timeout: 300000});
-
-var adapter = null, t = async_test(document.title, {timeout: 300000}), i,
-    stopDiscoverySuccess, getKnownDeviceserrorCB, getKnownDevicessuccessCB, discoverSuccess, discoverError;
-
-t.step(function () {
-    getKnownDevicessuccessCB = t.step_func(function (devices) {
-        assert_type(devices, "array", "devices has wrong type");
-        assert_true(devices.length > 0, "bluetooth devices not found");
-        for (i=0; i < devices.length; i++) {
-            check_bluetooth_device(devices[i]);
-        }
-        t.done();
-    });
-
-    getKnownDeviceserrorCB = t.step_func(function (e) {
-        assert_unreached("getKnownDeviceserrorCB exception:" + e.message);
-    });
-
-    discoverSuccess = {
-        onstarted: t.step_func(function () {
-        }),
-        ondevicefound: t.step_func(function (device) {
-        }),
-        ondevicedisappeared: function (address) {
-        },
-        onfinished: t.step_func(function (devices) {
-            if (devices.length > 0){
-                adapter.getKnownDevices(getKnownDevicessuccessCB, getKnownDeviceserrorCB);
-            } else{
-                setTimeout(stopDiscoverySuccess, 1000);
-            }
-        })
-    };
-
-    discoverError = t.step_func(function (e) {
-        assert_unreached("discoverError exception:" + e.message);
-    });
-
-    stopDiscoverySuccess = t.step_func(function () {
-        adapter.discoverDevices(discoverSuccess, discoverError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothDeviceArraySuccessCallback_onsuccess</title>\r
+<meta charset="utf-8">\r
+<meta name="timeout" content="long"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothDeviceArraySuccessCallback_onsuccess\r
+//==== LABEL Check if BluetoothDeviceArraySuccessCallback callback is called and if its arguments have proper type\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 300\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDeviceArraySuccessCallback:onsuccess M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA CBOA CBT\r
+\r
+setup({timeout: 300000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 300000}), i,\r
+    stopDiscoverySuccess, getKnownDeviceserrorCB, getKnownDevicessuccessCB, discoverSuccess, discoverError;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        getKnownDevicessuccessCB = t.step_func(function (devices) {\r
+            assert_type(devices, "array", "devices has wrong type");\r
+            assert_true(devices.length > 0, "bluetooth devices not found");\r
+            for (i = 0; i < devices.length; i++) {\r
+                check_bluetooth_device(devices[i]);\r
+            }\r
+            t.done();\r
+        });\r
+\r
+        getKnownDeviceserrorCB = t.step_func(function (e) {\r
+            assert_unreached("getKnownDeviceserrorCB exception:" + e.message);\r
+        });\r
+\r
+        discoverSuccess = {\r
+            onstarted: t.step_func(function () {\r
+            }),\r
+            ondevicefound: t.step_func(function (device) {\r
+            }),\r
+            ondevicedisappeared: function (address) {\r
+            },\r
+            onfinished: t.step_func(function (devices) {\r
+                if (devices.length > 0) {\r
+                    adapter.getKnownDevices(getKnownDevicessuccessCB, getKnownDeviceserrorCB);\r
+                } else {\r
+                    setTimeout(stopDiscoverySuccess, 1000);\r
+                }\r
+            })\r
+        };\r
+\r
+        discoverError = t.step_func(function (e) {\r
+            assert_unreached("discoverError exception:" + e.message);\r
+        });\r
+\r
+        stopDiscoverySuccess = t.step_func(function () {\r
+            adapter.discoverDevices(discoverSuccess, discoverError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 8a1c48a6bf0f75b76b5f7fda5cc528c724604f9d..d59d802b1deab717c172c4fb0d949c4e95414315 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -38,7 +38,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CBNIO
 test(function () {
-    check_no_interface_object("BluetoothDeviceSuccessCallback");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_no_interface_object("BluetoothDeviceSuccessCallback");
+    }
 }, document.title);
 
 </script>
index 67abe2956eb9c859324fcdefe769e57b15e65bd9..732a5f0605b330c4f3d1f025e4f02abebf9b01a0 100755 (executable)
@@ -1,90 +1,94 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
-  may be used to endorse or promote products derived from this work without
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-        Lukasz Bardeli <l.bardeli@samsung.com>
-        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothDevice_connectToServiceByUUID</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothDevice_connectToServiceByUUID
-//==== LABEL Check using connectToServiceByUUID method which is in BluetoothDevice interface to open connection
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:connectToServiceByUUID M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.
-//==== TEST_CRITERIA MMINA MAST MR
-
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}), onSocketConnect,
-    onBondingSuccess, onBondingError, powerOnSuccess, retValue = null;
-t.step(function () {
-
-    add_result_callback(function() {
-        clearBonding(REMOTE_DEVICE_ADDRESS);
-    });
-
-    onSocketConnect = t.step_func(function (socket) {
-        if(socket.state === "OPEN"){
-            assert_equals(retValue, undefined, "connectToServiceByUUID returns wrong value");
-            t.done();
-        }else{
-            assert_unreached("Socket is closed");
-        }
-    });
-
-    onBondingSuccess = t.step_func(function (device) {
-        retValue = device.connectToServiceByUUID(CHAT_SERVICE_UUID, onSocketConnect);
-    });
-
-    onBondingError = t.step_func(function (e) {
-        assert_unreached("onBondingError exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+  this list of conditions and the following disclaimer in the documentation\r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+  may be used to endorse or promote products derived from this work without\r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothDevice_connectToServiceByUUID</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothDevice_connectToServiceByUUID\r
+//==== LABEL Check using connectToServiceByUUID method which is in BluetoothDevice interface to open connection\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:connectToServiceByUUID M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.\r
+//==== TEST_CRITERIA MMINA MAST MR\r
+\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), onSocketConnect,\r
+    onBondingSuccess, onBondingError, powerOnSuccess, retValue = null;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      add_result_callback(function () {\r
+            clearBonding(REMOTE_DEVICE_ADDRESS);\r
+        });\r
+\r
+        onSocketConnect = t.step_func(function (socket) {\r
+            if (socket.state === "OPEN") {\r
+                assert_equals(retValue, undefined, "connectToServiceByUUID returns wrong value");\r
+                t.done();\r
+            } else {\r
+                assert_unreached("Socket is closed");\r
+            }\r
+        });\r
+\r
+        onBondingSuccess = t.step_func(function (device) {\r
+            retValue = device.connectToServiceByUUID(CHAT_SERVICE_UUID, onSocketConnect);\r
+        });\r
+\r
+        onBondingError = t.step_func(function (e) {\r
+            assert_unreached("onBondingError exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 98af9bfaf0cb5b78fea9f6bcc4f3f99ac227e9d9..758a63214cb0fe02384450225a7de86d2f005ed6 100755 (executable)
@@ -1,89 +1,93 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
-  may be used to endorse or promote products derived from this work without
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothDevice_connectToServiceByUUID_onerror</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothDevice_connectToServiceByUUID_onerror
-//==== LABEL Check if error callback of connectToServiceByUUID method invoked
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:connectToServiceByUUID M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MERRCB
-
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}), onSocketConnect,
-    onBondingSuccess, onBondingError, powerOnSuccess, onSocketError;
-t.step(function () {
-
-    add_result_callback(function() {
-        clearBonding(REMOTE_DEVICE_ADDRESS);
-    });
-
-    onSocketConnect = t.step_func(function (socket) {
-        assert_unreached("Shouldn't be here");
-    });
-
-    onSocketError = t.step_func(function (e) {
-        assert_equals(e.name, "NotFoundError", "error name in onSocketError");
-        t.done();
-    });
-
-    onBondingSuccess = t.step_func(function (device) {
-        device.connectToServiceByUUID(TEST_WRONG_UUID, onSocketConnect, onSocketError);
-    });
-
-    onBondingError = t.step_func(function (e) {
-        assert_unreached("onBondingError exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+  this list of conditions and the following disclaimer in the documentation\r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+  may be used to endorse or promote products derived from this work without\r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothDevice_connectToServiceByUUID_onerror</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothDevice_connectToServiceByUUID_onerror\r
+//==== LABEL Check if error callback of connectToServiceByUUID method invoked\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:connectToServiceByUUID M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MERRCB\r
+\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), onSocketConnect,\r
+    onBondingSuccess, onBondingError, powerOnSuccess, onSocketError;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      add_result_callback(function () {\r
+            clearBonding(REMOTE_DEVICE_ADDRESS);\r
+        });\r
+\r
+        onSocketConnect = t.step_func(function (socket) {\r
+            assert_unreached("Shouldn't be here");\r
+        });\r
+\r
+        onSocketError = t.step_func(function (e) {\r
+            assert_equals(e.name, "NotFoundError", "error name in onSocketError");\r
+            t.done();\r
+        });\r
+\r
+        onBondingSuccess = t.step_func(function (device) {\r
+            device.connectToServiceByUUID(TEST_WRONG_UUID, onSocketConnect, onSocketError);\r
+        });\r
+\r
+        onBondingError = t.step_func(function (e) {\r
+            assert_unreached("onBondingError exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 2a16e1a0f76bb3c2c65e68abde41948f8330f757..8f85534c52f1d821c5b0d36a7d136406903afff0 100755 (executable)
@@ -1,82 +1,86 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothDevice_connectToServiceByUUID_with_errorCallback</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothDevice_connectToServiceByUUID_with_errorCallback
-//==== LABEL Check connectToServiceByUUID with errorCallback
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:connectToServiceByUUID M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.
-//==== TEST_CRITERIA MOA MAST
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
-    onSocketConnect, onSocketError, onBondingSuccess, onBondingError, powerOnSuccess;
-t.step(function () {
-
-    add_result_callback(function() {
-        clearBonding(REMOTE_DEVICE_ADDRESS);
-    });
-
-    onSocketConnect = t.step_func(function (socket) {
-        if(socket.state === "OPEN") {
-            t.done();
-        } else {
-            assert_unreached("Socket is closed");
-        }
-    });
-
-    onSocketError = t.step_func(function (e) {
-        assert_unreached("onSocketError exception:" + e.message);
-    });
-
-    onBondingSuccess = t.step_func(function (device) {
-        device.connectToServiceByUUID(CHAT_SERVICE_UUID, onSocketConnect, onSocketError);
-    });
-
-    onBondingError = t.step_func(function (e) {
-        assert_unreached("onBondingError exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothDevice_connectToServiceByUUID_with_errorCallback</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothDevice_connectToServiceByUUID_with_errorCallback\r
+//==== LABEL Check connectToServiceByUUID with errorCallback\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:connectToServiceByUUID M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.\r
+//==== TEST_CRITERIA MOA MAST\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+    onSocketConnect, onSocketError, onBondingSuccess, onBondingError, powerOnSuccess;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      add_result_callback(function () {\r
+            clearBonding(REMOTE_DEVICE_ADDRESS);\r
+        });\r
+\r
+        onSocketConnect = t.step_func(function (socket) {\r
+            if (socket.state === "OPEN") {\r
+                t.done();\r
+            } else {\r
+                assert_unreached("Socket is closed");\r
+            }\r
+        });\r
+\r
+        onSocketError = t.step_func(function (e) {\r
+            assert_unreached("onSocketError exception:" + e.message);\r
+        });\r
+\r
+        onBondingSuccess = t.step_func(function (device) {\r
+            device.connectToServiceByUUID(CHAT_SERVICE_UUID, onSocketConnect, onSocketError);\r
+        });\r
+\r
+        onBondingError = t.step_func(function (e) {\r
+            assert_unreached("onBondingError exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 322b01e26993244225004b03540f520ce1139d59..3942f96b9df03114622712d9d0e315f6fb6081f6 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -38,7 +38,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA NIO
 test(function () {
-    check_no_interface_object("BluetoothDevice");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_no_interface_object("BluetoothDevice");
+    }
 }, document.title);
 
 </script>
index 18572cbb5b88c32db1ec3bfe7aca555c1d86319b..51b5e127668cc6dffa5400bd7a7ed7bf3356c8bd 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -38,7 +38,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CBNIO
 test(function () {
-    check_no_interface_object("BluetoothDiscoverDevicesSuccessCallback");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_no_interface_object("BluetoothDiscoverDevicesSuccessCallback");
+    }
 }, document.title);
 
 </script>
index 39725015f94480fbfd8e8f0ce3843b6d72a39ebe..fde5c9cf5afa8d4b471f1d640320fb795aa8192a 100755 (executable)
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothDiscoverDevicesSuccessCallback_ondevicedisappeared</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothDiscoverDevicesSuccessCallback_ondevicedisappeared
-//==== LABEL Check if BluetoothDiscoverDevicesSuccessCallback callback is called and if its ondevicedisappeared arguments have proper type
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== STEP Disable the bluetooth of the remote device after pop-up is launched on test device.
-//==== EXPECT ondevicedisappeared callback is invoked.
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDiscoverDevicesSuccessCallback:ondevicedisappeared M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA CBT CBOA
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
-    stopDiscoverySuccess, discoverDevicesErrorCB, discoverDevicesSuccessOneCB, discoverDevicesSuccessTwoCB, flag = false;
-
-t.step(function () {
-
-    discoverDevicesErrorCB = t.step_func(function (e) {
-        assert_unreached("discoverDevicesErrorCB exception:" + e.message);
-    });
-
-    discoverDevicesSuccessTwoCB = {
-        onstarted: t.step_func(function () {
-        }),
-        ondevicefound: t.step_func(function (device) {
-        }),
-        ondevicedisappeared: t.step_func(function (address) {
-            assert_type(address, "string", "address has wrong type");
-            if(address === REMOTE_DEVICE_ADDRESS) {
-                flag = true;
-            }
-        }),
-        onfinished: t.step_func(function (devices) {
-            if(flag) {
-                t.done();
-            } else {
-                adapter.discoverDevices(discoverDevicesSuccessTwoCB, discoverDevicesErrorCB);
-            }
-        })
-    };
-
-    discoverDevicesSuccessOneCB = {
-        onstarted: t.step_func(function () {
-        }),
-        ondevicefound: t.step_func(function (device) {
-        }),
-        ondevicedisappeared: t.step_func(function (address) {
-        }),
-        onfinished: t.step_func(function (devices) {
-            if (devices.length > 0 ){
-                adapter.discoverDevices(discoverDevicesSuccessTwoCB, discoverDevicesErrorCB);
-                alert("Please disable bluetooth on other device");
-            } else {
-                setTimeout(stopDiscoverySuccess, 1000);
-            }
-        })
-    };
-
-    stopDiscoverySuccess = t.step_func(function () {
-        adapter.discoverDevices(discoverDevicesSuccessOneCB, discoverDevicesErrorCB);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothDiscoverDevicesSuccessCallback_ondevicedisappeared</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothDiscoverDevicesSuccessCallback_ondevicedisappeared\r
+//==== LABEL Check if BluetoothDiscoverDevicesSuccessCallback callback is called and if its ondevicedisappeared arguments have proper type\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== STEP Disable the bluetooth of the remote device after pop-up is launched on test device.\r
+//==== EXPECT ondevicedisappeared callback is invoked.\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDiscoverDevicesSuccessCallback:ondevicedisappeared M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA CBT CBOA\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+    stopDiscoverySuccess, discoverDevicesErrorCB, discoverDevicesSuccessOneCB, discoverDevicesSuccessTwoCB, flag = false;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      discoverDevicesErrorCB = t.step_func(function (e) {\r
+            assert_unreached("discoverDevicesErrorCB exception:" + e.message);\r
+        });\r
+\r
+        discoverDevicesSuccessTwoCB = {\r
+            onstarted: t.step_func(function () {\r
+            }),\r
+            ondevicefound: t.step_func(function (device) {\r
+            }),\r
+            ondevicedisappeared: t.step_func(function (address) {\r
+                assert_type(address, "string", "address has wrong type");\r
+                if (address === REMOTE_DEVICE_ADDRESS) {\r
+                    flag = true;\r
+                }\r
+            }),\r
+            onfinished: t.step_func(function (devices) {\r
+                if (flag) {\r
+                    t.done();\r
+                } else {\r
+                    adapter.discoverDevices(discoverDevicesSuccessTwoCB, discoverDevicesErrorCB);\r
+                }\r
+            })\r
+        };\r
+\r
+        discoverDevicesSuccessOneCB = {\r
+            onstarted: t.step_func(function () {\r
+            }),\r
+            ondevicefound: t.step_func(function (device) {\r
+            }),\r
+            ondevicedisappeared: t.step_func(function (address) {\r
+            }),\r
+            onfinished: t.step_func(function (devices) {\r
+                if (devices.length > 0) {\r
+                    adapter.discoverDevices(discoverDevicesSuccessTwoCB, discoverDevicesErrorCB);\r
+                    alert("Please disable bluetooth on other device");\r
+                } else {\r
+                    setTimeout(stopDiscoverySuccess, 1000);\r
+                }\r
+            })\r
+        };\r
+\r
+        stopDiscoverySuccess = t.step_func(function () {\r
+            adapter.discoverDevices(discoverDevicesSuccessOneCB, discoverDevicesErrorCB);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index bff34837dd9f531e11d86f6c9c69997ffd15ec20..c29a5c8044b3bd0c6760bc008d645d158adf6583 100755 (executable)
@@ -1,81 +1,87 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothDiscoverDevicesSuccessCallback_ondevicefound</title>
-<meta charset="utf-8">
-<meta name="timeout" content="long"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothDiscoverDevicesSuccessCallback_ondevicefound
-//==== LABEL Check if BluetoothDiscoverDevicesSuccessCallback callback is called and if its ondevicefound arguments have proper type
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 300
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDiscoverDevicesSuccessCallback:ondevicefound M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA CBT CBOA
-
-setup({timeout:300000, explicit_done:true});
-
-var adapter = null, t = async_test(document.title, {timeout: 300000}),
-    stopDiscoverySuccess, discoverDevicesErrorCB, discoverDevicesSuccessCB;
-
-t.step(function () {
-    discoverDevicesSuccessCB = {
-        onstarted: t.step_func(function () {
-        }),
-        ondevicefound: t.step_func(function (device) {
-            check_bluetooth_device(device);
-            t.done();
-        }),
-        ondevicedisappeared: t.step_func(function (address) {
-        }),
-        onfinished: t.step_func(function (devices) {
-            if (devices.length === 0){
-                setTimeout(stopDiscoverySuccess, 1000);
-            }
-        })
-    };
-
-    discoverDevicesErrorCB = t.step_func(function (e) {
-        assert_unreached("discoverDevicesErrorCB exception:" + e.message);
-    });
-
-    stopDiscoverySuccess = t.step_func(function () {
-        adapter.discoverDevices(discoverDevicesSuccessCB, discoverDevicesErrorCB);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setBluetoothDiscoveryCleanup(adapter);
-    stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothDiscoverDevicesSuccessCallback_ondevicefound</title>\r
+<meta charset="utf-8">\r
+<meta name="timeout" content="long"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothDiscoverDevicesSuccessCallback_ondevicefound\r
+//==== LABEL Check if BluetoothDiscoverDevicesSuccessCallback callback is called and if its ondevicefound arguments have proper type\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 300\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDiscoverDevicesSuccessCallback:ondevicefound M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA CBT CBOA\r
+\r
+setup({timeout:300000, explicit_done:true});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 300000}),\r
+    stopDiscoverySuccess, discoverDevicesErrorCB, discoverDevicesSuccessCB;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        discoverDevicesSuccessCB = {\r
+            onstarted: t.step_func(function () {\r
+            }),\r
+            ondevicefound: t.step_func(function (device) {\r
+                check_bluetooth_device(device);\r
+                t.done();\r
+            }),\r
+            ondevicedisappeared: t.step_func(function (address) {\r
+            }),\r
+            onfinished: t.step_func(function (devices) {\r
+                if (devices.length === 0) {\r
+                    setTimeout(stopDiscoverySuccess, 1000);\r
+                }\r
+            })\r
+        };\r
+\r
+        discoverDevicesErrorCB = t.step_func(function (e) {\r
+            assert_unreached("discoverDevicesErrorCB exception:" + e.message);\r
+        });\r
+\r
+        stopDiscoverySuccess = t.step_func(function () {\r
+            adapter.discoverDevices(discoverDevicesSuccessCB, discoverDevicesErrorCB);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setBluetoothDiscoveryCleanup(adapter);\r
+        stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index dbfd7564d6cfad4b1ad2263e9a5941fd83aa2e7c..0e8a23fed6d530cf033ee35e086a458c78439885 100755 (executable)
@@ -1,83 +1,89 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothDiscoverDevicesSuccessCallback_onfinished</title>
-<meta charset="utf-8">
-<meta name="timeout" content="long"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothDiscoverDevicesSuccessCallback_onfinished
-//==== LABEL Check if BluetoothDiscoverDevicesSuccessCallback callback is called and if its onfinished arguments have proper type
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 300
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDiscoverDevicesSuccessCallback:onfinished M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA CBT CBOA
-setup({timeout: 300000});
-
-var adapter = null, t = async_test(document.title, {timeout: 300000}),
-    stopDiscoverySuccess, discoverDevicesErrorCB, i, discoverDevicesSuccessCB;
-
-t.step(function () {
-    discoverDevicesSuccessCB = {
-        onstarted: t.step_func(function () {
-        }),
-        ondevicefound: t.step_func(function (device) {
-        }),
-        ondevicedisappeared: t.step_func(function (address) {
-        }),
-        onfinished: t.step_func(function (devices) {
-            if (devices.length > 0) {
-                check_bluetooth_device_array(devices);
-                for (i=0; i < devices.length; i++) {
-                    check_bluetooth_device(devices[i]);
-                }
-                t.done();
-            } else {
-                setTimeout(stopDiscoverySuccess, 1000);
-            }
-        })
-    };
-
-    discoverDevicesErrorCB = t.step_func(function (e) {
-        assert_unreached("discoverDevicesErrorCB exception:" + e.message);
-    });
-
-    stopDiscoverySuccess = t.step_func(function () {
-        adapter.discoverDevices(discoverDevicesSuccessCB, discoverDevicesErrorCB);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothDiscoverDevicesSuccessCallback_onfinished</title>\r
+<meta charset="utf-8">\r
+<meta name="timeout" content="long"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothDiscoverDevicesSuccessCallback_onfinished\r
+//==== LABEL Check if BluetoothDiscoverDevicesSuccessCallback callback is called and if its onfinished arguments have proper type\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 300\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDiscoverDevicesSuccessCallback:onfinished M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA CBT CBOA\r
+setup({timeout: 300000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 300000}),\r
+    stopDiscoverySuccess, discoverDevicesErrorCB, i, discoverDevicesSuccessCB;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        discoverDevicesSuccessCB = {\r
+            onstarted: t.step_func(function () {\r
+            }),\r
+            ondevicefound: t.step_func(function (device) {\r
+            }),\r
+            ondevicedisappeared: t.step_func(function (address) {\r
+            }),\r
+            onfinished: t.step_func(function (devices) {\r
+                if (devices.length > 0) {\r
+                    check_bluetooth_device_array(devices);\r
+                    for (i = 0; i < devices.length; i++) {\r
+                        check_bluetooth_device(devices[i]);\r
+                    }\r
+                    t.done();\r
+                } else {\r
+                    setTimeout(stopDiscoverySuccess, 1000);\r
+                }\r
+            })\r
+        };\r
+\r
+        discoverDevicesErrorCB = t.step_func(function (e) {\r
+            assert_unreached("discoverDevicesErrorCB exception:" + e.message);\r
+        });\r
+\r
+        stopDiscoverySuccess = t.step_func(function () {\r
+            adapter.discoverDevices(discoverDevicesSuccessCB, discoverDevicesErrorCB);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 46338053d422a270e902888710c6a497d55d5e94..8648a84e67ae996420691a20e48c153ca9c01725 100755 (executable)
@@ -1,79 +1,85 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothDiscoverDevicesSuccessCallback_onstarted</title>
-<meta charset="utf-8">
-<meta name="timeout" content="long"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothDiscoverDevicesSuccessCallback_onstarted
-//==== LABEL Check if BluetoothDiscoverDevicesSuccessCallback callback is called and if its onstarted arguments have proper type
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 300
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDiscoverDevicesSuccessCallback:onstarted M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA CBOA
-
-setup({timeout: 300000});
-
-var adapter = null, t = async_test(document.title, {timeout: 300000}), discoverDevicesSuccessCB,
-    stopDiscoverySuccess, discoverDevicesErrorCB, stopDiscoverySuccessCB;
-
-t.step(function () {
-    discoverDevicesSuccessCB = {
-        onstarted: t.step_func(function () {
-            adapter.stopDiscovery(stopDiscoverySuccessCB);
-        }),
-        ondevicefound: t.step_func(function () {
-        }),
-        ondevicedisappeared: t.step_func(function () {
-        }),
-        onfinished: t.step_func(function () {
-        })
-    };
-
-    stopDiscoverySuccessCB = t.step_func(function () {
-        t.done();
-    });
-
-    discoverDevicesErrorCB = t.step_func(function (e) {
-        assert_unreached("discoverDevicesErrorCB exception:" + e.message);
-    });
-
-    stopDiscoverySuccess = t.step_func(function () {
-        adapter.discoverDevices(discoverDevicesSuccessCB, discoverDevicesErrorCB);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothDiscoverDevicesSuccessCallback_onstarted</title>\r
+<meta charset="utf-8">\r
+<meta name="timeout" content="long"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothDiscoverDevicesSuccessCallback_onstarted\r
+//==== LABEL Check if BluetoothDiscoverDevicesSuccessCallback callback is called and if its onstarted arguments have proper type\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 300\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDiscoverDevicesSuccessCallback:onstarted M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA CBOA\r
+\r
+setup({timeout: 300000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 300000}), discoverDevicesSuccessCB,\r
+    stopDiscoverySuccess, discoverDevicesErrorCB, stopDiscoverySuccessCB;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        discoverDevicesSuccessCB = {\r
+            onstarted: t.step_func(function () {\r
+                adapter.stopDiscovery(stopDiscoverySuccessCB);\r
+            }),\r
+            ondevicefound: t.step_func(function () {\r
+            }),\r
+            ondevicedisappeared: t.step_func(function () {\r
+            }),\r
+            onfinished: t.step_func(function () {\r
+            })\r
+        };\r
+\r
+        stopDiscoverySuccessCB = t.step_func(function () {\r
+            t.done();\r
+        });\r
+\r
+        discoverDevicesErrorCB = t.step_func(function (e) {\r
+            assert_unreached("discoverDevicesErrorCB exception:" + e.message);\r
+        });\r
+\r
+        stopDiscoverySuccess = t.step_func(function () {\r
+            adapter.discoverDevices(discoverDevicesSuccessCB, discoverDevicesErrorCB);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index a63585bc5b737138fa55a0ef4279480716744eb2..5e85a14e596f1f9fdaa88d268c283c5ed5020be9 100755 (executable)
@@ -1,90 +1,90 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_addValueChangeListener</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_addValueChangeListener
-//==== LABEL Check if BluetoothGATTCharacteristic::addValueChangeListener method works properly
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:addValueChangeListener M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MR MAST
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
-        onconnected, onerror, service, characteristic, device, ReadValueSuccessCallback, watchID;
-
-t.step(function () {
-    ReadValueSuccessCallback = t.step_func(function (value) {
-        assert_type(watchID, "long", "addValueChangeListener should return type long");
-        characteristic.removeValueChangeListener(watchID);
-        device.disconnect();
-        t.done();
-    });
-
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        if (service.characteristics.length > 0) {
-            characteristic = service.characteristics[0];
-            watchID = characteristic.addValueChangeListener(ReadValueSuccessCallback);
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = {
-        onstarted: t.step_func(function () {
-        }),
-        ondevicefound: t.step_func(function (bledevice) {
-            if(bledevice.address == REMOTE_BLE_DEVICE_ADDRESS){
-                device = bledevice;
-                adapter.stopScan();
-                device.connect(onconnected, onerror);
-            }
-        }),
-        onfinished: t.step_func(function (devices) {
-        })
-    };
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_addValueChangeListener</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_addValueChangeListener\r
+//==== LABEL Check if BluetoothGATTCharacteristic::addValueChangeListener method works properly\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:addValueChangeListener M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MR MAST\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+        onconnected, onerror, service, characteristic, device, ReadValueSuccessCallback, watchID;\r
+\r
+t.step(function () {\r
+    ReadValueSuccessCallback = t.step_func(function (value) {\r
+        assert_type(watchID, "long", "addValueChangeListener should return type long");\r
+        characteristic.removeValueChangeListener(watchID);\r
+        device.disconnect();\r
+        t.done();\r
+    });\r
+\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        if (service.characteristics.length > 0) {\r
+            characteristic = service.characteristics[0];\r
+            watchID = characteristic.addValueChangeListener(ReadValueSuccessCallback);\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = {\r
+        onstarted: t.step_func(function () {\r
+        }),\r
+        ondevicefound: t.step_func(function (bledevice) {\r
+            if(bledevice.address == REMOTE_BLE_DEVICE_ADDRESS){\r
+                device = bledevice;\r
+                adapter.stopScan();\r
+                device.connect(onconnected, onerror);\r
+            }\r
+        }),\r
+        onfinished: t.step_func(function (devices) {\r
+        })\r
+    };\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index ac0d32aa453f6b267576f456e01ef72d73b3a35c..c70d335329e97f64808d0004578652cc710933a1 100755 (executable)
@@ -1,83 +1,83 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_addValueChangeListener_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_addValueChangeListener_exist
-//==== LABEL Check if BluetoothGATTCharacteristic::addValueChangeListener method exists
-//==== PRIORITY P0
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:addValueChangeListener M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA ME
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback, onconnected, onerror,
-        service, characteristic, device = null, flag = false;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        if (service.characteristics.length > 0) {
-            characteristic = service.characteristics[0];
-            check_method_exists(characteristic, "addValueChangeListener");
-            device.disconnect();
-            t.done();
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_addValueChangeListener_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_addValueChangeListener_exist\r
+//==== LABEL Check if BluetoothGATTCharacteristic::addValueChangeListener method exists\r
+//==== PRIORITY P0\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:addValueChangeListener M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA ME\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback, onconnected, onerror,\r
+        service, characteristic, device = null, flag = false;\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        if (service.characteristics.length > 0) {\r
+            characteristic = service.characteristics[0];\r
+            check_method_exists(characteristic, "addValueChangeListener");\r
+            device.disconnect();\r
+            t.done();\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index d6ec1661006b37e4f76668ee48085f5f8475868a..51251217ef760dbc4fb90115ceb17e5b0acb223e 100755 (executable)
@@ -1,87 +1,87 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_descriptors_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_descriptors_attribute
-//==== LABEL Check if BluetoothGATTCharacteristic::descriptors attribute exists, has type array and is readonly
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:descriptors A
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
-        service, characteristic, onconnected, onerror, device = null, flag = false, origin;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        if (service.characteristics.length > 0) {
-            characteristic = service.characteristics[0];
-            assert_true("descriptors" in characteristic, "Name descriptors doesn't exist in provided object.");
-            assert_type(characteristic.descriptors, "array", "Type of descriptors is different.");
-            origin = characteristic.descriptors[0];
-            characteristic.descriptors[0] = "invalidValue";
-            assert_equals(characteristic.descriptors[0], origin, "descriptor is readonly, but its writable.");
-            device.disconnect();
-            t.done();
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_descriptors_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_descriptors_attribute\r
+//==== LABEL Check if BluetoothGATTCharacteristic::descriptors attribute exists, has type array and is readonly\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:descriptors A\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+        service, characteristic, onconnected, onerror, device = null, flag = false, origin;\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        if (service.characteristics.length > 0) {\r
+            characteristic = service.characteristics[0];\r
+            assert_true("descriptors" in characteristic, "Name descriptors doesn't exist in provided object.");\r
+            assert_type(characteristic.descriptors, "array", "Type of descriptors is different.");\r
+            origin = characteristic.descriptors[0];\r
+            characteristic.descriptors[0] = "invalidValue";\r
+            assert_equals(characteristic.descriptors[0], origin, "descriptor is readonly, but its writable.");\r
+            device.disconnect();\r
+            t.done();\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 84c0f7106ad72feb02c5dd94327bfedc15c931a2..aa3d90aa3e630d81af31c6f993ea634833c0ba00 100755 (executable)
@@ -1,83 +1,83 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_extend</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_extend
-//==== LABEL Check if BluetoothGATTCharacteristic is extendable
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:BluetoothGATTCharacteristic U
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA OBX
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
-        onconnected, onerror, service, characteristic, device = null, flag = false;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        if (service.characteristics.length > 0) {
-            characteristic = service.characteristics[0];
-            check_extensibility(characteristic);
-            device.disconnect();
-            t.done();
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_extend</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_extend\r
+//==== LABEL Check if BluetoothGATTCharacteristic is extendable\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:BluetoothGATTCharacteristic U\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA OBX\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+        onconnected, onerror, service, characteristic, device = null, flag = false;\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        if (service.characteristics.length > 0) {\r
+            characteristic = service.characteristics[0];\r
+            check_extensibility(characteristic);\r
+            device.disconnect();\r
+            t.done();\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 47666459d91cddac7eefe547bcdcf5e2afb3d836..41f71d882d6253b63795e6cfcd3f106f78e5dda0 100755 (executable)
@@ -1,83 +1,83 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_hasExtendedProperties_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_hasExtendedProperties_attribute
-//==== LABEL Check if BluetoothGATTCharacteristic::hasExtendedProperties attribute exists, has type boolean and is readonly
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:hasExtendedProperties A
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
-        service, characteristic, onconnected, onerror, device = null, flag = false;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        if (service.characteristics.length > 0) {
-            characteristic = service.characteristics[0];
-            check_readonly(characteristic, "hasExtendedProperties", characteristic.hasExtendedProperties, "boolean", !(characteristic.hasExtendedProperties));
-            device.disconnect();
-            t.done();
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_hasExtendedProperties_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_hasExtendedProperties_attribute\r
+//==== LABEL Check if BluetoothGATTCharacteristic::hasExtendedProperties attribute exists, has type boolean and is readonly\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:hasExtendedProperties A\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+        service, characteristic, onconnected, onerror, device = null, flag = false;\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        if (service.characteristics.length > 0) {\r
+            characteristic = service.characteristics[0];\r
+            check_readonly(characteristic, "hasExtendedProperties", characteristic.hasExtendedProperties, "boolean", !(characteristic.hasExtendedProperties));\r
+            device.disconnect();\r
+            t.done();\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 1f94f7fa4e59ab48989fd1a444279e1d2f240eec..e8dcceb3b0e61486c2fa2e6004bf8ab3c0fafecf 100755 (executable)
@@ -1,83 +1,83 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_isBroadcast_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_isBroadcast_attribute
-//==== LABEL Check if BluetoothGATTCharacteristic::isBroadcast attribute exists, has type boolean and is readonly
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isBroadcast A
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
-        service, characteristic, onconnected, onerror, device = null, flag = false;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        if (service.characteristics.length > 0) {
-            characteristic = service.characteristics[0];
-            check_readonly(characteristic, "isBroadcast", characteristic.isBroadcast, "boolean", !(characteristic.isBroadcast));
-            device.disconnect();
-            t.done();
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_isBroadcast_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_isBroadcast_attribute\r
+//==== LABEL Check if BluetoothGATTCharacteristic::isBroadcast attribute exists, has type boolean and is readonly\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isBroadcast A\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+        service, characteristic, onconnected, onerror, device = null, flag = false;\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        if (service.characteristics.length > 0) {\r
+            characteristic = service.characteristics[0];\r
+            check_readonly(characteristic, "isBroadcast", characteristic.isBroadcast, "boolean", !(characteristic.isBroadcast));\r
+            device.disconnect();\r
+            t.done();\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index d5afb56bdd178fef77cc7e511cfe0995a459f110..5e7875c2a42c421deb3f79de03a4840c97d488b3 100755 (executable)
@@ -1,83 +1,83 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_isIndication_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_isIndication_attribute
-//==== LABEL Check if BluetoothGATTCharacteristic::isIndication attribute exists, has type boolean and is readonly
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isIndication A
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
-        service, characteristic, onconnected, onerror, flag = false, device = null;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        if (service.characteristics.length > 0) {
-            characteristic = service.characteristics[0];
-            check_readonly(characteristic, "isIndication", characteristic.isIndication, "boolean", !(characteristic.isIndication));
-            device.disconnect();
-            t.done();
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_isIndication_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_isIndication_attribute\r
+//==== LABEL Check if BluetoothGATTCharacteristic::isIndication attribute exists, has type boolean and is readonly\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isIndication A\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+        service, characteristic, onconnected, onerror, flag = false, device = null;\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        if (service.characteristics.length > 0) {\r
+            characteristic = service.characteristics[0];\r
+            check_readonly(characteristic, "isIndication", characteristic.isIndication, "boolean", !(characteristic.isIndication));\r
+            device.disconnect();\r
+            t.done();\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 53db7ec8e5f958fa87191b1f6c780cb94498791f..3c229d5b6f19b171970f85f8034e22620c5dd84d 100755 (executable)
@@ -1,83 +1,83 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_isNotify_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_isNotify_attribute
-//==== LABEL Check if BluetoothGATTCharacteristic::isNotify attribute exists, has type boolean and is readonly
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isNotify A
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
-        service, characteristic, onconnected, onerror, device = null, flag = false;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        if (service.characteristics.length > 0) {
-            characteristic = service.characteristics[0];
-            check_readonly(characteristic, "isNotify", characteristic.isNotify, "boolean", !(characteristic.isNotify));
-            device.disconnect();
-            t.done();
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_isNotify_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_isNotify_attribute\r
+//==== LABEL Check if BluetoothGATTCharacteristic::isNotify attribute exists, has type boolean and is readonly\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isNotify A\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+        service, characteristic, onconnected, onerror, device = null, flag = false;\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        if (service.characteristics.length > 0) {\r
+            characteristic = service.characteristics[0];\r
+            check_readonly(characteristic, "isNotify", characteristic.isNotify, "boolean", !(characteristic.isNotify));\r
+            device.disconnect();\r
+            t.done();\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 69cf25c7d719fc89397b3f4cf1c512ac23255ac5..4cb560be2db35ae19998446cf86c2ffa98be6c84 100755 (executable)
@@ -1,83 +1,83 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_isReadable_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_isReadable_attribute
-//==== LABEL Check if BluetoothGATTCharacteristic::isReadable attribute exists, has type boolean and is readonly
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isReadable A
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
-        service, characteristic, onconnected, onerror, device = null, flag = false;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        if (service.characteristics.length > 0) {
-            characteristic = service.characteristics[0];
-            check_readonly(characteristic, "isReadable", characteristic.isReadable, "boolean", !(characteristic.isReadable));
-            device.disconnect();
-            t.done();
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_isReadable_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_isReadable_attribute\r
+//==== LABEL Check if BluetoothGATTCharacteristic::isReadable attribute exists, has type boolean and is readonly\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isReadable A\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+        service, characteristic, onconnected, onerror, device = null, flag = false;\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        if (service.characteristics.length > 0) {\r
+            characteristic = service.characteristics[0];\r
+            check_readonly(characteristic, "isReadable", characteristic.isReadable, "boolean", !(characteristic.isReadable));\r
+            device.disconnect();\r
+            t.done();\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index dfb7566b68865f1414e3a715c7ec12e2429c9374..d397995657c1cccd03fd827d8dbcf0dfb65430ee 100755 (executable)
@@ -1,83 +1,83 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_isSignedWrite_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_isSignedWrite_attribute
-//==== LABEL Check if BluetoothGATTCharacteristic::isSignedWrite attribute exists, has type boolean and is readonly
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isSignedWrite A
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
-        service, characteristic, onconnected, onerror, device = null, flag = false;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        if (service.characteristics.length > 0) {
-            characteristic = service.characteristics[0];
-            check_readonly(characteristic, "isSignedWrite", characteristic.isSignedWrite, "boolean", !(characteristic.isSignedWrite));
-            device.disconnect();
-            t.done();
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_isSignedWrite_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_isSignedWrite_attribute\r
+//==== LABEL Check if BluetoothGATTCharacteristic::isSignedWrite attribute exists, has type boolean and is readonly\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isSignedWrite A\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+        service, characteristic, onconnected, onerror, device = null, flag = false;\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        if (service.characteristics.length > 0) {\r
+            characteristic = service.characteristics[0];\r
+            check_readonly(characteristic, "isSignedWrite", characteristic.isSignedWrite, "boolean", !(characteristic.isSignedWrite));\r
+            device.disconnect();\r
+            t.done();\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 2c247a669e4516d4cf81cc5dfafb584df6e24d80..5a7ceb81bfcac96479d573c69b0f15b1695ea73b 100755 (executable)
@@ -1,83 +1,83 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_isWritable_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_isWritable_attribute
-//==== LABEL Check if BluetoothGATTCharacteristic::isWritable attribute exists, has type boolean and is readonly
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isWritable A
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
-        service, characteristic, onconnected, onerror, device = null, flag = false;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        if (service.characteristics.length > 0) {
-            characteristic = service.characteristics[0];
-            check_readonly(characteristic, "isWritable", characteristic.isWritable, "boolean", !(characteristic.isWritable));
-            device.disconnect();
-            t.done();
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_isWritable_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_isWritable_attribute\r
+//==== LABEL Check if BluetoothGATTCharacteristic::isWritable attribute exists, has type boolean and is readonly\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isWritable A\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+        service, characteristic, onconnected, onerror, device = null, flag = false;\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        if (service.characteristics.length > 0) {\r
+            characteristic = service.characteristics[0];\r
+            check_readonly(characteristic, "isWritable", characteristic.isWritable, "boolean", !(characteristic.isWritable));\r
+            device.disconnect();\r
+            t.done();\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 94d614ef220f2e9f57904b8222b006c563589b60..6325201fe26c1237efe1b445edb32dedef397c96 100755 (executable)
@@ -1,83 +1,83 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_isWriteNoResponset_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_isWriteNoResponse_attribute
-//==== LABEL Check if BluetoothGATTCharacteristic::isWriteNoResponse attribute exists, has type boolean and is readonly
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isWriteNoResponse A
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
-        service, characteristic, onconnected, onerror, device = null, flag = false;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        if (service.characteristics.length > 0) {
-            characteristic = service.characteristics[0];
-            check_readonly(characteristic, "isWriteNoResponse", characteristic.isWriteNoResponse, "boolean", !(characteristic.isWriteNoResponse));
-            device.disconnect();
-            t.done();
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_isWriteNoResponset_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_isWriteNoResponse_attribute\r
+//==== LABEL Check if BluetoothGATTCharacteristic::isWriteNoResponse attribute exists, has type boolean and is readonly\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isWriteNoResponse A\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+        service, characteristic, onconnected, onerror, device = null, flag = false;\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        if (service.characteristics.length > 0) {\r
+            characteristic = service.characteristics[0];\r
+            check_readonly(characteristic, "isWriteNoResponse", characteristic.isWriteNoResponse, "boolean", !(characteristic.isWriteNoResponse));\r
+            device.disconnect();\r
+            t.done();\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 254e23052070463112960f796e0997faad9003c2..a4e5b0f72701017afb580af029716eaf4b6fb05c 100755 (executable)
@@ -1,44 +1,44 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_notexist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_notexist
-//==== LABEL Check if is possible to call BluetoothGATTCharacteristic in new expresion
-//==== PRIORITY P3
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:BluetoothGATTCharacteristic U
-//==== SPEC_URL TBD
-//==== TEST_CRITERIA NIO
-
-test(function () {
-    check_no_interface_object("BluetoothGATTCharacteristic");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_notexist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_notexist\r
+//==== LABEL Check if is possible to call BluetoothGATTCharacteristic in new expresion\r
+//==== PRIORITY P3\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:BluetoothGATTCharacteristic U\r
+//==== SPEC_URL TBD\r
+//==== TEST_CRITERIA NIO\r
+\r
+test(function () {\r
+    check_no_interface_object("BluetoothGATTCharacteristic");\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 1c0903effa088b16ee695ffbaa3859d9120a860c..bb8c2a3f56acd5c64b3fa4240198aafa748593c5 100755 (executable)
@@ -1,91 +1,91 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_readValue</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_readValue
-//==== LABEL Check if BluetoothGATTCharacteristic::readValue method works properly without optional argument
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MMINA MR
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback, i,
-        onconnected, onerror, service, characteristic, device = null, ReadValueSuccessCallback, retVal, flag = false;
-
-t.step(function () {
-    ReadValueSuccessCallback = t.step_func(function (value) {
-        assert_equals(retVal, undefined, "readValue should return undefined");
-        device.disconnect();
-        t.done();
-    });
-
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        var descFlag = false;
-        for (i = 0; i < service.characteristics.length; i++) {
-            characteristic = service.characteristics[i];
-            if (descFlag == false && characteristic != undefined && characteristic.isReadable == true) {
-               retVal = characteristic.readValue(ReadValueSuccessCallback);
-               descFlag = true;
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_readValue</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_readValue\r
+//==== LABEL Check if BluetoothGATTCharacteristic::readValue method works properly without optional argument\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MMINA MR\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback, i,\r
+        onconnected, onerror, service, characteristic, device = null, ReadValueSuccessCallback, retVal, flag = false;\r
+\r
+t.step(function () {\r
+    ReadValueSuccessCallback = t.step_func(function (value) {\r
+        assert_equals(retVal, undefined, "readValue should return undefined");\r
+        device.disconnect();\r
+        t.done();\r
+    });\r
+\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        var descFlag = false;\r
+        for (i = 0; i < service.characteristics.length; i++) {\r
+            characteristic = service.characteristics[i];\r
+            if (descFlag == false && characteristic != undefined && characteristic.isReadable == true) {\r
+               retVal = characteristic.readValue(ReadValueSuccessCallback);\r
+               descFlag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index d88eb3db522f0e4aaabf99b8112d07fa04ebc0b7..2bd0ff294cf35379d6a3bdd10c2b7cd5fb063302 100755 (executable)
@@ -1,81 +1,81 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_readValue_InvalidStateError</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_readValue_InvalidStateError
-//==== LABEL Check if BluetoothGATTCharacteristic::readValue method called when device is not connected throws an exception
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MC
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
-        service, characteristic, ReadValueSuccessCallback;
-
-t.step(function () {
-    ReadValueSuccessCallback = t.step_func(function (value) {
-        assert_unreached("Method readValue shouldn't end successfully.");
-    });
-
-    bleScanSuccessCallback = {
-        onstarted: t.step_func(function () {
-        }),
-        ondevicefound: t.step_func(function (device) {
-            if(device.address == REMOTE_BLE_DEVICE_ADDRESS){
-                adapter.stopScan();
-                service = device.getService(device.uuids[0]);
-                if (service.characteristics.length > 0) {
-                    characteristic = service.characteristics[0];
-                    assert_throws(INVALID_STATE_ERR, function () {
-                        characteristic.readValue(ReadValueSuccessCallback);
-                        }, INVALID_STATE_ERR + " should be thrown - if device is not connected.");
-                    t.done();
-                }
-            }
-        }),
-        onfinished: t.step_func(function (devices) {
-        })
-    };
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_readValue_InvalidStateError</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_readValue_InvalidStateError\r
+//==== LABEL Check if BluetoothGATTCharacteristic::readValue method called when device is not connected throws an exception\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+        service, characteristic, ReadValueSuccessCallback;\r
+\r
+t.step(function () {\r
+    ReadValueSuccessCallback = t.step_func(function (value) {\r
+        assert_unreached("Method readValue shouldn't end successfully.");\r
+    });\r
+\r
+    bleScanSuccessCallback = {\r
+        onstarted: t.step_func(function () {\r
+        }),\r
+        ondevicefound: t.step_func(function (device) {\r
+            if(device.address == REMOTE_BLE_DEVICE_ADDRESS){\r
+                adapter.stopScan();\r
+                service = device.getService(device.uuids[0]);\r
+                if (service.characteristics.length > 0) {\r
+                    characteristic = service.characteristics[0];\r
+                    assert_throws(INVALID_STATE_ERR, function () {\r
+                        characteristic.readValue(ReadValueSuccessCallback);\r
+                        }, INVALID_STATE_ERR + " should be thrown - if device is not connected.");\r
+                    t.done();\r
+                }\r
+            }\r
+        }),\r
+        onfinished: t.step_func(function (devices) {\r
+        })\r
+    };\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 8db845a9b19eeaa34fb031c6fd4144ec1c9a68ad..6698130c2bfa0b935102ce72b0caeedba6c6a2a2 100755 (executable)
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_readValue_errorCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_readValue_errorCallback_TypeMismatch
-//==== LABEL Check if BluetoothGATTCharacteristic::readValue method called with invalid errorCallback argument throws an exception
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MC
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback, flag = false, j,
-    onconnected, onerror, service, characteristic, device = null, conversionTable, i, exceptionName, ReadValueSuccessCallback, errorCallback;
-
-t.step(function () {
-    ReadValueSuccessCallback = t.step_func(function (value) {
-        assert_unreached("Method readValue shouldn't end successfully. Given incorrect errorCallback.");
-    });
-
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        if (service.characteristics.length > 0) {
-            for(j = 0; j < service.characteristics.length; j++) {
-                if(service.characteristics[j].isReadable == true) {
-                    characteristic = service.characteristics[j];
-                    conversionTable = getTypeConversionExceptions("functionObject", true);
-                    for (i = 0; i < conversionTable.length; i++) {
-                        errorCallback = conversionTable[i][0];
-                        exceptionName = conversionTable[i][1];
-
-                        assert_throws({name: exceptionName},
-                            function () {
-                            characteristic.readValue(ReadValueSuccessCallback, errorCallback);
-                            }, "Given incorrect errorCallback.");
-                    }
-                    device.disconnect();
-                    t.done();
-                }
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_readValue_errorCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_readValue_errorCallback_TypeMismatch\r
+//==== LABEL Check if BluetoothGATTCharacteristic::readValue method called with invalid errorCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback, flag = false, j,\r
+    onconnected, onerror, service, characteristic, device = null, conversionTable, i, exceptionName, ReadValueSuccessCallback, errorCallback;\r
+\r
+t.step(function () {\r
+    ReadValueSuccessCallback = t.step_func(function (value) {\r
+        assert_unreached("Method readValue shouldn't end successfully. Given incorrect errorCallback.");\r
+    });\r
+\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        if (service.characteristics.length > 0) {\r
+            for(j = 0; j < service.characteristics.length; j++) {\r
+                if(service.characteristics[j].isReadable == true) {\r
+                    characteristic = service.characteristics[j];\r
+                    conversionTable = getTypeConversionExceptions("functionObject", true);\r
+                    for (i = 0; i < conversionTable.length; i++) {\r
+                        errorCallback = conversionTable[i][0];\r
+                        exceptionName = conversionTable[i][1];\r
+\r
+                        assert_throws({name: exceptionName},\r
+                            function () {\r
+                            characteristic.readValue(ReadValueSuccessCallback, errorCallback);\r
+                            }, "Given incorrect errorCallback.");\r
+                    }\r
+                    device.disconnect();\r
+                    t.done();\r
+                }\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 9eaa6f06d94baabaefc631538aa267deeba35974..1af7bc7134102a49a63e2625a17982fff23eebc8 100755 (executable)
@@ -1,99 +1,99 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_readValue_errorCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_readValue_errorCallback_invalid_cb
-//==== LABEL Check if BluetoothGATTCharacteristic::readValue method throws exception when invalid error callback is given
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback, flag = false, i,
-        onconnected, onerror, service, characteristic, device = null, ReadValueSuccessCallback, invaliderrorCallback;
-
-t.step(function () {
-    ReadValueSuccessCallback = t.step_func(function (value) {
-        assert_unreached("Method readValue shouldn't end successfully.");
-    });
-
-    invaliderrorCallback = {
-        onerror: t.step_func(function (error) {
-            assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
-        })
-    };
-
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        if (service.characteristics.length > 0) {
-            for(i = 0; i < service.characteristics.length; i++) {
-                if(service.characteristics[i].isReadable == true) {
-                    characteristic = service.characteristics[i];
-                    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
-                        characteristic.readValue(ReadValueSuccessCallback, invaliderrorCallback);
-                    }, "TypeMismatchError" + " should be thrown - given invalid error callback.");
-                    device.disconnect();
-                    t.done();
-                }
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_readValue_errorCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_readValue_errorCallback_invalid_cb\r
+//==== LABEL Check if BluetoothGATTCharacteristic::readValue method throws exception when invalid error callback is given\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback, flag = false, i,\r
+        onconnected, onerror, service, characteristic, device = null, ReadValueSuccessCallback, invaliderrorCallback;\r
+\r
+t.step(function () {\r
+    ReadValueSuccessCallback = t.step_func(function (value) {\r
+        assert_unreached("Method readValue shouldn't end successfully.");\r
+    });\r
+\r
+    invaliderrorCallback = {\r
+        onerror: t.step_func(function (error) {\r
+            assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);\r
+        })\r
+    };\r
+\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        if (service.characteristics.length > 0) {\r
+            for(i = 0; i < service.characteristics.length; i++) {\r
+                if(service.characteristics[i].isReadable == true) {\r
+                    characteristic = service.characteristics[i];\r
+                    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+                        characteristic.readValue(ReadValueSuccessCallback, invaliderrorCallback);\r
+                    }, "TypeMismatchError" + " should be thrown - given invalid error callback.");\r
+                    device.disconnect();\r
+                    t.done();\r
+                }\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index b181c56513d1fbf7538af394390c6c9897e5fafd..4b60d87284adc28ba6839b9a7a72fb55da4e0f6c 100755 (executable)
@@ -1,87 +1,87 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_readValue_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_readValue_exist
-//==== LABEL Check if BluetoothGATTCharacteristic::readValue method exists
-//==== PRIORITY P0
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA ME
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
-        service, characteristic, onconnected, onerror, device = null, flag = false, i;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        if (service.characteristics.length > 0) {
-            for(i = 0; i < service.characteristics.length; i++) {
-                if(service.characteristics[i].isReadable == true) {
-                    characteristic = service.characteristics[i];
-                    check_method_exists(characteristic, "readValue");
-                    device.disconnect();
-                    t.done();
-                }
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_readValue_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_readValue_exist\r
+//==== LABEL Check if BluetoothGATTCharacteristic::readValue method exists\r
+//==== PRIORITY P0\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA ME\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+        service, characteristic, onconnected, onerror, device = null, flag = false, i;\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        if (service.characteristics.length > 0) {\r
+            for(i = 0; i < service.characteristics.length; i++) {\r
+                if(service.characteristics[i].isReadable == true) {\r
+                    characteristic = service.characteristics[i];\r
+                    check_method_exists(characteristic, "readValue");\r
+                    device.disconnect();\r
+                    t.done();\r
+                }\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index f62e0076f037306443f76e76cc5f4d9a6062c9df..14cda0aae2e96d7e50321d0418619ed12f7fd0ef 100755 (executable)
@@ -1,89 +1,89 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_readValue_noarg</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_readValue_noarg
-//==== LABEL Check if BluetoothGATTCharacteristic::readValue method called without argument throws an exception
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MMA
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
-        onconnected, onerror, service, characteristic, device = null, flag = false, i;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        if (service.characteristics.length > 0) {
-            for(i = 0; i < service.characteristics.length; i++) {
-                if(service.characteristics[i].isReadable == true) {
-                    characteristic = service.characteristics[i];
-                    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
-                        characteristic.readValue();
-                    }, "TypeMismatchError" + " should be thrown - given no parameter.");
-                    device.disconnect();
-                    t.done();
-                }
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_readValue_noarg</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_readValue_noarg\r
+//==== LABEL Check if BluetoothGATTCharacteristic::readValue method called without argument throws an exception\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MMA\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+        onconnected, onerror, service, characteristic, device = null, flag = false, i;\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        if (service.characteristics.length > 0) {\r
+            for(i = 0; i < service.characteristics.length; i++) {\r
+                if(service.characteristics[i].isReadable == true) {\r
+                    characteristic = service.characteristics[i];\r
+                    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+                        characteristic.readValue();\r
+                    }, "TypeMismatchError" + " should be thrown - given no parameter.");\r
+                    device.disconnect();\r
+                    t.done();\r
+                }\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index c2b3049c2ffdf4c5841699d551f4e7a0d2ac0b6a..93360125410e0e93e6e987fd4e6df682a77cb3a8 100755 (executable)
@@ -1,96 +1,96 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_readValue_successCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_readValue_successCallback_TypeMismatch
-//==== LABEL Check if BluetoothGATTCharacteristic::readValue method called with invalid successCallback argument throws an exception
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MC
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback, flag = false,
-        onconnected, onerror, service, characteristic, device = null, conversionTable, i, j, exceptionName, successCallback;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        if (service.characteristics.length > 0) {
-            for(j = 0; j < service.characteristics.length; j++) {
-                if(service.characteristics[j].isReadable == true) {
-                    characteristic = service.characteristics[j];
-                    conversionTable = getTypeConversionExceptions("functionObject", false);
-                    for (i = 0; i < conversionTable.length; i++) {
-                        successCallback = conversionTable[i][0];
-                        exceptionName = conversionTable[i][1];
-
-                        assert_throws({name: exceptionName},
-                            function () {
-                                characteristic.readValue(successCallback);
-                            }, "Given incorrect successCallback.");
-                    }
-                    device.disconnect();
-                    t.done();
-                }
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_readValue_successCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_readValue_successCallback_TypeMismatch\r
+//==== LABEL Check if BluetoothGATTCharacteristic::readValue method called with invalid successCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback, flag = false,\r
+        onconnected, onerror, service, characteristic, device = null, conversionTable, i, j, exceptionName, successCallback;\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        if (service.characteristics.length > 0) {\r
+            for(j = 0; j < service.characteristics.length; j++) {\r
+                if(service.characteristics[j].isReadable == true) {\r
+                    characteristic = service.characteristics[j];\r
+                    conversionTable = getTypeConversionExceptions("functionObject", false);\r
+                    for (i = 0; i < conversionTable.length; i++) {\r
+                        successCallback = conversionTable[i][0];\r
+                        exceptionName = conversionTable[i][1];\r
+\r
+                        assert_throws({name: exceptionName},\r
+                            function () {\r
+                                characteristic.readValue(successCallback);\r
+                            }, "Given incorrect successCallback.");\r
+                    }\r
+                    device.disconnect();\r
+                    t.done();\r
+                }\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 3c5315bdd73c59d1b936b1ef6a8db904dbcad010..78c36bbfcba26413903d581ec686e53c6d480577 100755 (executable)
@@ -1,95 +1,95 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_readValue_successCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_readValue_successCallback_invalid_cb
-//==== LABEL Check if BluetoothGATTCharacteristic::readValue method throws exception when invalid success callback is given
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback, i,
-        onconnected, onerror, service, characteristic, device = null, invalidSuccessCallback, flag = false;
-
-t.step(function () {
-    invalidSuccessCallback = {
-        onread: t.step_func(function (values) {
-            assert_unreached("Invalid successCallback invoked.");
-        })
-    };
-
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        if (service.characteristics.length > 0) {
-            for(i = 0; i < service.characteristics.length; i++) {
-                if(service.characteristics[i].isReadable == true) {
-                    characteristic = service.characteristics[i];
-                    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
-                        characteristic.readValue(invalidSuccessCallback);
-                    }, "TypeMismatchError" + " should be thrown - given invalid success callback.");
-                    device.disconnect();
-                    t.done();
-                }
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_readValue_successCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_readValue_successCallback_invalid_cb\r
+//==== LABEL Check if BluetoothGATTCharacteristic::readValue method throws exception when invalid success callback is given\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback, i,\r
+        onconnected, onerror, service, characteristic, device = null, invalidSuccessCallback, flag = false;\r
+\r
+t.step(function () {\r
+    invalidSuccessCallback = {\r
+        onread: t.step_func(function (values) {\r
+            assert_unreached("Invalid successCallback invoked.");\r
+        })\r
+    };\r
+\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        if (service.characteristics.length > 0) {\r
+            for(i = 0; i < service.characteristics.length; i++) {\r
+                if(service.characteristics[i].isReadable == true) {\r
+                    characteristic = service.characteristics[i];\r
+                    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+                        characteristic.readValue(invalidSuccessCallback);\r
+                    }, "TypeMismatchError" + " should be thrown - given invalid success callback.");\r
+                    device.disconnect();\r
+                    t.done();\r
+                }\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 92619e2e49998cc3e506616d36760eead2b9bb29..92b9916f8d365df91d0c6c7b3350c2c124f41f96 100755 (executable)
@@ -1,96 +1,96 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_readValue_with_errorCallback</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_readValue_with_errorCallback
-//==== LABEL Check if BluetoothGATTCharacteristic::readValue method works properly with optional argument
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MOA MR
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback, flag = false,
-        onconnected, onerror, service, characteristic, device = null, ReadValueSuccessCallback, errorCallback, retVal, i, charFlag = false;
-
-t.step(function () {
-    errorCallback = t.step_func(function (error) {
-        assert_unreached("readValue() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    ReadValueSuccessCallback = t.step_func(function (value) {
-        assert_equals(retVal, undefined, "readValue should return undefined");
-        device.disconnect();
-        t.done();
-    });
-
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        if (service.characteristics.length > 0) {
-            for(i = 0; i < service.characteristics.length; i++) {
-                if(service.characteristics[i].isReadable == true && charFlag == false) {
-                    charFlag = true;
-                    characteristic = service.characteristics[i];
-                    retVal = characteristic.readValue(ReadValueSuccessCallback, errorCallback);
-                }
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_readValue_with_errorCallback</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_readValue_with_errorCallback\r
+//==== LABEL Check if BluetoothGATTCharacteristic::readValue method works properly with optional argument\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MOA MR\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback, flag = false,\r
+        onconnected, onerror, service, characteristic, device = null, ReadValueSuccessCallback, errorCallback, retVal, i, charFlag = false;\r
+\r
+t.step(function () {\r
+    errorCallback = t.step_func(function (error) {\r
+        assert_unreached("readValue() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    ReadValueSuccessCallback = t.step_func(function (value) {\r
+        assert_equals(retVal, undefined, "readValue should return undefined");\r
+        device.disconnect();\r
+        t.done();\r
+    });\r
+\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        if (service.characteristics.length > 0) {\r
+            for(i = 0; i < service.characteristics.length; i++) {\r
+                if(service.characteristics[i].isReadable == true && charFlag == false) {\r
+                    charFlag = true;\r
+                    characteristic = service.characteristics[i];\r
+                    retVal = characteristic.readValue(ReadValueSuccessCallback, errorCallback);\r
+                }\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 778d616b8b007cee496d0fa074c40f5b6547900c..31f7693891285c8d7f9c465570442130c8b7f8f5 100755 (executable)
@@ -1,92 +1,92 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_removeValueChangeListener</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_removeValueChangeListener
-//==== LABEL Check if BluetoothGATTCharacteristic::removeValueChangeListener method works properly
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:removeValueChangeListener M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MR
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
-        onconnected, onerror, service, characteristic, device = null, ReadValueSuccessCallback, watchID, retVal, flag = false, charFlag = false, i;
-
-t.step(function () {
-    ReadValueSuccessCallback = t.step_func(function (value) {
-    });
-
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        if (service.characteristics.length > 0) {
-            for (i = 0; i < service.characteristics.length; i++) {
-                if (service.characteristics[i].isNotify == true && charFlag == false) {
-                    characteristic = service.characteristics[i];
-                    watchID = characteristic.addValueChangeListener(ReadValueSuccessCallback);
-                    retVal = characteristic.removeValueChangeListener(watchID);
-                    assert_equals(retVal, undefined, "removeValueChangeListener returns wrong value");
-                    device.disconnect();
-                    t.done();
-                }
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_removeValueChangeListener</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_removeValueChangeListener\r
+//==== LABEL Check if BluetoothGATTCharacteristic::removeValueChangeListener method works properly\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:removeValueChangeListener M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MR\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+        onconnected, onerror, service, characteristic, device = null, ReadValueSuccessCallback, watchID, retVal, flag = false, charFlag = false, i;\r
+\r
+t.step(function () {\r
+    ReadValueSuccessCallback = t.step_func(function (value) {\r
+    });\r
+\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        if (service.characteristics.length > 0) {\r
+            for (i = 0; i < service.characteristics.length; i++) {\r
+                if (service.characteristics[i].isNotify == true && charFlag == false) {\r
+                    characteristic = service.characteristics[i];\r
+                    watchID = characteristic.addValueChangeListener(ReadValueSuccessCallback);\r
+                    retVal = characteristic.removeValueChangeListener(watchID);\r
+                    assert_equals(retVal, undefined, "removeValueChangeListener returns wrong value");\r
+                    device.disconnect();\r
+                    t.done();\r
+                }\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index aa8bc56a7f80ca81259e6275379e3701147e8fa9..3df51aab1e11b155cf23fb135eb63e923479c59e 100755 (executable)
@@ -1,83 +1,83 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_removeValueChangeListener_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_removeValueChangeListener_exist
-//==== LABEL Check if BluetoothGATTCharacteristic::removeValueChangeListener method exists
-//==== PRIORITY P0
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:removeValueChangeListener M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA ME
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
-        service, characteristic, onconnected, onerror, device = null, flag = false;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        if (service.characteristics.length > 0) {
-            characteristic = service.characteristics[0];
-            check_method_exists(characteristic, "removeValueChangeListener");
-            device.disconnect();
-            t.done();
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_removeValueChangeListener_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_removeValueChangeListener_exist\r
+//==== LABEL Check if BluetoothGATTCharacteristic::removeValueChangeListener method exists\r
+//==== PRIORITY P0\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:removeValueChangeListener M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA ME\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+        service, characteristic, onconnected, onerror, device = null, flag = false;\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        if (service.characteristics.length > 0) {\r
+            characteristic = service.characteristics[0];\r
+            check_method_exists(characteristic, "removeValueChangeListener");\r
+            device.disconnect();\r
+            t.done();\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index b9c7cbe21baa15a43aa092c46d1c14c21b5828e2..75aa610fbea8f2b7596fb8ee68c699f7b21e3066 100755 (executable)
@@ -1,83 +1,87 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2020 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Feng Zhao <feng.zhao@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_uuid_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_uuid_attribute
-//==== LABEL Check if BluetoothGATTCharacteristic::uuid attribute exists, has type string and is readonly
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:uuid A
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the BLE remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
-        service, characteristic, onconnected, onerror, device = null, flag = false;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        if (service.characteristics.length > 0) {
-            characteristic = service.characteristics[0];
-            check_readonly(characteristic, "uuid", characteristic.uuid, "string", characteristic.uuid+"Tizen");
-            device.disconnect();
-            t.done();
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2020 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Feng Zhao <feng.zhao@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_uuid_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_uuid_attribute\r
+//==== LABEL Check if BluetoothGATTCharacteristic::uuid attribute exists, has type string and is readonly\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:uuid A\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the BLE remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({ timeout: 60000 });\r
+\r
+var t = async_test(document.title, { timeout: 60000 }), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+    service, characteristic, onconnected, onerror, device = null, flag = false;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT && LE_GATT_SUPPORT) { // check bluetooth and le and gatt support\r
+        onconnected = t.step_func(function () {\r
+            service = device.getService(device.uuids[0]);\r
+            if (service.characteristics.length > 0) {\r
+                characteristic = service.characteristics[0];\r
+                check_readonly(characteristic, "uuid", characteristic.uuid, "string", characteristic.uuid + "Tizen");\r
+                device.disconnect();\r
+                t.done();\r
+            }\r
+        });\r
+\r
+        onerror = t.step_func(function (error) {\r
+            assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+        });\r
+\r
+        bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+            if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+                adapter.stopScan();\r
+                device = bledevice;\r
+                if (flag == false) {\r
+                    device.connect(onconnected, onerror);\r
+                    flag = true;\r
+                }\r
+            }\r
+        });\r
+\r
+        bleScanRrrorCallback = t.step_func(function (error) {\r
+            assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getLEAdapter();\r
+        adapter.stopScan();\r
+        adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 49df0c63bc2aaa847c5fa55752c6b88746d69296..4da62b8ac5f9541b4223abd8e987dd64ee5bd171 100755 (executable)
@@ -1,89 +1,89 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_writeValue</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_writeValue
-//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method works properly without optional argument
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MMINA MR
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
-    onconnected, onerror, service, characteristic, device = null, retVal, data = new Array(1, 2, 3, 4, 5, 6),
-    flag = false, i;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        if (service.characteristics.length > 0) {
-            for(i = 0; i < service.characteristics.length; i++) {
-                if(service.characteristics[i].isWritable == true) {
-                    characteristic = service.characteristics[i];
-                    retVal = characteristic.writeValue(data);
-                    assert_equals(retVal, undefined, "writeValue should return undefined");
-                    device.disconnect();
-                    t.done();
-                }
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_writeValue</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_writeValue\r
+//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method works properly without optional argument\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MMINA MR\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+    onconnected, onerror, service, characteristic, device = null, retVal, data = new Array(1, 2, 3, 4, 5, 6),\r
+    flag = false, i;\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        if (service.characteristics.length > 0) {\r
+            for(i = 0; i < service.characteristics.length; i++) {\r
+                if(service.characteristics[i].isWritable == true) {\r
+                    characteristic = service.characteristics[i];\r
+                    retVal = characteristic.writeValue(data);\r
+                    assert_equals(retVal, undefined, "writeValue should return undefined");\r
+                    device.disconnect();\r
+                    t.done();\r
+                }\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index c9083f9ebbc62fd87878827d0fa9bef5b85066da..0116ac5b8402b3069afdae14e2fc1ae15a48101a 100755 (executable)
@@ -1,81 +1,81 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_writeValue_InvalidStateError</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_writeValue_InvalidStateError
-//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method called when device is not connected throws an exception
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MC
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
-        service, characteristic, WriteValueSuccessCallback, data = new Array(1, 2, 3, 4, 5, 6);
-
-t.step(function () {
-    WriteValueSuccessCallback = t.step_func(function () {
-        assert_unreached("Method writeValue shouldn't end successfully.");
-    });
-
-    bleScanSuccessCallback = {
-        onstarted: t.step_func(function () {
-        }),
-        ondevicefound: t.step_func(function (device) {
-            if(device.address == REMOTE_BLE_DEVICE_ADDRESS){
-                adapter.stopScan();
-                service = device.getService(device.uuids[0]);
-                if (service.characteristics.length > 0) {
-                    characteristic = service.characteristics[0];
-                    assert_throws(INVALID_STATE_ERR, function () {
-                        characteristic.writeValue(data, WriteValueSuccessCallback);
-                        }, INVALID_STATE_ERR + " should be thrown - if device is not connected.");
-                    t.done();
-                }
-            }
-        }),
-        onfinished: t.step_func(function (devices) {
-        })
-    };
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_writeValue_InvalidStateError</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_writeValue_InvalidStateError\r
+//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method called when device is not connected throws an exception\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+        service, characteristic, WriteValueSuccessCallback, data = new Array(1, 2, 3, 4, 5, 6);\r
+\r
+t.step(function () {\r
+    WriteValueSuccessCallback = t.step_func(function () {\r
+        assert_unreached("Method writeValue shouldn't end successfully.");\r
+    });\r
+\r
+    bleScanSuccessCallback = {\r
+        onstarted: t.step_func(function () {\r
+        }),\r
+        ondevicefound: t.step_func(function (device) {\r
+            if(device.address == REMOTE_BLE_DEVICE_ADDRESS){\r
+                adapter.stopScan();\r
+                service = device.getService(device.uuids[0]);\r
+                if (service.characteristics.length > 0) {\r
+                    characteristic = service.characteristics[0];\r
+                    assert_throws(INVALID_STATE_ERR, function () {\r
+                        characteristic.writeValue(data, WriteValueSuccessCallback);\r
+                        }, INVALID_STATE_ERR + " should be thrown - if device is not connected.");\r
+                    t.done();\r
+                }\r
+            }\r
+        }),\r
+        onfinished: t.step_func(function (devices) {\r
+        })\r
+    };\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 4ac1b441cd6f72cae3ef87732df185930cf976b5..9afbc0c7685e4b5b0165887759e442d1e1755b85 100755 (executable)
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_writeValue_data_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_writeValue_data_TypeMismatch
-//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method called with invalid data argument throws an exception 
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MC
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
-        onconnected, onerror, service, characteristic, device = null, conversionTable, i, j, exceptionName, incorrectData,
-        WriteValueSuccessCallback, flag = false;
-
-t.step(function () {
-    WriteValueSuccessCallback = t.step_func(function () {
-        assert_unreached("Method writeValue shouldn't end successfully. Given incorrect data.");
-    });
-
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        if (service.characteristics.length > 0) {
-            for(j = 0; j < service.characteristics.length; j++) {
-                if(service.characteristics[j].isWritable == true) {
-                    characteristic = service.characteristics[j];
-                    conversionTable = getTypeConversionExceptions("array", false);
-                    for (i = 0; i < conversionTable.length; i++) {
-                        incorrectData = conversionTable[i][0];
-                        exceptionName = conversionTable[i][1];
-
-                        assert_throws({name: exceptionName},
-                            function () {
-                                characteristic.writeValue(incorrectData, WriteValueSuccessCallback);
-                            }, "Given incorrect characteristic data.");
-                    }
-                    device.disconnect();
-                    t.done();
-                }
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_writeValue_data_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_writeValue_data_TypeMismatch\r
+//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method called with invalid data argument throws an exception \r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+        onconnected, onerror, service, characteristic, device = null, conversionTable, i, j, exceptionName, incorrectData,\r
+        WriteValueSuccessCallback, flag = false;\r
+\r
+t.step(function () {\r
+    WriteValueSuccessCallback = t.step_func(function () {\r
+        assert_unreached("Method writeValue shouldn't end successfully. Given incorrect data.");\r
+    });\r
+\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        if (service.characteristics.length > 0) {\r
+            for(j = 0; j < service.characteristics.length; j++) {\r
+                if(service.characteristics[j].isWritable == true) {\r
+                    characteristic = service.characteristics[j];\r
+                    conversionTable = getTypeConversionExceptions("array", false);\r
+                    for (i = 0; i < conversionTable.length; i++) {\r
+                        incorrectData = conversionTable[i][0];\r
+                        exceptionName = conversionTable[i][1];\r
+\r
+                        assert_throws({name: exceptionName},\r
+                            function () {\r
+                                characteristic.writeValue(incorrectData, WriteValueSuccessCallback);\r
+                            }, "Given incorrect characteristic data.");\r
+                    }\r
+                    device.disconnect();\r
+                    t.done();\r
+                }\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 64903e719f943e27efb93074e57f8b3a76dce619..52a645eda440471370a165cfe380e4697a639ab8 100755 (executable)
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_writeValue_errorCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_writeValue_errorCallback_TypeMismatch
-//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method called with invalid errorCallback argument throws an exception 
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MC
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
-        onconnected, onerror, service, characteristic, device = null, conversionTable, i, j, exceptionName, errorCallback,
-        data = new Array(1, 2, 3, 4, 5, 6), WriteValueSuccessCallback, flag = false;
-
-t.step(function () {
-    WriteValueSuccessCallback = t.step_func(function () {
-        assert_unreached("Method writeValue shouldn't end successfully. Given incorrect errorCallback.");
-    });
-
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        if (service.characteristics.length > 0) {
-            for(j = 0; j < service.characteristics.length; j++) {
-                if(service.characteristics[j].isWritable == true) {
-                    characteristic = service.characteristics[j];
-                    conversionTable = getTypeConversionExceptions("functionObject", true);
-                    for (i = 0; i < conversionTable.length; i++) {
-                        errorCallback = conversionTable[i][0];
-                        exceptionName = conversionTable[i][1];
-
-                       assert_throws({name: exceptionName},
-                            function () {
-                                characteristic.writeValue(data, WriteValueSuccessCallback, errorCallback);
-                            }, "Given incorrect errorCallback.");
-                    }
-                    device.disconnect();
-                    t.done();
-                }
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_writeValue_errorCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_writeValue_errorCallback_TypeMismatch\r
+//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method called with invalid errorCallback argument throws an exception \r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+        onconnected, onerror, service, characteristic, device = null, conversionTable, i, j, exceptionName, errorCallback,\r
+        data = new Array(1, 2, 3, 4, 5, 6), WriteValueSuccessCallback, flag = false;\r
+\r
+t.step(function () {\r
+    WriteValueSuccessCallback = t.step_func(function () {\r
+        assert_unreached("Method writeValue shouldn't end successfully. Given incorrect errorCallback.");\r
+    });\r
+\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        if (service.characteristics.length > 0) {\r
+            for(j = 0; j < service.characteristics.length; j++) {\r
+                if(service.characteristics[j].isWritable == true) {\r
+                    characteristic = service.characteristics[j];\r
+                    conversionTable = getTypeConversionExceptions("functionObject", true);\r
+                    for (i = 0; i < conversionTable.length; i++) {\r
+                        errorCallback = conversionTable[i][0];\r
+                        exceptionName = conversionTable[i][1];\r
+\r
+                       assert_throws({name: exceptionName},\r
+                            function () {\r
+                                characteristic.writeValue(data, WriteValueSuccessCallback, errorCallback);\r
+                            }, "Given incorrect errorCallback.");\r
+                    }\r
+                    device.disconnect();\r
+                    t.done();\r
+                }\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 8c1c8ec3db790ceb8a954b592db64d2ffd2a02e8..d9641bd6db18229d551727097a7b2d53d1d0cb02 100755 (executable)
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_writeValue_errorCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_writeValue_errorCallback_invalid_cb
-//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method throws exception when invalid error callback is given
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
-        onconnected, onerror, service, characteristic, device = null, WriteValueSuccessCallback, 
-        data = new Array(1, 2, 3, 4, 5, 6), invaliderrorCallback, flag = false, i;
-
-t.step(function () {
-    WriteValueSuccessCallback = t.step_func(function () {
-        assert_unreached("Method writeValue shouldn't end successfully.");
-    });
-
-    invaliderrorCallback = {
-        onerror: t.step_func(function (error) {
-            assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
-        })
-    };
-
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        if (service.characteristics.length > 0) {
-            for(i = 0; i < service.characteristics.length; i++) {
-                if(service.characteristics[i].isWritable == true) {
-                    characteristic = service.characteristics[i];
-                    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
-                        characteristic.writeValue(data, WriteValueSuccessCallback, invaliderrorCallback);
-                    }, "TypeMismatchError" + " should be thrown - given invalid error callback.");
-                    device.disconnect();
-                    t.done();
-                }
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_writeValue_errorCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_writeValue_errorCallback_invalid_cb\r
+//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method throws exception when invalid error callback is given\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+        onconnected, onerror, service, characteristic, device = null, WriteValueSuccessCallback, \r
+        data = new Array(1, 2, 3, 4, 5, 6), invaliderrorCallback, flag = false, i;\r
+\r
+t.step(function () {\r
+    WriteValueSuccessCallback = t.step_func(function () {\r
+        assert_unreached("Method writeValue shouldn't end successfully.");\r
+    });\r
+\r
+    invaliderrorCallback = {\r
+        onerror: t.step_func(function (error) {\r
+            assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);\r
+        })\r
+    };\r
+\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        if (service.characteristics.length > 0) {\r
+            for(i = 0; i < service.characteristics.length; i++) {\r
+                if(service.characteristics[i].isWritable == true) {\r
+                    characteristic = service.characteristics[i];\r
+                    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+                        characteristic.writeValue(data, WriteValueSuccessCallback, invaliderrorCallback);\r
+                    }, "TypeMismatchError" + " should be thrown - given invalid error callback.");\r
+                    device.disconnect();\r
+                    t.done();\r
+                }\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index f6eeab820a45ee3f2a41412b8876e774e61db440..39866080048ef3a66320273b25eb6e0700864a5c 100755 (executable)
@@ -1,87 +1,87 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_writeValue_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_writeValue_exist
-//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method exists
-//==== PRIORITY P0
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA ME
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
-        service, characteristic, onconnected, onerror, device = null, flag = false, i;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        if (service.characteristics.length > 0) {
-            for(i = 0; i < service.characteristics.length; i++) {
-                if(service.characteristics[i].isWritable == true) {
-                    characteristic = service.characteristics[i];
-                    check_method_exists(characteristic, "writeValue");
-                    device.disconnect();
-                    t.done();
-                }
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_writeValue_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_writeValue_exist\r
+//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method exists\r
+//==== PRIORITY P0\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA ME\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+        service, characteristic, onconnected, onerror, device = null, flag = false, i;\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        if (service.characteristics.length > 0) {\r
+            for(i = 0; i < service.characteristics.length; i++) {\r
+                if(service.characteristics[i].isWritable == true) {\r
+                    characteristic = service.characteristics[i];\r
+                    check_method_exists(characteristic, "writeValue");\r
+                    device.disconnect();\r
+                    t.done();\r
+                }\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 09258018c417bd9a8a6e0fdf06b7b0fb2d275ee5..c0c493cca159b6f3a4bcd097c554411c011645f8 100755 (executable)
@@ -1,89 +1,89 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_writeValue_noarg</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_writeValue_noarg
-//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method called without argument throws an exception
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MMA
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
-        onconnected, onerror, service, characteristic, device = null, flag = false, i;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        if (service.characteristics.length > 0) {
-            for(i = 0; i < service.characteristics.length; i++) {
-                if(service.characteristics[i].isWritable == true) {
-                    characteristic = service.characteristics[i];
-                    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
-                        characteristic.writeValue();
-                    }, "TypeMismatchError" + " should be thrown - given no parameter.");
-                    device.disconnect();
-                    t.done();
-                }
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_writeValue_noarg</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_writeValue_noarg\r
+//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method called without argument throws an exception\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MMA\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+        onconnected, onerror, service, characteristic, device = null, flag = false, i;\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        if (service.characteristics.length > 0) {\r
+            for(i = 0; i < service.characteristics.length; i++) {\r
+                if(service.characteristics[i].isWritable == true) {\r
+                    characteristic = service.characteristics[i];\r
+                    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+                        characteristic.writeValue();\r
+                    }, "TypeMismatchError" + " should be thrown - given no parameter.");\r
+                    device.disconnect();\r
+                    t.done();\r
+                }\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 5cdec37d2dcd9c6210067c3a465700723fd5e306..c8c8b1378788d87960b80f4a3658ebde90bbe1f5 100755 (executable)
@@ -1,97 +1,97 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_writeValue_successCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_writeValue_successCallback_TypeMismatch
-//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method called with invalid successCallback argument throws an exception
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MC
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
-        onconnected, onerror, service, characteristic, device = null, conversionTable, i, j, exceptionName, successCallback,
-        data = new Array(1, 2, 3, 4, 5, 6), flag = false;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        if (service.characteristics.length > 0) {
-            for(j = 0; j < service.characteristics.length; j++) {
-                if(service.characteristics[j].isWritable == true) {
-                    characteristic = service.characteristics[j];
-                    conversionTable = getTypeConversionExceptions("functionObject", true);
-                    for (i = 0; i < conversionTable.length; i++) {
-                        successCallback = conversionTable[i][0];
-                        exceptionName = conversionTable[i][1];
-
-                        assert_throws({name: exceptionName},
-                            function () {
-                                characteristic.writeValue(data, successCallback);
-                            }, "Given incorrect successCallback.");
-                    }
-                    device.disconnect();
-                    t.done();
-                }
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_writeValue_successCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_writeValue_successCallback_TypeMismatch\r
+//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method called with invalid successCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+        onconnected, onerror, service, characteristic, device = null, conversionTable, i, j, exceptionName, successCallback,\r
+        data = new Array(1, 2, 3, 4, 5, 6), flag = false;\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        if (service.characteristics.length > 0) {\r
+            for(j = 0; j < service.characteristics.length; j++) {\r
+                if(service.characteristics[j].isWritable == true) {\r
+                    characteristic = service.characteristics[j];\r
+                    conversionTable = getTypeConversionExceptions("functionObject", true);\r
+                    for (i = 0; i < conversionTable.length; i++) {\r
+                        successCallback = conversionTable[i][0];\r
+                        exceptionName = conversionTable[i][1];\r
+\r
+                        assert_throws({name: exceptionName},\r
+                            function () {\r
+                                characteristic.writeValue(data, successCallback);\r
+                            }, "Given incorrect successCallback.");\r
+                    }\r
+                    device.disconnect();\r
+                    t.done();\r
+                }\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 2622b443c5dbd30f9a85e8a5fa2fba15c8dd6341..79b93f843bdc882e19beccbc28a4fe8ede297c74 100755 (executable)
@@ -1,95 +1,95 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_writeValue_successCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_writeValue_successCallback_invalid_cb
-//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method throws exception when invalid success callback is given
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback, flag = false, i,
-        onconnected, onerror, service, characteristic, device = null, invalidSuccessCallback, data = new Array(1, 2, 3, 4, 5, 6);
-
-t.step(function () {
-    invalidSuccessCallback = {
-        onsuccess: t.step_func(function () {
-            assert_unreached("Invalid successCallback invoked.");
-        })
-    };
-
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        if (service.characteristics.length > 0) {
-            for(i = 0; i < service.characteristics.length; i++) {
-                if(service.characteristics[i].isWritable == true) {
-                    characteristic = service.characteristics[i];
-                    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
-                        characteristic.writeValue(data, invalidSuccessCallback);
-                    }, "TypeMismatchError" + " should be thrown - given invalid success callback.");
-                    device.disconnect();
-                    t.done();
-                }
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_writeValue_successCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_writeValue_successCallback_invalid_cb\r
+//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method throws exception when invalid success callback is given\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback, flag = false, i,\r
+        onconnected, onerror, service, characteristic, device = null, invalidSuccessCallback, data = new Array(1, 2, 3, 4, 5, 6);\r
+\r
+t.step(function () {\r
+    invalidSuccessCallback = {\r
+        onsuccess: t.step_func(function () {\r
+            assert_unreached("Invalid successCallback invoked.");\r
+        })\r
+    };\r
+\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        if (service.characteristics.length > 0) {\r
+            for(i = 0; i < service.characteristics.length; i++) {\r
+                if(service.characteristics[i].isWritable == true) {\r
+                    characteristic = service.characteristics[i];\r
+                    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+                        characteristic.writeValue(data, invalidSuccessCallback);\r
+                    }, "TypeMismatchError" + " should be thrown - given invalid success callback.");\r
+                    device.disconnect();\r
+                    t.done();\r
+                }\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index ec168860bc2b2d817333265eeb166085bccd0e36..276ba882ed84588bc66f792a1af4eba86f15564e 100755 (executable)
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_writeValue_with_errorCallback</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_writeValue_with_errorCallback
-//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method works properly with optional argument
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MOA MR MAST
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback, flag = false,
-        onconnected, onerror, service, characteristic, device = null, ReadValueSuccessCallback, WriteValueSuccessCallback, retVal,
-        data = new Array(1, 2, 3, 4, 5, 6), WriteValueErrorCallback, i, charFlag = false;
-
-t.step(function () {
-    ReadValueSuccessCallback = t.step_func(function (value) {
-        assert_array_equals(value, data, "readValue returns wrong value");
-    });
-
-    WriteValueSuccessCallback = t.step_func(function () {
-        assert_equals(retVal, undefined, "writeValue should return undefined");
-        characteristic.readValue(ReadValueSuccessCallback);
-        device.disconnect();
-        t.done();
-    });
-
-    WriteValueErrorCallback = t.step_func(function (error) {
-        assert_unreached("writeValue() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        if (service.characteristics.length > 0) {
-            for(i = 0; i < service.characteristics.length; i++) {
-                if(service.characteristics[i].isWritable == true && charFlag == false) {
-                    charFlag = true;
-                    characteristic = service.characteristics[i];
-                    retVal = characteristic.writeValue(data, WriteValueSuccessCallback, WriteValueErrorCallback);
-                }
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_writeValue_with_errorCallback</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_writeValue_with_errorCallback\r
+//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method works properly with optional argument\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MOA MR MAST\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback, flag = false,\r
+        onconnected, onerror, service, characteristic, device = null, ReadValueSuccessCallback, WriteValueSuccessCallback, retVal,\r
+        data = new Array(1, 2, 3, 4, 5, 6), WriteValueErrorCallback, i, charFlag = false;\r
+\r
+t.step(function () {\r
+    ReadValueSuccessCallback = t.step_func(function (value) {\r
+        assert_array_equals(value, data, "readValue returns wrong value");\r
+    });\r
+\r
+    WriteValueSuccessCallback = t.step_func(function () {\r
+        assert_equals(retVal, undefined, "writeValue should return undefined");\r
+        characteristic.readValue(ReadValueSuccessCallback);\r
+        device.disconnect();\r
+        t.done();\r
+    });\r
+\r
+    WriteValueErrorCallback = t.step_func(function (error) {\r
+        assert_unreached("writeValue() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        if (service.characteristics.length > 0) {\r
+            for(i = 0; i < service.characteristics.length; i++) {\r
+                if(service.characteristics[i].isWritable == true && charFlag == false) {\r
+                    charFlag = true;\r
+                    characteristic = service.characteristics[i];\r
+                    retVal = characteristic.writeValue(data, WriteValueSuccessCallback, WriteValueErrorCallback);\r
+                }\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 4139a87f1114b72775ed62579d60f6fc1b4a258b..f6b14b3790efb0e889d13db7214f286f119b13f5 100755 (executable)
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2017 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Michal Bistyga <m.bistyga@samsung.com>
-    Xiaoyan Qian <xy.qian@samsung.com>
-    Qunfang Lin <qunfang.lin@samsung.com>
-    Lei Tang <lei312.tang@samsung.com>
--->
-<html>
-<head>
-<title>BluetoothGATTCombined</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCombined
-//==== LABEL Check BluetoothDevice attributes and functions
-//==== EXECUTION_TYPE manual
-//==== PRIORITY P3
-//==== ONLOAD_DELAY 180
-//==== STEP several tests executed from base test
-//==== EXPECT all subtests should be successful
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:addValueChangeListener M
-//==== TEST_CRITERIA ME
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:descriptors A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:BluetoothGATTCharacteristic U
-//==== TEST_CRITERIA OBX
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:hasExtendedProperties A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isBroadcast A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isIndication A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isNotify A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isReadable A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isSignedWrite A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isWritable A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isWriteNoResponse A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M
-//==== TEST_CRITERIA MMINA MR
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M
-//==== TEST_CRITERIA MTCB
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M
-//==== TEST_CRITERIA ME
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M
-//==== TEST_CRITERIA MMA
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M
-//==== TEST_CRITERIA MTCB
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M
-//==== TEST_CRITERIA MOA MR
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:removeValueChangeListener M
-//==== TEST_CRITERIA MR
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:removeValueChangeListener M
-//==== TEST_CRITERIA ME
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== TEST_CRITERIA MMINA MR
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== TEST_CRITERIA MTCB
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== TEST_CRITERIA ME
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== TEST_CRITERIA MMA
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== TEST_CRITERIA MTCB
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== TEST_CRITERIA MOA MR MAST
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:BluetoothGATTDescriptor U
-//==== TEST_CRITERIA OBX
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M
-//==== TEST_CRITERIA MR MMINA
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M
-//==== TEST_CRITERIA MTCB
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M
-//==== TEST_CRITERIA ME
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M
-//==== TEST_CRITERIA MMA
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M
-//==== TEST_CRITERIA MTCB
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M
-//==== TEST_CRITERIA MOA MR
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M
-//==== TEST_CRITERIA MR MMINA
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M
-//==== TEST_CRITERIA MTCB
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M
-//==== TEST_CRITERIA ME
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M
-//==== TEST_CRITERIA MMA
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:TBD:Bluetooth:ReadValueSuccessCallback:onread M
-//==== TEST_CRITERIA CBOA CBT
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M
-//==== TEST_CRITERIA MTCB
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTService:characteristics A
-//==== TEST_CRITERIA  AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTService:uuid A
-//==== TEST_CRITERIA  AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTService:services A
-//==== TEST_CRITERIA  AE AT ARO
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), storedDevice, onConnected, onError, proccessDevice, adapter;
-
-t.step(function () {
-    onConnected = t.step_func(function () {
-
-        function sleep(ms) {
-            var start = new Date().getTime();
-            for (var i = 0; i < 1e7; i++) {
-                if ((new Date().getTime() - start) > ms){
-                    break;
-                }
-            }
-        }
-        //BluetoothGATTCharacteristic_writeValue_with_errorCallback
-        var inner3 = async_test("BluetoothGATTCharacteristic_writeValue_with_errorCallback", {timeout: 60000});
-        inner3.step(function () {
-            var value, data = new Array(1, 2, 3, 4, 5, 6), charFlag = false, retVal, characteristic, descriptor, i, j, conversionTable, exceptionName;
-
-            var WriteValueSuccessCallback = inner3.step_func(function (value) {
-                assert_equals(retVal, undefined, "writeValue should return undefined");
-                inner3.done();
-            });
-
-            var WriteValueErrorCallback = inner3.step_func(function (error) {
-                assert_unreached("writeValue() error callback was invoked: " + error.name + " msg: " + error.message);
-            });
-
-            var service = storedDevice.getService(storedDevice.uuids[0]);
-            if (service.characteristics.length > 0) {
-                for(i = 0; i < service.characteristics.length; i++) {
-                    if(service.characteristics[i].isWritable == true && charFlag == false) {
-                        charFlag = true;
-                        characteristic = service.characteristics[i];
-                        retVal = characteristic.writeValue(data, WriteValueSuccessCallback, WriteValueErrorCallback);
-                    }
-                }
-            }
-        });
-        sleep(2000)
-
-        //BluetoothGATTCharacteristic_readValue
-        var inner = async_test("BluetoothGATTCharacteristic_readValue", {timeout: 60000});
-        inner.step(function () {
-            var retVal, errorCallback, ReadValueSuccessCallback, characteristic, descriptor, i, j, conversionTable, exceptionName;
-            ReadValueSuccessCallback = inner.step_func(function (value) {
-                assert_equals(retVal, undefined, "readValue should return undefined");
-                inner.done();
-                });
-
-            var descFlag = false;
-            var service = storedDevice.getService(storedDevice.uuids[0]);
-            for (i = 0; i < service.characteristics.length; i++) {
-                var characteristic = service.characteristics[i];
-                if (descFlag == false && characteristic != undefined && characteristic.isReadable == true) {
-                    retVal = characteristic.readValue(ReadValueSuccessCallback);
-                    descFlag = true;
-                }
-            };
-        });
-        sleep(2000)
-
-        //BluetoothGATTCharacteristic_readValue_with_errorCallback
-        var inner2 = async_test("BluetoothGATTCharacteristic_readValue_with_errorCallback", {timeout: 60000});
-        inner2.step(function () {
-
-            var retVal, errorCallback, ReadValueSuccessCallback, characteristic, descriptor, i, j, conversionTable, exceptionName;
-            errorCallback = inner2.step_func(function (error) {
-                assert_unreached("readValue() error callback was invoked: " + error.name + " msg: " + error.message);
-            });
-
-            ReadValueSuccessCallback = inner2.step_func(function (value) {
-                assert_equals(retVal, undefined, "readValue should return undefined");
-                inner2.done();
-            });
-
-            var service = storedDevice.getService(storedDevice.uuids[0]);
-            if (service.characteristics.length > 0) {
-                var charFlag=false;
-                for(i = 0; i < service.characteristics.length; i++) {
-                    characteristic = service.characteristics[i];
-                    if(charFlag == false && characteristic != undefined && characteristic.isReadable == true) {
-                        charFlag = true;
-                        retVal = characteristic.readValue(ReadValueSuccessCallback, errorCallback);
-                    }
-                }
-            }
-        });
-        sleep(2000)
-
-        //BluetoothGATTDescriptor_readValue
-        var inner4 = async_test("BluetoothGATTDescriptor_readValue", {timeout: 60000});
-        inner4.step(function () {
-            var retVal, errorCallback, ReadValueSuccessCallback, characteristic, descriptor, i, j, conversionTable, exceptionName;
-            ReadValueSuccessCallback = inner4.step_func(function (value) {
-                assert_equals(retVal, undefined, "readValue should return undefined");
-                inner4.done();
-            });
-
-            var service = storedDevice.getService(storedDevice.uuids[0]);
-            for (i = 0; i < service.characteristics.length; i++) {
-                characteristic = service.characteristics[i];
-                if (characteristic != undefined) {
-                    descriptor = characteristic.descriptors[0];
-                    if (descriptor != undefined) {
-                        retVal = descriptor.readValue(ReadValueSuccessCallback);
-                    }
-                }
-            }
-        });
-        sleep(2000)
-
-        //BluetoothGATTDescriptor_readValue_with_errorCallback
-        var inner5 = async_test("BluetoothGATTDescriptor_readValue_with_errorCallback", {timeout: 60000});
-        inner5.step(function () {
-            var retVal, errorCallback, ReadValueSuccessCallback, characteristic, descriptor, i, j, conversionTable, exceptionName;
-            ReadValueSuccessCallback = inner5.step_func(function (value) {
-                assert_equals(retVal, undefined, "readValue should return undefined");
-                inner5.done();
-                });
-            ReadValueErrorCallback = inner5.step_func(function (error) {
-                assert_unreached("readValue() error callback was invoked: " + error.name + " msg: " + error.message);
-            });
-
-            var service = storedDevice.getService(storedDevice.uuids[0]);
-            var descFlag = false;
-            for (i = 0; i < service.characteristics.length; i++) {
-                characteristic = service.characteristics[i];
-                if (characteristic != undefined) {
-                    descriptor = characteristic.descriptors[0];
-                    if (descFlag == false && descriptor != undefined) {
-                        descFlag = true;
-                        retVal = descriptor.readValue(ReadValueSuccessCallback, ReadValueErrorCallback);
-                    }
-                }
-            }
-        });
-        sleep(2000)
-
-        //ReadValueSuccessCallback_onread
-        var inner6 = async_test("ReadValueSuccessCallback_onread", {timeout: 60000});
-        inner6.step(function () {
-            var retVal, errorCallback, ReadValueSuccessCallback, characteristic, descriptor, i, j, conversionTable, exceptionName;
-            ReadValueSuccessCallback = inner6.step_func(function (value) {
-                assert_type(value, "array", "foundDevice isn't an array");
-                inner6.done();
-            });
-            ReadValueErrorCallback = inner6.step_func(function (error) {
-                assert_unreached("readValue() error callback was invoked: " + error.name + " msg: " + error.message);
-            });
-            var service = storedDevice.getService(storedDevice.uuids[0]);
-            var descFlag =false;
-            for (i = 0; i < service.characteristics.length; i++) {
-                characteristic = service.characteristics[i];
-                if (descFlag==false && characteristic != undefined) {
-                    characteristic.readValue(ReadValueSuccessCallback, ReadValueErrorCallback);
-                    descFlag = true;
-                }
-            }
-        });
-        sleep(2000)
-
-        // BluetoothGATTCharacteristic_addValueChangeListener_exist
-        test(function () {
-            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
-            if (service.characteristics.length > 0) {
-                characteristic = service.characteristics[0];
-                check_method_exists(characteristic, "addValueChangeListener");
-            };
-        }, "BluetoothGATTCharacteristic_addValueChangeListener_exist");
-
-        // BluetoothGATTCharacteristic_descriptors_attribute
-        test(function () {
-            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
-            if (service.characteristics.length > 0) {
-                characteristic = service.characteristics[0];
-                assert_true("descriptors" in characteristic, "Name descriptors doesn't exist in provided object.");
-                assert_type(characteristic.descriptors, "array", "Type of descriptors is different.");
-                origin = characteristic.descriptors[0];
-                characteristic.descriptors[0] = "invalidValue";
-                assert_equals(characteristic.descriptors[0], origin, "descriptor is readonly, but its writable.");
-            };
-        }, "BluetoothGATTCharacteristic_descriptors_attribute");
-
-        //BluetoothGATTCharacteristic_hasExtendedProperties_attribute
-        test(function () {
-            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
-            if (service.characteristics.length > 0) {
-                characteristic = service.characteristics[0];
-                check_readonly(characteristic, "hasExtendedProperties", characteristic.hasExtendedProperties, "boolean", !(characteristic.hasExtendedProperties));
-            };
-        }, "BluetoothGATTCharacteristic_hasExtendedProperties_attribute");
-
-        //BluetoothGATTCharacteristic_isBroadcast_attribute
-        test(function () {
-            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
-            if (service.characteristics.length > 0) {
-                characteristic = service.characteristics[0];
-                check_readonly(characteristic, "isBroadcast", characteristic.isBroadcast, "boolean", !(characteristic.isBroadcast));
-            };
-        }, "BluetoothGATTCharacteristic_isBroadcast_attribute");
-
-        //BluetoothGATTCharacteristic_isIndication_attribute
-        test(function () {
-            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
-            if (service.characteristics.length > 0) {
-                characteristic = service.characteristics[0];
-                check_readonly(characteristic, "isIndication", characteristic.isIndication, "boolean", !(characteristic.isIndication));
-            };
-        }, "BluetoothGATTCharacteristic_isIndication_attribute");
-
-        //BluetoothGATTCharacteristic_isNotify_attribute
-        test(function () {
-            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
-            if (service.characteristics.length > 0) {
-                characteristic = service.characteristics[0];
-                check_readonly(characteristic, "isNotify", characteristic.isNotify, "boolean", !(characteristic.isNotify));
-            };
-        }, "BluetoothGATTCharacteristic_isNotify_attribute");
-
-        //BluetoothGATTCharacteristic_isReadable_attribute
-        test(function () {
-            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
-            if (service.characteristics.length > 0) {
-                characteristic = service.characteristics[0];
-                check_readonly(characteristic, "isReadable", characteristic.isReadable, "boolean", !(characteristic.isReadable));
-            };
-        }, "BluetoothGATTCharacteristic_isReadable_attribute");
-
-        //BluetoothGATTCharacteristic_isSignedWrite_attribute
-        test(function () {
-            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
-            if (service.characteristics.length > 0) {
-                characteristic = service.characteristics[0];
-                check_readonly(characteristic, "isSignedWrite", characteristic.isSignedWrite, "boolean", !(characteristic.isSignedWrite));
-            };
-        }, "BluetoothGATTCharacteristic_isSignedWrite_attribute");
-
-        //BluetoothGATTCharacteristic_isWritable_attribute
-        test(function () {
-            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
-            if (service.characteristics.length > 0) {
-                characteristic = service.characteristics[0];
-                check_readonly(characteristic, "isWritable", characteristic.isWritable, "boolean", !(characteristic.isWritable));
-            };
-        }, "BluetoothGATTCharacteristic_isWritable_attribute");
-
-        //BluetoothGATTCharacteristic_isWriteNoResponse_attribute
-        test(function () {
-            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
-            if (service.characteristics.length > 0) {
-                characteristic = service.characteristics[0];
-                check_readonly(characteristic, "isWriteNoResponse", characteristic.isWriteNoResponse, "boolean", !(characteristic.isWriteNoResponse));
-            };
-        }, "BluetoothGATTCharacteristic_isWriteNoResponse_attribute");
-
-        //BluetoothGATTCharacteristic_readValue_errorCallback_TypeMismatch
-        test(function () {
-            var errorCallback, ReadValueSuccessCallback, characteristic, descriptor, i, j, conversionTable, exceptionName;
-            ReadValueSuccessCallback = function (value) {
-                assert_unreached("Method readValue shouldn't end successfully. Given incorrect errorCallback.");
-            };
-            var service = storedDevice.getService(storedDevice.uuids[0]);
-            if (service.characteristics.length > 0) {
-                for(j = 0; j < service.characteristics.length; j++) {
-                    if(service.characteristics[j].isReadable == true) {
-                        characteristic = service.characteristics[j];
-                        conversionTable = getTypeConversionExceptions("functionObject", true);
-                        for (i = 0; i < conversionTable.length; i++) {
-                            errorCallback = conversionTable[i][0];
-                            exceptionName = conversionTable[i][1];
-                            assert_throws({name: exceptionName},
-                                function () {
-                                characteristic.readValue(ReadValueSuccessCallback, errorCallback);
-                                }, "Given incorrect errorCallback.");
-                        }
-                    }
-                }
-            };
-        }, "BluetoothGATTCharacteristic_readValue_errorCallback_TypeMismatch");
-
-        //BluetoothGATTCharacteristic_readValue_errorCallback_invalid_cb
-        test(function () {
-            var characteristic, descriptor, i, j, conversionTable, exceptionName;
-            var ReadValueSuccessCallback = function (value) {
-                assert_unreached("Method readValue shouldn't end successfully.");
-            };
-
-            var invaliderrorCallback = {
-                onerror: function (error) {
-                    assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
-                }
-            };
-            var service = storedDevice.getService(storedDevice.uuids[0]);
-            if (service.characteristics.length > 0) {
-                for(i = 0; i < service.characteristics.length; i++) {
-                    if(service.characteristics[i].isReadable == true) {
-                        characteristic = service.characteristics[i];
-                        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
-                            characteristic.readValue(ReadValueSuccessCallback, invaliderrorCallback);
-                        }, "TypeMismatchError" + " should be thrown - given invalid error callback.");
-                    }
-                }
-            };
-        }, "BluetoothGATTCharacteristic_readValue_errorCallback_invalid_cb");
-
-        //BluetoothGATTCharacteristic_readValue_exist
-        test(function () {
-            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
-            if (service.characteristics.length > 0) {
-                for(i = 0; i < service.characteristics.length; i++) {
-                    if(service.characteristics[i].isReadable == true) {
-                        characteristic = service.characteristics[i];
-                        check_method_exists(characteristic, "readValue");
-                    }
-                }
-            };
-        }, "BluetoothGATTCharacteristic_readValue_exist");
-
-        //BluetoothGATTCharacteristic_readValue_noarg
-        test(function () {
-            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
-            if (service.characteristics.length > 0) {
-                for(i = 0; i < service.characteristics.length; i++) {
-                    if(service.characteristics[i].isReadable == true) {
-                        characteristic = service.characteristics[i];
-                        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
-                            characteristic.readValue();
-                        }, "TypeMismatchError" + " should be thrown - given no parameter.");
-                    }
-                }
-            };
-        }, "BluetoothGATTCharacteristic_readValue_noarg");
-
-        //BluetoothGATTCharacteristic_readValue_successCallback_TypeMismatch
-        test(function () {
-            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
-            if (service.characteristics.length > 0) {
-                for(j = 0; j < service.characteristics.length; j++) {
-                    if(service.characteristics[j].isReadable == true) {
-                        characteristic = service.characteristics[j];
-                        conversionTable = getTypeConversionExceptions("functionObject", false);
-                        for (i = 0; i < conversionTable.length; i++) {
-                            successCallback = conversionTable[i][0];
-                            exceptionName = conversionTable[i][1];
-                            assert_throws({name: exceptionName},
-                                function () {
-                                    characteristic.readValue(successCallback);
-                                }, "Given incorrect successCallback.");
-                        }
-                    }
-                }
-            };
-        }, "BluetoothGATTCharacteristic_readValue_successCallback_TypeMismatch");
-
-        //BluetoothGATTCharacteristic_readValue_successCallback_invalid_cb
-        test(function () {
-            var characteristic, descriptor, i, j, conversionTable, exceptionName;
-            invalidSuccessCallback = {
-                onread: function (values) {
-                    assert_unreached("Invalid successCallback invoked.");
-                }
-            };
-            var service = storedDevice.getService(storedDevice.uuids[0]);
-            if (service.characteristics.length > 0) {
-                for(i = 0; i < service.characteristics.length; i++) {
-                    if(service.characteristics[i].isReadable == true) {
-                        characteristic = service.characteristics[i];
-                        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
-                            characteristic.readValue(invalidSuccessCallback);
-                        }, "TypeMismatchError" + " should be thrown - given invalid success callback.");
-                    }
-                }
-            };
-        }, "BluetoothGATTCharacteristic_readValue_successCallback_invalid_cb");
-
-        //BluetoothGATTCharacteristic_removeValueChangeListener
-        test(function () {
-            var retVal, characteristic, descriptor, i, j, conversionTable, exceptionName;
-            var ReadValueSuccessCallback = function (value) {
-            };
-            var service = storedDevice.getService(storedDevice.uuids[0]);
-            if (service.characteristics.length > 0) {
-                for (i = 0; i < service.characteristics.length; i++) {
-                    if (service.characteristics[i].isNotify == true) {
-                        characteristic = service.characteristics[i];
-                        watchID = characteristic.addValueChangeListener(ReadValueSuccessCallback);
-                        retVal = characteristic.removeValueChangeListener(watchID);
-                        assert_equals(retVal, undefined, "removeValueChangeListener returns wrong value");
-                    }
-                }
-            };
-        }, "BluetoothGATTCharacteristic_removeValueChangeListener");
-
-        //BluetoothGATTCharacteristic_removeValueChangeListener_exist
-        test(function () {
-            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
-            if (service.characteristics.length > 0) {
-                characteristic = service.characteristics[0];
-                check_method_exists(characteristic, "removeValueChangeListener");
-            };
-        }, "BluetoothGATTCharacteristic_removeValueChangeListener_exist");
-
-        //BluetoothGATTCharacteristic_writeValue
-        test(function () {
-            var retVal, characteristic, descriptor, i, j, conversionTable, exceptionName;
-            var data = data = new Array(1, 2, 3, 4, 5, 6);
-            var service = storedDevice.getService(storedDevice.uuids[0]);
-            if (service.characteristics.length > 0) {
-                for(i = 0; i < service.characteristics.length; i++) {
-                    if(service.characteristics[i].isWritable == true) {
-                        characteristic = service.characteristics[i];
-                        retVal = characteristic.writeValue(data);
-                        assert_equals(retVal, undefined, "writeValue should return undefined");
-                    }
-                }
-            };
-        }, "BluetoothGATTCharacteristic_writeValue");
-
-        //BluetoothGATTCharacteristic_writeValue_data_TypeMismatch
-        test(function () {
-            var WriteValueSuccessCallback, incorrectData, characteristic, descriptor, i, j, conversionTable, exceptionName;
-            WriteValueSuccessCallback = function () {
-                assert_unreached("Method writeValue shouldn't end successfully. Given incorrect data.");
-            };
-            var service = storedDevice.getService(storedDevice.uuids[0]);
-            if (service.characteristics.length > 0) {
-                for(j = 0; j < service.characteristics.length; j++) {
-                    if(service.characteristics[j].isWritable == true) {
-                        characteristic = service.characteristics[j];
-                        conversionTable = getTypeConversionExceptions("array", false);
-                        for (i = 0; i < conversionTable.length; i++) {
-                            incorrectData = conversionTable[i][0];
-                            exceptionName = conversionTable[i][1];
-
-                            assert_throws({name: exceptionName},
-                                function () {
-                                    characteristic.writeValue(incorrectData, WriteValueSuccessCallback);
-                            }, "Given incorrect characteristic data.");
-                        }
-                    }
-                }
-            };
-        }, "BluetoothGATTCharacteristic_writeValue_data_TypeMismatch");
-
-        //BluetoothGATTCharacteristic_writeValue_errorCallback_TypeMismatch
-        test(function () {
-            var characteristic, descriptor, i, j, conversionTable, exceptionName;
-            var WriteValueSuccessCallback = function () {
-                assert_unreached("Method writeValue shouldn't end successfully. Given incorrect errorCallback.");
-            };
-
-            var data = new Array(1, 2, 3, 4, 5, 6)
-            var service = storedDevice.getService(storedDevice.uuids[0]);
-            if (service.characteristics.length > 0) {
-                for(j = 0; j < service.characteristics.length; j++) {
-                    if(service.characteristics[j].isWritable == true) {
-                        characteristic = service.characteristics[j];
-                        conversionTable = getTypeConversionExceptions("functionObject", true);
-                        for (i = 0; i < conversionTable.length; i++) {
-                            var errorCallback = conversionTable[i][0];
-                            var exceptionName = conversionTable[i][1];
-
-                            assert_throws({name: exceptionName},
-                                function () {
-                                    characteristic.writeValue(data, WriteValueSuccessCallback, errorCallback);
-                                }, "Given incorrect errorCallback.");
-                        }
-                    }
-                }
-            };
-        }, "BluetoothGATTCharacteristic_writeValue_errorCallback_TypeMismatch");
-
-        //BluetoothGATTCharacteristic_writeValue_errorCallback_invalid_cb
-        test(function () {
-            var WriteValueSuccessCallback, invaliderrorCallback, data = new Array(1, 2, 3, 4, 5, 6), characteristic, descriptor, i, j, conversionTable, exceptionName;
-            WriteValueSuccessCallback = function () {
-                assert_unreached("Method writeValue shouldn't end successfully.");
-            };
-
-            invaliderrorCallback = {
-                onerror: function (error) {
-                    assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
-                }
-            };
-            var service = storedDevice.getService(storedDevice.uuids[0]);
-            if (service.characteristics.length > 0) {
-                for(i = 0; i < service.characteristics.length; i++) {
-                    if(service.characteristics[i].isWritable == true) {
-                        characteristic = service.characteristics[i];
-                        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
-                            characteristic.writeValue(data, WriteValueSuccessCallback, invaliderrorCallback);
-                        }, "TypeMismatchError" + " should be thrown - given invalid error callback.");
-                    }
-                }
-            };
-        }, "BluetoothGATTCharacteristic_writeValue_errorCallback_invalid_cb");
-
-        //BluetoothGATTCharacteristic_writeValue_exist
-        test(function () {
-            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
-            if (service.characteristics.length > 0) {
-                for(i = 0; i < service.characteristics.length; i++) {
-                    if(service.characteristics[i].isWritable == true) {
-                        characteristic = service.characteristics[i];
-                        check_method_exists(characteristic, "writeValue");
-                    }
-                }
-            };
-        }, "BluetoothGATTCharacteristic_writeValue_exist");
-
-        //BluetoothGATTCharacteristic_writeValue_noarg
-        test(function () {
-            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
-            if (service.characteristics.length > 0) {
-                for(i = 0; i < service.characteristics.length; i++) {
-                    if(service.characteristics[i].isWritable == true) {
-                        characteristic = service.characteristics[i];
-                        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
-                            characteristic.writeValue();
-                        }, "TypeMismatchError" + " should be thrown - given no parameter.");
-                    }
-                }
-            };
-        }, "BluetoothGATTCharacteristic_writeValue_noarg");
-
-        //BluetoothGATTCharacteristic_writeValue_successCallback_TypeMismatch
-        test(function () {
-            var data = new Array(1, 2, 3, 4, 5, 6), successCallback, exceptionName, characteristic, descriptor, i, j, conversionTable, exceptionName;
-            var service = storedDevice.getService(storedDevice.uuids[0]);
-            if (service.characteristics.length > 0) {
-                for(j = 0; j < service.characteristics.length; j++) {
-                    if(service.characteristics[j].isWritable == true) {
-                        characteristic = service.characteristics[j];
-                        conversionTable = getTypeConversionExceptions("functionObject", true);
-                        for (i = 0; i < conversionTable.length; i++) {
-                            successCallback = conversionTable[i][0];
-                            exceptionName = conversionTable[i][1];
-
-                            assert_throws({name: exceptionName},
-                                function () {
-                                    characteristic.writeValue(data, successCallback);
-                                }, "Given incorrect successCallback.");
-                        }
-                    }
-                }
-            };
-        }, "BluetoothGATTCharacteristic_writeValue_successCallback_TypeMismatch");
-
-        //BluetoothGATTCharacteristic_writeValue_successCallback_invalid_cb
-        test(function () {
-            var characteristic, descriptor, i, j, conversionTable, exceptionName;
-            var invalidSuccessCallback = {
-                onsuccess: function() {
-                    assert_unreached("Invalid successCallback invoked.");
-                }
-            }
-            var data = new Array(1, 2, 3, 4, 5, 6);
-            var service = storedDevice.getService(storedDevice.uuids[0]);
-            if (service.characteristics.length > 0) {
-                for(i = 0; i < service.characteristics.length; i++) {
-                    if(service.characteristics[i].isWritable == true) {
-                        characteristic = service.characteristics[i];
-                        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
-                            characteristic.writeValue(data, invalidSuccessCallback);
-                        }, "TypeMismatchError" + " should be thrown - given invalid success callback.");
-                    }
-                }
-            };
-        }, "BluetoothGATTCharacteristic_writeValue_successCallback_invalid_cb");
-
-
-
-        //BluetoothGATTDescriptor_readValue_errorCallback_TypeMismatch
-        test(function () {
-            var conversionTable = getTypeConversionExceptions("functionObject", true), characteristic, descriptor, i, j, conversionTable, exceptionName;
-
-            var ReadValueSuccessCallback = function (value) {
-                assert_unreached("readValue() success callback should not be invoked.");
-            };
-
-            var service = storedDevice.getService(storedDevice.uuids[0]);
-            for (j = 0; j < service.characteristics.length; j++) {
-                var characteristic = service.characteristics[j];
-                if (characteristic != undefined) {
-                    var descriptor = characteristic.descriptors[0];
-                    if (descriptor != undefined) {
-                        for (i = 0; i < conversionTable.length; i++) {
-                            ReadValueErrorCallback = conversionTable[i][0];
-                            exceptionName = conversionTable[i][1];
-                            assert_throws({name: exceptionName},
-                                function () {
-                                    descriptor.readValue(ReadValueSuccessCallback, ReadValueErrorCallback);
-                                }, "Given incorrect error callback.");
-                        }
-                    }
-                }
-            }
-        }, "BluetoothGATTDescriptor_readValue_errorCallback_TypeMismatch");
-
-        //BluetoothGATTDescriptor_readValue_errorCallback_invalid_cb
-        test(function () {
-            var characteristic, descriptor, i, j, conversionTable, exceptionName;
-            var ReadValueSuccessCallback = function (value) {
-                assert_unreached("readValue() success callback should not be invoked.");
-            };
-
-            var incorrectCallback = {
-                onerror: function (error) {
-                    assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
-                }
-            };
-            var service = storedDevice.getService(storedDevice.uuids[0]);
-            for (i = 0; i < service.characteristics.length; i++) {
-                characteristic = service.characteristics[i];
-                if (characteristic != undefined) {
-                    descriptor = characteristic.descriptors[0];
-                    if (descriptor != undefined) {
-                        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
-                            descriptor.readValue(ReadValueSuccessCallback, incorrectCallback);
-                        }, "Given incorrect errorCallback.");
-                    }
-                }
-            }
-        }, "BluetoothGATTDescriptor_readValue_errorCallback_invalid_cb");
-
-        //BluetoothGATTDescriptor_readValue_exist
-        test(function () {
-            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
-            for (i = 0; i < service.characteristics.length; i++) {
-                characteristic = service.characteristics[i];
-                if (characteristic != undefined) {
-                    descriptor = characteristic.descriptors[0];
-                    if (descriptor != undefined) {
-                        check_method_exists(descriptor, "readValue");
-                    }
-                }
-            }
-        }, "BluetoothGATTDescriptor_readValue_exist");
-
-        //BluetoothGATTDescriptor_readValue_misarg
-        test(function () {
-            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
-            for (i = 0; i < service.characteristics.length; i++) {
-                characteristic = service.characteristics[i];
-                if (characteristic != undefined) {
-                    descriptor = characteristic.descriptors[0];
-                    if (descriptor != undefined) {
-                        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
-                            descriptor.readValue();
-                        }, "Invoked with missing non-optional arguments.");
-                    }
-                }
-            }
-        }, "BluetoothGATTDescriptor_readValue_misarg");
-
-        //BluetoothGATTDescriptor_readValue_successCallback_TypeMismatch
-        test(function () {
-            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
-            conversionTable = getTypeConversionExceptions("functionObject", true);
-            for (j = 0; j < service.characteristics.length; j++) {
-                characteristic = service.characteristics[j];
-                if (characteristic != undefined) {
-                    descriptor = characteristic.descriptors[0];
-                    if (descriptor != undefined) {
-                        for (i = 0; i < conversionTable.length; i++) {
-                            var ReadValueSuccessCallback = conversionTable[i][0];
-                            exceptionName = conversionTable[i][1];
-                            assert_throws({name: exceptionName},
-                                function () {
-                                    descriptor.readValue(ReadValueSuccessCallback);
-                                }, "Given incorrect success callback.");
-                        }
-                    }
-                }
-            };
-        }, "BluetoothGATTDescriptor_readValue_successCallback_TypeMismatch");
-
-        //BluetoothGATTDescriptor_readValue_successCallback_invalid_cb
-        test(function () {
-            var characteristic, descriptor, i, j, conversionTable, exceptionName;
-            var incorrectCallback = {
-                onread: function (value) {
-                    assert_unreached("Invalid successcallback invoked");
-                }
-            };
-            var service = storedDevice.getService(storedDevice.uuids[0]);
-            for (i = 0; i < service.characteristics.length; i++) {
-                characteristic = service.characteristics[i];
-                if (characteristic != undefined) {
-                    descriptor = characteristic.descriptors[0];
-                    if (descriptor != undefined) {
-                        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
-                            descriptor.readValue(incorrectCallback);
-                        }, "Given incorrect successCallback.");
-                    }
-                }
-            }
-        }, "BluetoothGATTDescriptor_readValue_successCallback_invalid_cb");
-
-        //BluetoothGATTDescriptor_writeValue
-        test(function () {
-            var data = new Array(1, 2, 3, 4, 5, 6), retVal, characteristic, descriptor, i, j, conversionTable, exceptionName;
-            var service = storedDevice.getService(storedDevice.uuids[0]);
-            for (i = 0; i < service.characteristics.length; i++) {
-                characteristic = service.characteristics[i];
-                if (characteristic != undefined) {
-                    descriptor = characteristic.descriptors[0];
-                    if (descriptor != undefined) {
-                        retVal = descriptor.writeValue(data);
-                        assert_equals(retVal, undefined, "writeValue should return undefined");
-                    }
-                }
-            };
-        }, "BluetoothGATTDescriptor_writeValue");
-
-        //BluetoothGATTDescriptor_writeValue_errorCallback_TypeMismatch
-        test(function () {
-            var data = new Array(1, 2, 3, 4, 5, 6), characteristic, descriptor, i, j, conversionTable, exceptionName;
-            var conversionTable = getTypeConversionExceptions("functionObject", true);
-            var WriteValueSuccessCallback = function (value) {
-                assert_unreached("writeValue() success callback should not be invoked.");
-            };
-            var WriteValueErrorCallback;
-            var service = storedDevice.getService(storedDevice.uuids[0]);
-            for (j = 0; j < service.characteristics.length; j++) {
-                characteristic = service.characteristics[j];
-                if (characteristic != undefined) {
-                    descriptor = characteristic.descriptors[0];
-                    if (descriptor != undefined) {
-                        for (i = 0; i < conversionTable.length; i++) {
-                            WriteValueErrorCallback = conversionTable[i][0];
-                            exceptionName = conversionTable[i][1];
-                            assert_throws({name: exceptionName},
-                                function () {
-                                    descriptor.writeValue(data, WriteValueSuccessCallback, WriteValueErrorCallback);
-                                }, "Given incorrect error callback.");
-                        }
-                    }
-                }
-            }
-        }, "BluetoothGATTDescriptor_writeValue_errorCallback_TypeMismatch");
-
-        //BluetoothGATTDescriptor_writeValue_errorCallback_invalid_cb
-        test(function () {
-            var data = new Array(1, 2, 3, 4, 5, 6), characteristic, descriptor, i, j, conversionTable, exceptionName;
-            var WriteValueSuccessCallback = function () {
-                assert_unreached("writeValue() success callback should not be invoked.");
-            };
-
-            var incorrectCallback = {
-                onerror: function (error) {
-                    assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
-                }
-            };
-            var service = storedDevice.getService(storedDevice.uuids[0]);
-            for (i = 0; i < service.characteristics.length; i++) {
-                characteristic = service.characteristics[i];
-                if (characteristic != undefined) {
-                    descriptor = characteristic.descriptors[0];
-                    if (descriptor != undefined) {
-                        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
-                            descriptor.writeValue(data, WriteValueSuccessCallback, incorrectCallback);
-                        }, "Given incorrect errorCallback.");
-                    }
-                }
-            }
-        }, "BluetoothGATTDescriptor_writeValue_errorCallback_invalid_cb");
-
-        //BluetoothGATTDescriptor_writeValue_exist
-        test(function () {
-            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
-            for (i = 0; i < service.characteristics.length; i++) {
-                characteristic = service.characteristics[i];
-                if (characteristic != undefined) {
-                    descriptor = characteristic.descriptors[0];
-                    if (descriptor != undefined) {
-                        check_method_exists(descriptor, "writeValue");
-                    }
-                }
-            }
-        }, "BluetoothGATTDescriptor_writeValue_exist");
-        //BluetoothGATTDescriptor_writeValue_misarg
-        test(function () {
-            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
-            for (i = 0; i < service.characteristics.length; i++) {
-                characteristic = service.characteristics[i];
-                if (characteristic != undefined) {
-                    descriptor = characteristic.descriptors[0];
-                    if (descriptor != undefined) {
-                        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
-                            descriptor.writeValue();
-                        }, "Invoked with missing non-optional arguments.");
-                    }
-                }
-            }
-        }, "BluetoothGATTDescriptor_writeValue_misarg");
-
-        //BluetoothGATTDescriptor_writeValue_value_TypeMismatch
-        test(function () {
-            var data, characteristic, descriptor, i, j, exceptionName;
-            var conversionTable = getTypeConversionExceptions("array", true);
-            var service = storedDevice.getService(storedDevice.uuids[0]);
-                for (j = 0; j < service.characteristics.length; j++) {
-                characteristic = service.characteristics[j];
-                    if (characteristic != undefined) {
-                        descriptor = characteristic.descriptors[0];
-                        if (descriptor != undefined) {
-                            for (i = 0; i < conversionTable.length; i++) {
-                                data = conversionTable[i][0];
-                                exceptionName = conversionTable[i][1];
-                                assert_throws({name: exceptionName},
-                                    function () {
-                                        descriptor.writeValue(data);
-                                    }, "Given incorrect value.");
-                            }
-                        }
-                    }
-                }
-        }, "BluetoothGATTDescriptor_writeValue_value_TypeMismatch");
-
-
-        //BluetoothGATTDescriptor_writeValue_successCallback_TypeMismatch
-        test(function () {
-            var data = new Array(1, 2, 3, 4, 5, 6), i, characteristic, descriptor, i, j, conversionTable, exceptionName;
-            var service = storedDevice.getService(storedDevice.uuids[0]);
-            conversionTable = getTypeConversionExceptions("functionObject", true);
-            for (j = 0; j < service.characteristics.length; j++) {
-                var characteristic = service.characteristics[j];
-                if (characteristic != undefined) {
-                    var descriptor = characteristic.descriptors[0];
-                    if (descriptor != undefined) {
-                        for (i = 0; i < conversionTable.length; i++) {
-                            var WriteValueSuccessCallback = conversionTable[i][0];
-                            exceptionName = conversionTable[i][1];
-                            assert_throws({name: exceptionName},
-                                function () {
-                                    descriptor.writeValue(data, WriteValueSuccessCallback);
-                                }, "Given incorrect success callback.");
-                        }
-                    }
-                }
-            }
-        }, "BluetoothGATTDescriptor_writeValue_successCallback_TypeMismatch");
-
-
-        //BluetoothGATTDescriptor_writeValue_successCallback_invalid_cb
-        test(function () {
-            incorrectCallback = {
-                onsuccess: function () {
-                    assert_unreached("Invalid successcallback invoked");
-                }
-            };
-            var data = new Array(1, 2, 3, 4, 5, 6), i, characteristic, descriptor, i, j, conversionTable, exceptionName;
-            var service = storedDevice.getService(storedDevice.uuids[0]);
-            for (i = 0; i < service.characteristics.length; i++) {
-                var characteristic = service.characteristics[i];
-                if (characteristic != undefined) {
-                    var descriptor = characteristic.descriptors[0];
-                    if (descriptor != undefined) {
-                        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
-                            descriptor.writeValue(data, incorrectCallback);
-                        }, "Given incorrect successCallback.");
-                        break;
-                    }
-                }
-            }
-        }, "BluetoothGATTDescriptor_writeValue_successCallback_invalid_cb");
-
-
-        //BluetoothGATTService_characteristics_attribute
-        test(function () {
-            var tmp, characteristic, descriptor, i, j, conversionTable, exceptionName;
-            var service = storedDevice.getService(storedDevice.uuids[0]);
-            assert_own_property(service, "characteristics", "BluetoothGATTService does not own characteristics property.");
-            assert_type(service.characteristics, "array", "characteristics should be an array");
-            service.characteristics = tmp;
-            assert_not_equals(service.characteristics, tmp, "characteristics should not be modified");
-        }, "BluetoothGATTService_characteristics_attribute");
-
-        //BluetoothGATTService_serviceUuid_attribute
-        test(function () {
-            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
-            check_readonly(service, "serviceUuid", service.serviceUuid, "string", service.serviceUuid+"Tizen");
-        }, "BluetoothGATTService_serviceUuid_attribute");
-
-        //BluetoothGATTService_services_attribute
-        test(function () {
-            var tmp, characteristic, descriptor, i, j, conversionTable, exceptionName;
-            var service = storedDevice.getService(storedDevice.uuids[0]);
-            assert_own_property(service, "services", "BluetoothGATTService does not own services property.");
-            assert_type(service.services, "array", "services should be an array");
-            service.services = tmp;
-            assert_not_equals(service.services, tmp, "services should not be modified");
-        }, "BluetoothGATTService_services_attribute");
-
-
-        // All "*extend" tests should be at the end of package. There are only
-        // tests which can affect tests (though they do not - but if new tests
-        // will be added, they should go before these)
-
-        setTimeout(function(){
-        //BluetoothGATTDescriptor_extend
-        test(function () {
-            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
-            for (i = 0; i < service.characteristics.length; i++) {
-                characteristic = service.characteristics[i];
-                if (characteristic != undefined) {
-                    descriptor = characteristic.descriptors[0];
-                    if (descriptor != undefined) {
-                        check_extensibility(descriptor);
-                    }
-                }
-            }
-        }, "BluetoothGATTDescriptor_extend");
-
-        //BluetoothGATTCharacteristic_extend
-        test(function () {
-            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
-            if (service.characteristics.length > 0) {
-                characteristic = service.characteristics[0];
-                check_extensibility(characteristic);
-            };
-        }, "BluetoothGATTCharacteristic_extend");
-
-                storedDevice.disconnect();
-                t.done();}
-            , 5000);
-    });
-    onError = t.step_func(function (e) {
-        var errorMessage = "Failed to connect to device: " + e.message + "; try again";
-        assert_unreached(errorMessage);
-    })
-
-    proccessDevice = t.step_func(function (device)
-    {
-        adapter.stopScan();
-        device.connect(onConnected, onError);
-    })
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(function onsuccess(device) {
-        if (device.address == REMOTE_BLE_DEVICE_ADDRESS)
-        {
-            console.log("Found device: " + device.name);
-            storedDevice=device;
-            proccessDevice(storedDevice);
-        }
-    });
-});
-
-
-
-
-
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2017 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+        Michal Bistyga <m.bistyga@samsung.com>\r
+    Xiaoyan Qian <xy.qian@samsung.com>\r
+    Qunfang Lin <qunfang.lin@samsung.com>\r
+    Lei Tang <lei312.tang@samsung.com>\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCombined</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCombined\r
+//==== LABEL Check BluetoothDevice attributes and functions\r
+//==== EXECUTION_TYPE manual\r
+//==== PRIORITY P3\r
+//==== ONLOAD_DELAY 180\r
+//==== STEP several tests executed from base test\r
+//==== EXPECT all subtests should be successful\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:addValueChangeListener M\r
+//==== TEST_CRITERIA ME\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:descriptors A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:BluetoothGATTCharacteristic U\r
+//==== TEST_CRITERIA OBX\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:hasExtendedProperties A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isBroadcast A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isIndication A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isNotify A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isReadable A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isSignedWrite A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isWritable A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isWriteNoResponse A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M\r
+//==== TEST_CRITERIA MMINA MR\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M\r
+//==== TEST_CRITERIA MTCB\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M\r
+//==== TEST_CRITERIA ME\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M\r
+//==== TEST_CRITERIA MMA\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M\r
+//==== TEST_CRITERIA MTCB\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M\r
+//==== TEST_CRITERIA MOA MR\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:removeValueChangeListener M\r
+//==== TEST_CRITERIA MR\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:removeValueChangeListener M\r
+//==== TEST_CRITERIA ME\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== TEST_CRITERIA MMINA MR\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== TEST_CRITERIA MTCB\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== TEST_CRITERIA ME\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== TEST_CRITERIA MMA\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== TEST_CRITERIA MTCB\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== TEST_CRITERIA MOA MR MAST\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:BluetoothGATTDescriptor U\r
+//==== TEST_CRITERIA OBX\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M\r
+//==== TEST_CRITERIA MR MMINA\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M\r
+//==== TEST_CRITERIA MTCB\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M\r
+//==== TEST_CRITERIA ME\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M\r
+//==== TEST_CRITERIA MMA\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M\r
+//==== TEST_CRITERIA MTCB\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M\r
+//==== TEST_CRITERIA MOA MR\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M\r
+//==== TEST_CRITERIA MR MMINA\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M\r
+//==== TEST_CRITERIA MTCB\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M\r
+//==== TEST_CRITERIA ME\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M\r
+//==== TEST_CRITERIA MMA\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:ReadValueSuccessCallback:onread M\r
+//==== TEST_CRITERIA CBOA CBT\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M\r
+//==== TEST_CRITERIA MTCB\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTService:characteristics A\r
+//==== TEST_CRITERIA  AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTService:uuid A\r
+//==== TEST_CRITERIA  AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTService:services A\r
+//==== TEST_CRITERIA  AE AT ARO\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), storedDevice, onConnected, onError, proccessDevice, adapter;\r
+\r
+t.step(function () {\r
+    onConnected = t.step_func(function () {\r
+\r
+        function sleep(ms) {\r
+            var start = new Date().getTime();\r
+            for (var i = 0; i < 1e7; i++) {\r
+                if ((new Date().getTime() - start) > ms){\r
+                    break;\r
+                }\r
+            }\r
+        }\r
+        //BluetoothGATTCharacteristic_writeValue_with_errorCallback\r
+        var inner3 = async_test("BluetoothGATTCharacteristic_writeValue_with_errorCallback", {timeout: 60000});\r
+        inner3.step(function () {\r
+            var value, data = new Array(1, 2, 3, 4, 5, 6), charFlag = false, retVal, characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+\r
+            var WriteValueSuccessCallback = inner3.step_func(function (value) {\r
+                assert_equals(retVal, undefined, "writeValue should return undefined");\r
+                inner3.done();\r
+            });\r
+\r
+            var WriteValueErrorCallback = inner3.step_func(function (error) {\r
+                assert_unreached("writeValue() error callback was invoked: " + error.name + " msg: " + error.message);\r
+            });\r
+\r
+            var service = storedDevice.getService(storedDevice.uuids[0]);\r
+            if (service.characteristics.length > 0) {\r
+                for(i = 0; i < service.characteristics.length; i++) {\r
+                    if(service.characteristics[i].isWritable == true && charFlag == false) {\r
+                        charFlag = true;\r
+                        characteristic = service.characteristics[i];\r
+                        retVal = characteristic.writeValue(data, WriteValueSuccessCallback, WriteValueErrorCallback);\r
+                    }\r
+                }\r
+            }\r
+        });\r
+        sleep(2000)\r
+\r
+        //BluetoothGATTCharacteristic_readValue\r
+        var inner = async_test("BluetoothGATTCharacteristic_readValue", {timeout: 60000});\r
+        inner.step(function () {\r
+            var retVal, errorCallback, ReadValueSuccessCallback, characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            ReadValueSuccessCallback = inner.step_func(function (value) {\r
+                assert_equals(retVal, undefined, "readValue should return undefined");\r
+                inner.done();\r
+                });\r
+\r
+            var descFlag = false;\r
+            var service = storedDevice.getService(storedDevice.uuids[0]);\r
+            for (i = 0; i < service.characteristics.length; i++) {\r
+                var characteristic = service.characteristics[i];\r
+                if (descFlag == false && characteristic != undefined && characteristic.isReadable == true) {\r
+                    retVal = characteristic.readValue(ReadValueSuccessCallback);\r
+                    descFlag = true;\r
+                }\r
+            };\r
+        });\r
+        sleep(2000)\r
+\r
+        //BluetoothGATTCharacteristic_readValue_with_errorCallback\r
+        var inner2 = async_test("BluetoothGATTCharacteristic_readValue_with_errorCallback", {timeout: 60000});\r
+        inner2.step(function () {\r
+\r
+            var retVal, errorCallback, ReadValueSuccessCallback, characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            errorCallback = inner2.step_func(function (error) {\r
+                assert_unreached("readValue() error callback was invoked: " + error.name + " msg: " + error.message);\r
+            });\r
+\r
+            ReadValueSuccessCallback = inner2.step_func(function (value) {\r
+                assert_equals(retVal, undefined, "readValue should return undefined");\r
+                inner2.done();\r
+            });\r
+\r
+            var service = storedDevice.getService(storedDevice.uuids[0]);\r
+            if (service.characteristics.length > 0) {\r
+                var charFlag=false;\r
+                for(i = 0; i < service.characteristics.length; i++) {\r
+                    characteristic = service.characteristics[i];\r
+                    if(charFlag == false && characteristic != undefined && characteristic.isReadable == true) {\r
+                        charFlag = true;\r
+                        retVal = characteristic.readValue(ReadValueSuccessCallback, errorCallback);\r
+                    }\r
+                }\r
+            }\r
+        });\r
+        sleep(2000)\r
+\r
+        //BluetoothGATTDescriptor_readValue\r
+        var inner4 = async_test("BluetoothGATTDescriptor_readValue", {timeout: 60000});\r
+        inner4.step(function () {\r
+            var retVal, errorCallback, ReadValueSuccessCallback, characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            ReadValueSuccessCallback = inner4.step_func(function (value) {\r
+                assert_equals(retVal, undefined, "readValue should return undefined");\r
+                inner4.done();\r
+            });\r
+\r
+            var service = storedDevice.getService(storedDevice.uuids[0]);\r
+            for (i = 0; i < service.characteristics.length; i++) {\r
+                characteristic = service.characteristics[i];\r
+                if (characteristic != undefined) {\r
+                    descriptor = characteristic.descriptors[0];\r
+                    if (descriptor != undefined) {\r
+                        retVal = descriptor.readValue(ReadValueSuccessCallback);\r
+                    }\r
+                }\r
+            }\r
+        });\r
+        sleep(2000)\r
+\r
+        //BluetoothGATTDescriptor_readValue_with_errorCallback\r
+        var inner5 = async_test("BluetoothGATTDescriptor_readValue_with_errorCallback", {timeout: 60000});\r
+        inner5.step(function () {\r
+            var retVal, errorCallback, ReadValueSuccessCallback, characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            ReadValueSuccessCallback = inner5.step_func(function (value) {\r
+                assert_equals(retVal, undefined, "readValue should return undefined");\r
+                inner5.done();\r
+                });\r
+            ReadValueErrorCallback = inner5.step_func(function (error) {\r
+                assert_unreached("readValue() error callback was invoked: " + error.name + " msg: " + error.message);\r
+            });\r
+\r
+            var service = storedDevice.getService(storedDevice.uuids[0]);\r
+            var descFlag = false;\r
+            for (i = 0; i < service.characteristics.length; i++) {\r
+                characteristic = service.characteristics[i];\r
+                if (characteristic != undefined) {\r
+                    descriptor = characteristic.descriptors[0];\r
+                    if (descFlag == false && descriptor != undefined) {\r
+                        descFlag = true;\r
+                        retVal = descriptor.readValue(ReadValueSuccessCallback, ReadValueErrorCallback);\r
+                    }\r
+                }\r
+            }\r
+        });\r
+        sleep(2000)\r
+\r
+        //ReadValueSuccessCallback_onread\r
+        var inner6 = async_test("ReadValueSuccessCallback_onread", {timeout: 60000});\r
+        inner6.step(function () {\r
+            var retVal, errorCallback, ReadValueSuccessCallback, characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            ReadValueSuccessCallback = inner6.step_func(function (value) {\r
+                assert_type(value, "array", "foundDevice isn't an array");\r
+                inner6.done();\r
+            });\r
+            ReadValueErrorCallback = inner6.step_func(function (error) {\r
+                assert_unreached("readValue() error callback was invoked: " + error.name + " msg: " + error.message);\r
+            });\r
+            var service = storedDevice.getService(storedDevice.uuids[0]);\r
+            var descFlag =false;\r
+            for (i = 0; i < service.characteristics.length; i++) {\r
+                characteristic = service.characteristics[i];\r
+                if (descFlag==false && characteristic != undefined) {\r
+                    characteristic.readValue(ReadValueSuccessCallback, ReadValueErrorCallback);\r
+                    descFlag = true;\r
+                }\r
+            }\r
+        });\r
+        sleep(2000)\r
+\r
+        // BluetoothGATTCharacteristic_addValueChangeListener_exist\r
+        test(function () {\r
+            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            if (service.characteristics.length > 0) {\r
+                characteristic = service.characteristics[0];\r
+                check_method_exists(characteristic, "addValueChangeListener");\r
+            };\r
+        }, "BluetoothGATTCharacteristic_addValueChangeListener_exist");\r
+\r
+        // BluetoothGATTCharacteristic_descriptors_attribute\r
+        test(function () {\r
+            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            if (service.characteristics.length > 0) {\r
+                characteristic = service.characteristics[0];\r
+                assert_true("descriptors" in characteristic, "Name descriptors doesn't exist in provided object.");\r
+                assert_type(characteristic.descriptors, "array", "Type of descriptors is different.");\r
+                origin = characteristic.descriptors[0];\r
+                characteristic.descriptors[0] = "invalidValue";\r
+                assert_equals(characteristic.descriptors[0], origin, "descriptor is readonly, but its writable.");\r
+            };\r
+        }, "BluetoothGATTCharacteristic_descriptors_attribute");\r
+\r
+        //BluetoothGATTCharacteristic_hasExtendedProperties_attribute\r
+        test(function () {\r
+            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            if (service.characteristics.length > 0) {\r
+                characteristic = service.characteristics[0];\r
+                check_readonly(characteristic, "hasExtendedProperties", characteristic.hasExtendedProperties, "boolean", !(characteristic.hasExtendedProperties));\r
+            };\r
+        }, "BluetoothGATTCharacteristic_hasExtendedProperties_attribute");\r
+\r
+        //BluetoothGATTCharacteristic_isBroadcast_attribute\r
+        test(function () {\r
+            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            if (service.characteristics.length > 0) {\r
+                characteristic = service.characteristics[0];\r
+                check_readonly(characteristic, "isBroadcast", characteristic.isBroadcast, "boolean", !(characteristic.isBroadcast));\r
+            };\r
+        }, "BluetoothGATTCharacteristic_isBroadcast_attribute");\r
+\r
+        //BluetoothGATTCharacteristic_isIndication_attribute\r
+        test(function () {\r
+            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            if (service.characteristics.length > 0) {\r
+                characteristic = service.characteristics[0];\r
+                check_readonly(characteristic, "isIndication", characteristic.isIndication, "boolean", !(characteristic.isIndication));\r
+            };\r
+        }, "BluetoothGATTCharacteristic_isIndication_attribute");\r
+\r
+        //BluetoothGATTCharacteristic_isNotify_attribute\r
+        test(function () {\r
+            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            if (service.characteristics.length > 0) {\r
+                characteristic = service.characteristics[0];\r
+                check_readonly(characteristic, "isNotify", characteristic.isNotify, "boolean", !(characteristic.isNotify));\r
+            };\r
+        }, "BluetoothGATTCharacteristic_isNotify_attribute");\r
+\r
+        //BluetoothGATTCharacteristic_isReadable_attribute\r
+        test(function () {\r
+            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            if (service.characteristics.length > 0) {\r
+                characteristic = service.characteristics[0];\r
+                check_readonly(characteristic, "isReadable", characteristic.isReadable, "boolean", !(characteristic.isReadable));\r
+            };\r
+        }, "BluetoothGATTCharacteristic_isReadable_attribute");\r
+\r
+        //BluetoothGATTCharacteristic_isSignedWrite_attribute\r
+        test(function () {\r
+            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            if (service.characteristics.length > 0) {\r
+                characteristic = service.characteristics[0];\r
+                check_readonly(characteristic, "isSignedWrite", characteristic.isSignedWrite, "boolean", !(characteristic.isSignedWrite));\r
+            };\r
+        }, "BluetoothGATTCharacteristic_isSignedWrite_attribute");\r
+\r
+        //BluetoothGATTCharacteristic_isWritable_attribute\r
+        test(function () {\r
+            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            if (service.characteristics.length > 0) {\r
+                characteristic = service.characteristics[0];\r
+                check_readonly(characteristic, "isWritable", characteristic.isWritable, "boolean", !(characteristic.isWritable));\r
+            };\r
+        }, "BluetoothGATTCharacteristic_isWritable_attribute");\r
+\r
+        //BluetoothGATTCharacteristic_isWriteNoResponse_attribute\r
+        test(function () {\r
+            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            if (service.characteristics.length > 0) {\r
+                characteristic = service.characteristics[0];\r
+                check_readonly(characteristic, "isWriteNoResponse", characteristic.isWriteNoResponse, "boolean", !(characteristic.isWriteNoResponse));\r
+            };\r
+        }, "BluetoothGATTCharacteristic_isWriteNoResponse_attribute");\r
+\r
+        //BluetoothGATTCharacteristic_readValue_errorCallback_TypeMismatch\r
+        test(function () {\r
+            var errorCallback, ReadValueSuccessCallback, characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            ReadValueSuccessCallback = function (value) {\r
+                assert_unreached("Method readValue shouldn't end successfully. Given incorrect errorCallback.");\r
+            };\r
+            var service = storedDevice.getService(storedDevice.uuids[0]);\r
+            if (service.characteristics.length > 0) {\r
+                for(j = 0; j < service.characteristics.length; j++) {\r
+                    if(service.characteristics[j].isReadable == true) {\r
+                        characteristic = service.characteristics[j];\r
+                        conversionTable = getTypeConversionExceptions("functionObject", true);\r
+                        for (i = 0; i < conversionTable.length; i++) {\r
+                            errorCallback = conversionTable[i][0];\r
+                            exceptionName = conversionTable[i][1];\r
+                            assert_throws({name: exceptionName},\r
+                                function () {\r
+                                characteristic.readValue(ReadValueSuccessCallback, errorCallback);\r
+                                }, "Given incorrect errorCallback.");\r
+                        }\r
+                    }\r
+                }\r
+            };\r
+        }, "BluetoothGATTCharacteristic_readValue_errorCallback_TypeMismatch");\r
+\r
+        //BluetoothGATTCharacteristic_readValue_errorCallback_invalid_cb\r
+        test(function () {\r
+            var characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            var ReadValueSuccessCallback = function (value) {\r
+                assert_unreached("Method readValue shouldn't end successfully.");\r
+            };\r
+\r
+            var invaliderrorCallback = {\r
+                onerror: function (error) {\r
+                    assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);\r
+                }\r
+            };\r
+            var service = storedDevice.getService(storedDevice.uuids[0]);\r
+            if (service.characteristics.length > 0) {\r
+                for(i = 0; i < service.characteristics.length; i++) {\r
+                    if(service.characteristics[i].isReadable == true) {\r
+                        characteristic = service.characteristics[i];\r
+                        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+                            characteristic.readValue(ReadValueSuccessCallback, invaliderrorCallback);\r
+                        }, "TypeMismatchError" + " should be thrown - given invalid error callback.");\r
+                    }\r
+                }\r
+            };\r
+        }, "BluetoothGATTCharacteristic_readValue_errorCallback_invalid_cb");\r
+\r
+        //BluetoothGATTCharacteristic_readValue_exist\r
+        test(function () {\r
+            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            if (service.characteristics.length > 0) {\r
+                for(i = 0; i < service.characteristics.length; i++) {\r
+                    if(service.characteristics[i].isReadable == true) {\r
+                        characteristic = service.characteristics[i];\r
+                        check_method_exists(characteristic, "readValue");\r
+                    }\r
+                }\r
+            };\r
+        }, "BluetoothGATTCharacteristic_readValue_exist");\r
+\r
+        //BluetoothGATTCharacteristic_readValue_noarg\r
+        test(function () {\r
+            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            if (service.characteristics.length > 0) {\r
+                for(i = 0; i < service.characteristics.length; i++) {\r
+                    if(service.characteristics[i].isReadable == true) {\r
+                        characteristic = service.characteristics[i];\r
+                        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+                            characteristic.readValue();\r
+                        }, "TypeMismatchError" + " should be thrown - given no parameter.");\r
+                    }\r
+                }\r
+            };\r
+        }, "BluetoothGATTCharacteristic_readValue_noarg");\r
+\r
+        //BluetoothGATTCharacteristic_readValue_successCallback_TypeMismatch\r
+        test(function () {\r
+            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            if (service.characteristics.length > 0) {\r
+                for(j = 0; j < service.characteristics.length; j++) {\r
+                    if(service.characteristics[j].isReadable == true) {\r
+                        characteristic = service.characteristics[j];\r
+                        conversionTable = getTypeConversionExceptions("functionObject", false);\r
+                        for (i = 0; i < conversionTable.length; i++) {\r
+                            successCallback = conversionTable[i][0];\r
+                            exceptionName = conversionTable[i][1];\r
+                            assert_throws({name: exceptionName},\r
+                                function () {\r
+                                    characteristic.readValue(successCallback);\r
+                                }, "Given incorrect successCallback.");\r
+                        }\r
+                    }\r
+                }\r
+            };\r
+        }, "BluetoothGATTCharacteristic_readValue_successCallback_TypeMismatch");\r
+\r
+        //BluetoothGATTCharacteristic_readValue_successCallback_invalid_cb\r
+        test(function () {\r
+            var characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            invalidSuccessCallback = {\r
+                onread: function (values) {\r
+                    assert_unreached("Invalid successCallback invoked.");\r
+                }\r
+            };\r
+            var service = storedDevice.getService(storedDevice.uuids[0]);\r
+            if (service.characteristics.length > 0) {\r
+                for(i = 0; i < service.characteristics.length; i++) {\r
+                    if(service.characteristics[i].isReadable == true) {\r
+                        characteristic = service.characteristics[i];\r
+                        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+                            characteristic.readValue(invalidSuccessCallback);\r
+                        }, "TypeMismatchError" + " should be thrown - given invalid success callback.");\r
+                    }\r
+                }\r
+            };\r
+        }, "BluetoothGATTCharacteristic_readValue_successCallback_invalid_cb");\r
+\r
+        //BluetoothGATTCharacteristic_removeValueChangeListener\r
+        test(function () {\r
+            var retVal, characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            var ReadValueSuccessCallback = function (value) {\r
+            };\r
+            var service = storedDevice.getService(storedDevice.uuids[0]);\r
+            if (service.characteristics.length > 0) {\r
+                for (i = 0; i < service.characteristics.length; i++) {\r
+                    if (service.characteristics[i].isNotify == true) {\r
+                        characteristic = service.characteristics[i];\r
+                        watchID = characteristic.addValueChangeListener(ReadValueSuccessCallback);\r
+                        retVal = characteristic.removeValueChangeListener(watchID);\r
+                        assert_equals(retVal, undefined, "removeValueChangeListener returns wrong value");\r
+                    }\r
+                }\r
+            };\r
+        }, "BluetoothGATTCharacteristic_removeValueChangeListener");\r
+\r
+        //BluetoothGATTCharacteristic_removeValueChangeListener_exist\r
+        test(function () {\r
+            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            if (service.characteristics.length > 0) {\r
+                characteristic = service.characteristics[0];\r
+                check_method_exists(characteristic, "removeValueChangeListener");\r
+            };\r
+        }, "BluetoothGATTCharacteristic_removeValueChangeListener_exist");\r
+\r
+        //BluetoothGATTCharacteristic_writeValue\r
+        test(function () {\r
+            var retVal, characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            var data = data = new Array(1, 2, 3, 4, 5, 6);\r
+            var service = storedDevice.getService(storedDevice.uuids[0]);\r
+            if (service.characteristics.length > 0) {\r
+                for(i = 0; i < service.characteristics.length; i++) {\r
+                    if(service.characteristics[i].isWritable == true) {\r
+                        characteristic = service.characteristics[i];\r
+                        retVal = characteristic.writeValue(data);\r
+                        assert_equals(retVal, undefined, "writeValue should return undefined");\r
+                    }\r
+                }\r
+            };\r
+        }, "BluetoothGATTCharacteristic_writeValue");\r
+\r
+        //BluetoothGATTCharacteristic_writeValue_data_TypeMismatch\r
+        test(function () {\r
+            var WriteValueSuccessCallback, incorrectData, characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            WriteValueSuccessCallback = function () {\r
+                assert_unreached("Method writeValue shouldn't end successfully. Given incorrect data.");\r
+            };\r
+            var service = storedDevice.getService(storedDevice.uuids[0]);\r
+            if (service.characteristics.length > 0) {\r
+                for(j = 0; j < service.characteristics.length; j++) {\r
+                    if(service.characteristics[j].isWritable == true) {\r
+                        characteristic = service.characteristics[j];\r
+                        conversionTable = getTypeConversionExceptions("array", false);\r
+                        for (i = 0; i < conversionTable.length; i++) {\r
+                            incorrectData = conversionTable[i][0];\r
+                            exceptionName = conversionTable[i][1];\r
+\r
+                            assert_throws({name: exceptionName},\r
+                                function () {\r
+                                    characteristic.writeValue(incorrectData, WriteValueSuccessCallback);\r
+                            }, "Given incorrect characteristic data.");\r
+                        }\r
+                    }\r
+                }\r
+            };\r
+        }, "BluetoothGATTCharacteristic_writeValue_data_TypeMismatch");\r
+\r
+        //BluetoothGATTCharacteristic_writeValue_errorCallback_TypeMismatch\r
+        test(function () {\r
+            var characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            var WriteValueSuccessCallback = function () {\r
+                assert_unreached("Method writeValue shouldn't end successfully. Given incorrect errorCallback.");\r
+            };\r
+\r
+            var data = new Array(1, 2, 3, 4, 5, 6)\r
+            var service = storedDevice.getService(storedDevice.uuids[0]);\r
+            if (service.characteristics.length > 0) {\r
+                for(j = 0; j < service.characteristics.length; j++) {\r
+                    if(service.characteristics[j].isWritable == true) {\r
+                        characteristic = service.characteristics[j];\r
+                        conversionTable = getTypeConversionExceptions("functionObject", true);\r
+                        for (i = 0; i < conversionTable.length; i++) {\r
+                            var errorCallback = conversionTable[i][0];\r
+                            var exceptionName = conversionTable[i][1];\r
+\r
+                            assert_throws({name: exceptionName},\r
+                                function () {\r
+                                    characteristic.writeValue(data, WriteValueSuccessCallback, errorCallback);\r
+                                }, "Given incorrect errorCallback.");\r
+                        }\r
+                    }\r
+                }\r
+            };\r
+        }, "BluetoothGATTCharacteristic_writeValue_errorCallback_TypeMismatch");\r
+\r
+        //BluetoothGATTCharacteristic_writeValue_errorCallback_invalid_cb\r
+        test(function () {\r
+            var WriteValueSuccessCallback, invaliderrorCallback, data = new Array(1, 2, 3, 4, 5, 6), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            WriteValueSuccessCallback = function () {\r
+                assert_unreached("Method writeValue shouldn't end successfully.");\r
+            };\r
+\r
+            invaliderrorCallback = {\r
+                onerror: function (error) {\r
+                    assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);\r
+                }\r
+            };\r
+            var service = storedDevice.getService(storedDevice.uuids[0]);\r
+            if (service.characteristics.length > 0) {\r
+                for(i = 0; i < service.characteristics.length; i++) {\r
+                    if(service.characteristics[i].isWritable == true) {\r
+                        characteristic = service.characteristics[i];\r
+                        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+                            characteristic.writeValue(data, WriteValueSuccessCallback, invaliderrorCallback);\r
+                        }, "TypeMismatchError" + " should be thrown - given invalid error callback.");\r
+                    }\r
+                }\r
+            };\r
+        }, "BluetoothGATTCharacteristic_writeValue_errorCallback_invalid_cb");\r
+\r
+        //BluetoothGATTCharacteristic_writeValue_exist\r
+        test(function () {\r
+            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            if (service.characteristics.length > 0) {\r
+                for(i = 0; i < service.characteristics.length; i++) {\r
+                    if(service.characteristics[i].isWritable == true) {\r
+                        characteristic = service.characteristics[i];\r
+                        check_method_exists(characteristic, "writeValue");\r
+                    }\r
+                }\r
+            };\r
+        }, "BluetoothGATTCharacteristic_writeValue_exist");\r
+\r
+        //BluetoothGATTCharacteristic_writeValue_noarg\r
+        test(function () {\r
+            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            if (service.characteristics.length > 0) {\r
+                for(i = 0; i < service.characteristics.length; i++) {\r
+                    if(service.characteristics[i].isWritable == true) {\r
+                        characteristic = service.characteristics[i];\r
+                        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+                            characteristic.writeValue();\r
+                        }, "TypeMismatchError" + " should be thrown - given no parameter.");\r
+                    }\r
+                }\r
+            };\r
+        }, "BluetoothGATTCharacteristic_writeValue_noarg");\r
+\r
+        //BluetoothGATTCharacteristic_writeValue_successCallback_TypeMismatch\r
+        test(function () {\r
+            var data = new Array(1, 2, 3, 4, 5, 6), successCallback, exceptionName, characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            var service = storedDevice.getService(storedDevice.uuids[0]);\r
+            if (service.characteristics.length > 0) {\r
+                for(j = 0; j < service.characteristics.length; j++) {\r
+                    if(service.characteristics[j].isWritable == true) {\r
+                        characteristic = service.characteristics[j];\r
+                        conversionTable = getTypeConversionExceptions("functionObject", true);\r
+                        for (i = 0; i < conversionTable.length; i++) {\r
+                            successCallback = conversionTable[i][0];\r
+                            exceptionName = conversionTable[i][1];\r
+\r
+                            assert_throws({name: exceptionName},\r
+                                function () {\r
+                                    characteristic.writeValue(data, successCallback);\r
+                                }, "Given incorrect successCallback.");\r
+                        }\r
+                    }\r
+                }\r
+            };\r
+        }, "BluetoothGATTCharacteristic_writeValue_successCallback_TypeMismatch");\r
+\r
+        //BluetoothGATTCharacteristic_writeValue_successCallback_invalid_cb\r
+        test(function () {\r
+            var characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            var invalidSuccessCallback = {\r
+                onsuccess: function() {\r
+                    assert_unreached("Invalid successCallback invoked.");\r
+                }\r
+            }\r
+            var data = new Array(1, 2, 3, 4, 5, 6);\r
+            var service = storedDevice.getService(storedDevice.uuids[0]);\r
+            if (service.characteristics.length > 0) {\r
+                for(i = 0; i < service.characteristics.length; i++) {\r
+                    if(service.characteristics[i].isWritable == true) {\r
+                        characteristic = service.characteristics[i];\r
+                        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+                            characteristic.writeValue(data, invalidSuccessCallback);\r
+                        }, "TypeMismatchError" + " should be thrown - given invalid success callback.");\r
+                    }\r
+                }\r
+            };\r
+        }, "BluetoothGATTCharacteristic_writeValue_successCallback_invalid_cb");\r
+\r
+\r
+\r
+        //BluetoothGATTDescriptor_readValue_errorCallback_TypeMismatch\r
+        test(function () {\r
+            var conversionTable = getTypeConversionExceptions("functionObject", true), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+\r
+            var ReadValueSuccessCallback = function (value) {\r
+                assert_unreached("readValue() success callback should not be invoked.");\r
+            };\r
+\r
+            var service = storedDevice.getService(storedDevice.uuids[0]);\r
+            for (j = 0; j < service.characteristics.length; j++) {\r
+                var characteristic = service.characteristics[j];\r
+                if (characteristic != undefined) {\r
+                    var descriptor = characteristic.descriptors[0];\r
+                    if (descriptor != undefined) {\r
+                        for (i = 0; i < conversionTable.length; i++) {\r
+                            ReadValueErrorCallback = conversionTable[i][0];\r
+                            exceptionName = conversionTable[i][1];\r
+                            assert_throws({name: exceptionName},\r
+                                function () {\r
+                                    descriptor.readValue(ReadValueSuccessCallback, ReadValueErrorCallback);\r
+                                }, "Given incorrect error callback.");\r
+                        }\r
+                    }\r
+                }\r
+            }\r
+        }, "BluetoothGATTDescriptor_readValue_errorCallback_TypeMismatch");\r
+\r
+        //BluetoothGATTDescriptor_readValue_errorCallback_invalid_cb\r
+        test(function () {\r
+            var characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            var ReadValueSuccessCallback = function (value) {\r
+                assert_unreached("readValue() success callback should not be invoked.");\r
+            };\r
+\r
+            var incorrectCallback = {\r
+                onerror: function (error) {\r
+                    assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);\r
+                }\r
+            };\r
+            var service = storedDevice.getService(storedDevice.uuids[0]);\r
+            for (i = 0; i < service.characteristics.length; i++) {\r
+                characteristic = service.characteristics[i];\r
+                if (characteristic != undefined) {\r
+                    descriptor = characteristic.descriptors[0];\r
+                    if (descriptor != undefined) {\r
+                        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+                            descriptor.readValue(ReadValueSuccessCallback, incorrectCallback);\r
+                        }, "Given incorrect errorCallback.");\r
+                    }\r
+                }\r
+            }\r
+        }, "BluetoothGATTDescriptor_readValue_errorCallback_invalid_cb");\r
+\r
+        //BluetoothGATTDescriptor_readValue_exist\r
+        test(function () {\r
+            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            for (i = 0; i < service.characteristics.length; i++) {\r
+                characteristic = service.characteristics[i];\r
+                if (characteristic != undefined) {\r
+                    descriptor = characteristic.descriptors[0];\r
+                    if (descriptor != undefined) {\r
+                        check_method_exists(descriptor, "readValue");\r
+                    }\r
+                }\r
+            }\r
+        }, "BluetoothGATTDescriptor_readValue_exist");\r
+\r
+        //BluetoothGATTDescriptor_readValue_misarg\r
+        test(function () {\r
+            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            for (i = 0; i < service.characteristics.length; i++) {\r
+                characteristic = service.characteristics[i];\r
+                if (characteristic != undefined) {\r
+                    descriptor = characteristic.descriptors[0];\r
+                    if (descriptor != undefined) {\r
+                        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+                            descriptor.readValue();\r
+                        }, "Invoked with missing non-optional arguments.");\r
+                    }\r
+                }\r
+            }\r
+        }, "BluetoothGATTDescriptor_readValue_misarg");\r
+\r
+        //BluetoothGATTDescriptor_readValue_successCallback_TypeMismatch\r
+        test(function () {\r
+            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            conversionTable = getTypeConversionExceptions("functionObject", true);\r
+            for (j = 0; j < service.characteristics.length; j++) {\r
+                characteristic = service.characteristics[j];\r
+                if (characteristic != undefined) {\r
+                    descriptor = characteristic.descriptors[0];\r
+                    if (descriptor != undefined) {\r
+                        for (i = 0; i < conversionTable.length; i++) {\r
+                            var ReadValueSuccessCallback = conversionTable[i][0];\r
+                            exceptionName = conversionTable[i][1];\r
+                            assert_throws({name: exceptionName},\r
+                                function () {\r
+                                    descriptor.readValue(ReadValueSuccessCallback);\r
+                                }, "Given incorrect success callback.");\r
+                        }\r
+                    }\r
+                }\r
+            };\r
+        }, "BluetoothGATTDescriptor_readValue_successCallback_TypeMismatch");\r
+\r
+        //BluetoothGATTDescriptor_readValue_successCallback_invalid_cb\r
+        test(function () {\r
+            var characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            var incorrectCallback = {\r
+                onread: function (value) {\r
+                    assert_unreached("Invalid successcallback invoked");\r
+                }\r
+            };\r
+            var service = storedDevice.getService(storedDevice.uuids[0]);\r
+            for (i = 0; i < service.characteristics.length; i++) {\r
+                characteristic = service.characteristics[i];\r
+                if (characteristic != undefined) {\r
+                    descriptor = characteristic.descriptors[0];\r
+                    if (descriptor != undefined) {\r
+                        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+                            descriptor.readValue(incorrectCallback);\r
+                        }, "Given incorrect successCallback.");\r
+                    }\r
+                }\r
+            }\r
+        }, "BluetoothGATTDescriptor_readValue_successCallback_invalid_cb");\r
+\r
+        //BluetoothGATTDescriptor_writeValue\r
+        test(function () {\r
+            var data = new Array(1, 2, 3, 4, 5, 6), retVal, characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            var service = storedDevice.getService(storedDevice.uuids[0]);\r
+            for (i = 0; i < service.characteristics.length; i++) {\r
+                characteristic = service.characteristics[i];\r
+                if (characteristic != undefined) {\r
+                    descriptor = characteristic.descriptors[0];\r
+                    if (descriptor != undefined) {\r
+                        retVal = descriptor.writeValue(data);\r
+                        assert_equals(retVal, undefined, "writeValue should return undefined");\r
+                    }\r
+                }\r
+            };\r
+        }, "BluetoothGATTDescriptor_writeValue");\r
+\r
+        //BluetoothGATTDescriptor_writeValue_errorCallback_TypeMismatch\r
+        test(function () {\r
+            var data = new Array(1, 2, 3, 4, 5, 6), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            var conversionTable = getTypeConversionExceptions("functionObject", true);\r
+            var WriteValueSuccessCallback = function (value) {\r
+                assert_unreached("writeValue() success callback should not be invoked.");\r
+            };\r
+            var WriteValueErrorCallback;\r
+            var service = storedDevice.getService(storedDevice.uuids[0]);\r
+            for (j = 0; j < service.characteristics.length; j++) {\r
+                characteristic = service.characteristics[j];\r
+                if (characteristic != undefined) {\r
+                    descriptor = characteristic.descriptors[0];\r
+                    if (descriptor != undefined) {\r
+                        for (i = 0; i < conversionTable.length; i++) {\r
+                            WriteValueErrorCallback = conversionTable[i][0];\r
+                            exceptionName = conversionTable[i][1];\r
+                            assert_throws({name: exceptionName},\r
+                                function () {\r
+                                    descriptor.writeValue(data, WriteValueSuccessCallback, WriteValueErrorCallback);\r
+                                }, "Given incorrect error callback.");\r
+                        }\r
+                    }\r
+                }\r
+            }\r
+        }, "BluetoothGATTDescriptor_writeValue_errorCallback_TypeMismatch");\r
+\r
+        //BluetoothGATTDescriptor_writeValue_errorCallback_invalid_cb\r
+        test(function () {\r
+            var data = new Array(1, 2, 3, 4, 5, 6), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            var WriteValueSuccessCallback = function () {\r
+                assert_unreached("writeValue() success callback should not be invoked.");\r
+            };\r
+\r
+            var incorrectCallback = {\r
+                onerror: function (error) {\r
+                    assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);\r
+                }\r
+            };\r
+            var service = storedDevice.getService(storedDevice.uuids[0]);\r
+            for (i = 0; i < service.characteristics.length; i++) {\r
+                characteristic = service.characteristics[i];\r
+                if (characteristic != undefined) {\r
+                    descriptor = characteristic.descriptors[0];\r
+                    if (descriptor != undefined) {\r
+                        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+                            descriptor.writeValue(data, WriteValueSuccessCallback, incorrectCallback);\r
+                        }, "Given incorrect errorCallback.");\r
+                    }\r
+                }\r
+            }\r
+        }, "BluetoothGATTDescriptor_writeValue_errorCallback_invalid_cb");\r
+\r
+        //BluetoothGATTDescriptor_writeValue_exist\r
+        test(function () {\r
+            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            for (i = 0; i < service.characteristics.length; i++) {\r
+                characteristic = service.characteristics[i];\r
+                if (characteristic != undefined) {\r
+                    descriptor = characteristic.descriptors[0];\r
+                    if (descriptor != undefined) {\r
+                        check_method_exists(descriptor, "writeValue");\r
+                    }\r
+                }\r
+            }\r
+        }, "BluetoothGATTDescriptor_writeValue_exist");\r
+        //BluetoothGATTDescriptor_writeValue_misarg\r
+        test(function () {\r
+            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            for (i = 0; i < service.characteristics.length; i++) {\r
+                characteristic = service.characteristics[i];\r
+                if (characteristic != undefined) {\r
+                    descriptor = characteristic.descriptors[0];\r
+                    if (descriptor != undefined) {\r
+                        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+                            descriptor.writeValue();\r
+                        }, "Invoked with missing non-optional arguments.");\r
+                    }\r
+                }\r
+            }\r
+        }, "BluetoothGATTDescriptor_writeValue_misarg");\r
+\r
+        //BluetoothGATTDescriptor_writeValue_value_TypeMismatch\r
+        test(function () {\r
+            var data, characteristic, descriptor, i, j, exceptionName;\r
+            var conversionTable = getTypeConversionExceptions("array", true);\r
+            var service = storedDevice.getService(storedDevice.uuids[0]);\r
+                for (j = 0; j < service.characteristics.length; j++) {\r
+                characteristic = service.characteristics[j];\r
+                    if (characteristic != undefined) {\r
+                        descriptor = characteristic.descriptors[0];\r
+                        if (descriptor != undefined) {\r
+                            for (i = 0; i < conversionTable.length; i++) {\r
+                                data = conversionTable[i][0];\r
+                                exceptionName = conversionTable[i][1];\r
+                                assert_throws({name: exceptionName},\r
+                                    function () {\r
+                                        descriptor.writeValue(data);\r
+                                    }, "Given incorrect value.");\r
+                            }\r
+                        }\r
+                    }\r
+                }\r
+        }, "BluetoothGATTDescriptor_writeValue_value_TypeMismatch");\r
+\r
+\r
+        //BluetoothGATTDescriptor_writeValue_successCallback_TypeMismatch\r
+        test(function () {\r
+            var data = new Array(1, 2, 3, 4, 5, 6), i, characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            var service = storedDevice.getService(storedDevice.uuids[0]);\r
+            conversionTable = getTypeConversionExceptions("functionObject", true);\r
+            for (j = 0; j < service.characteristics.length; j++) {\r
+                var characteristic = service.characteristics[j];\r
+                if (characteristic != undefined) {\r
+                    var descriptor = characteristic.descriptors[0];\r
+                    if (descriptor != undefined) {\r
+                        for (i = 0; i < conversionTable.length; i++) {\r
+                            var WriteValueSuccessCallback = conversionTable[i][0];\r
+                            exceptionName = conversionTable[i][1];\r
+                            assert_throws({name: exceptionName},\r
+                                function () {\r
+                                    descriptor.writeValue(data, WriteValueSuccessCallback);\r
+                                }, "Given incorrect success callback.");\r
+                        }\r
+                    }\r
+                }\r
+            }\r
+        }, "BluetoothGATTDescriptor_writeValue_successCallback_TypeMismatch");\r
+\r
+\r
+        //BluetoothGATTDescriptor_writeValue_successCallback_invalid_cb\r
+        test(function () {\r
+            incorrectCallback = {\r
+                onsuccess: function () {\r
+                    assert_unreached("Invalid successcallback invoked");\r
+                }\r
+            };\r
+            var data = new Array(1, 2, 3, 4, 5, 6), i, characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            var service = storedDevice.getService(storedDevice.uuids[0]);\r
+            for (i = 0; i < service.characteristics.length; i++) {\r
+                var characteristic = service.characteristics[i];\r
+                if (characteristic != undefined) {\r
+                    var descriptor = characteristic.descriptors[0];\r
+                    if (descriptor != undefined) {\r
+                        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+                            descriptor.writeValue(data, incorrectCallback);\r
+                        }, "Given incorrect successCallback.");\r
+                        break;\r
+                    }\r
+                }\r
+            }\r
+        }, "BluetoothGATTDescriptor_writeValue_successCallback_invalid_cb");\r
+\r
+\r
+        //BluetoothGATTService_characteristics_attribute\r
+        test(function () {\r
+            var tmp, characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            var service = storedDevice.getService(storedDevice.uuids[0]);\r
+            assert_own_property(service, "characteristics", "BluetoothGATTService does not own characteristics property.");\r
+            assert_type(service.characteristics, "array", "characteristics should be an array");\r
+            service.characteristics = tmp;\r
+            assert_not_equals(service.characteristics, tmp, "characteristics should not be modified");\r
+        }, "BluetoothGATTService_characteristics_attribute");\r
+\r
+        //BluetoothGATTService_serviceUuid_attribute\r
+        test(function () {\r
+            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            check_readonly(service, "serviceUuid", service.serviceUuid, "string", service.serviceUuid+"Tizen");\r
+        }, "BluetoothGATTService_serviceUuid_attribute");\r
+\r
+        //BluetoothGATTService_services_attribute\r
+        test(function () {\r
+            var tmp, characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            var service = storedDevice.getService(storedDevice.uuids[0]);\r
+            assert_own_property(service, "services", "BluetoothGATTService does not own services property.");\r
+            assert_type(service.services, "array", "services should be an array");\r
+            service.services = tmp;\r
+            assert_not_equals(service.services, tmp, "services should not be modified");\r
+        }, "BluetoothGATTService_services_attribute");\r
+\r
+\r
+        // All "*extend" tests should be at the end of package. There are only\r
+        // tests which can affect tests (though they do not - but if new tests\r
+        // will be added, they should go before these)\r
+\r
+        setTimeout(function(){\r
+        //BluetoothGATTDescriptor_extend\r
+        test(function () {\r
+            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            for (i = 0; i < service.characteristics.length; i++) {\r
+                characteristic = service.characteristics[i];\r
+                if (characteristic != undefined) {\r
+                    descriptor = characteristic.descriptors[0];\r
+                    if (descriptor != undefined) {\r
+                        check_extensibility(descriptor);\r
+                    }\r
+                }\r
+            }\r
+        }, "BluetoothGATTDescriptor_extend");\r
+\r
+        //BluetoothGATTCharacteristic_extend\r
+        test(function () {\r
+            var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+            if (service.characteristics.length > 0) {\r
+                characteristic = service.characteristics[0];\r
+                check_extensibility(characteristic);\r
+            };\r
+        }, "BluetoothGATTCharacteristic_extend");\r
+\r
+                storedDevice.disconnect();\r
+                t.done();}\r
+            , 5000);\r
+    });\r
+    onError = t.step_func(function (e) {\r
+        var errorMessage = "Failed to connect to device: " + e.message + "; try again";\r
+        assert_unreached(errorMessage);\r
+    })\r
+\r
+    proccessDevice = t.step_func(function (device)\r
+    {\r
+        adapter.stopScan();\r
+        device.connect(onConnected, onError);\r
+    })\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(function onsuccess(device) {\r
+        if (device.address == REMOTE_BLE_DEVICE_ADDRESS)\r
+        {\r
+            console.log("Found device: " + device.name);\r
+            storedDevice=device;\r
+            proccessDevice(storedDevice);\r
+        }\r
+    });\r
+});\r
+\r
+\r
+\r
+\r
+\r
+\r
+</script>\r
+</body>\r
+</html>\r
index a1d0dcffff8afe67cf12ec26768f653dc2b879bf..df0b5334183799f4755b4312f2d3860a9ef6603d 100755 (executable)
@@ -1,88 +1,88 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothGATTDescriptor_extend</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_extend
-//==== LABEL Check if BluetoothGATTDescriptor can have new properties added
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:BluetoothGATTDescriptor U
-//==== SPEC_URL TBD
-//==== PRIORITY P3
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA OBX
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, service,
-    onconnected, onerror, characteristic, descriptor, device = null, flag = false, i;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        for (i = 0; i < service.characteristics.length; i++) {
-            characteristic = service.characteristics[i];
-            if (characteristic != undefined) {
-                descriptor = characteristic.descriptors[0];
-                if (descriptor != undefined) {
-                    check_extensibility(descriptor);
-                    device.disconnect();
-                    t.done();
-                }
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    BbLEScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    BbLEScanErrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(BbLEScanSuccessCallback, BbLEScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_extend</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_extend\r
+//==== LABEL Check if BluetoothGATTDescriptor can have new properties added\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:BluetoothGATTDescriptor U\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P3\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA OBX\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, service,\r
+    onconnected, onerror, characteristic, descriptor, device = null, flag = false, i;\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        for (i = 0; i < service.characteristics.length; i++) {\r
+            characteristic = service.characteristics[i];\r
+            if (characteristic != undefined) {\r
+                descriptor = characteristic.descriptors[0];\r
+                if (descriptor != undefined) {\r
+                    check_extensibility(descriptor);\r
+                    device.disconnect();\r
+                    t.done();\r
+                }\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    BbLEScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    BbLEScanErrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(BbLEScanSuccessCallback, BbLEScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index fe017b97aa5d6ee07f03b215170aca3ce20edc06..d4cc2bd96e4a3fe9b0a792e94f33d57d87453fd9 100755 (executable)
@@ -1,43 +1,43 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothGATTDescriptor_notexist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_notexist
-//==== LABEL Check if interface BluetoothGATTDescriptor exists,it should not
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:BluetoothGATTDescriptor U
-//==== SPEC_URL TBD
-//==== PRIORITY P3
-//==== TEST_CRITERIA NIO
-
-test(function () {
-    check_no_interface_object("BluetoothGATTDescriptor");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_notexist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_notexist\r
+//==== LABEL Check if interface BluetoothGATTDescriptor exists,it should not\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:BluetoothGATTDescriptor U\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P3\r
+//==== TEST_CRITERIA NIO\r
+\r
+test(function () {\r
+    check_no_interface_object("BluetoothGATTDescriptor");\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 06e922432dee1a3ae9cc9a3a6eb665f252f9b720..a8da9e5020d9290b81b4fb0d1d712264550beea0 100755 (executable)
@@ -1,92 +1,92 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothGATTDescriptor_readValue</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_readValue
-//==== LABEL Check if BluetoothGATTDescriptor readValue method without optional arguments works properly
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MR MMINA
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, service,
-    onconnected, onerror, characteristic, descriptor, ReadValueSuccessCallback, retVal = null, device = null, flag = false, i;
-
-t.step(function () {
-    ReadValueSuccessCallback = t.step_func(function (value) {
-        assert_equals(retVal, undefined, "readValue should return undefined");
-        device.disconnect();
-        t.done();
-    });
-
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        for (i = 0; i < service.characteristics.length; i++) {
-            characteristic = service.characteristics[i];
-            if (characteristic != undefined) {
-                descriptor = characteristic.descriptors[0];
-                if (descriptor != undefined) {
-                    retVal = descriptor.readValue(ReadValueSuccessCallback);
-                }
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    BbLEScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    BbLEScanErrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(BbLEScanSuccessCallback, BbLEScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_readValue</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_readValue\r
+//==== LABEL Check if BluetoothGATTDescriptor readValue method without optional arguments works properly\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MR MMINA\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, service,\r
+    onconnected, onerror, characteristic, descriptor, ReadValueSuccessCallback, retVal = null, device = null, flag = false, i;\r
+\r
+t.step(function () {\r
+    ReadValueSuccessCallback = t.step_func(function (value) {\r
+        assert_equals(retVal, undefined, "readValue should return undefined");\r
+        device.disconnect();\r
+        t.done();\r
+    });\r
+\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        for (i = 0; i < service.characteristics.length; i++) {\r
+            characteristic = service.characteristics[i];\r
+            if (characteristic != undefined) {\r
+                descriptor = characteristic.descriptors[0];\r
+                if (descriptor != undefined) {\r
+                    retVal = descriptor.readValue(ReadValueSuccessCallback);\r
+                }\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    BbLEScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    BbLEScanErrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(BbLEScanSuccessCallback, BbLEScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index c2f1ac9c8591f195f7267101df3cb4177a0f3db5..cffc97b74fffd3126c36544bf21eb8dc8b632095 100755 (executable)
@@ -1,85 +1,85 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothGATTDescriptor_readValue_InvalidStateError</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_readValue_InvalidStateError
-//==== LABEL Check if BluetoothGATTDescriptor readValue method throw exception when device is not connected
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MC
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanRrrorCallback, service,
-    characteristic, descriptor, ReadValueSuccessCallback, device;
-
-t.step(function () {
-    ReadValueSuccessCallback = t.step_func(function (value) {
-        assert_unreached("readValue() success callback was invoked");
-    });
-
-    BbLEScanSuccessCallback = {
-        onstarted: t.step_func(function () {
-        }),
-
-        ondevicefound: t.step_func(function (foundDevice) {
-            device = foundDevice;
-            if(device.address == REMOTE_BLE_DEVICE_ADDRESS){
-                adapter.stopScan();
-                service = device.getService(device.uuids[0]);
-                if (service.characteristics.length > 0) {
-                    characteristic = service.characteristics[0];
-                    descriptor = characteristic.descriptors[0];
-                    assert_throws(INVALID_STATE_ERR, function () {
-                        descriptor.readValue(ReadValueSuccessCallback);
-                    }, "Should throw exception when device is not connected");
-                    t.done();
-                }
-            }
-        }),
-
-        onfinished: t.step_func(function (devices) {
-        })
-    };
-
-    BbLEScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.startScan(BbLEScanSuccessCallback, BbLEScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_readValue_InvalidStateError</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_readValue_InvalidStateError\r
+//==== LABEL Check if BluetoothGATTDescriptor readValue method throw exception when device is not connected\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanRrrorCallback, service,\r
+    characteristic, descriptor, ReadValueSuccessCallback, device;\r
+\r
+t.step(function () {\r
+    ReadValueSuccessCallback = t.step_func(function (value) {\r
+        assert_unreached("readValue() success callback was invoked");\r
+    });\r
+\r
+    BbLEScanSuccessCallback = {\r
+        onstarted: t.step_func(function () {\r
+        }),\r
+\r
+        ondevicefound: t.step_func(function (foundDevice) {\r
+            device = foundDevice;\r
+            if(device.address == REMOTE_BLE_DEVICE_ADDRESS){\r
+                adapter.stopScan();\r
+                service = device.getService(device.uuids[0]);\r
+                if (service.characteristics.length > 0) {\r
+                    characteristic = service.characteristics[0];\r
+                    descriptor = characteristic.descriptors[0];\r
+                    assert_throws(INVALID_STATE_ERR, function () {\r
+                        descriptor.readValue(ReadValueSuccessCallback);\r
+                    }, "Should throw exception when device is not connected");\r
+                    t.done();\r
+                }\r
+            }\r
+        }),\r
+\r
+        onfinished: t.step_func(function (devices) {\r
+        })\r
+    };\r
+\r
+    BbLEScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.startScan(BbLEScanSuccessCallback, BbLEScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 1f4c90db39e507f0657f9e6f4b4d63d579e4a0d7..e0df7caddda4f2f44ccfb93cdcb2e1200b8b40dc 100755 (executable)
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothGATTDescriptor_readValue_errorCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_readValue_errorCallback_TypeMismatch
-//==== LABEL Check if readValue throws exception when errorCallback is incorrect
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MC
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, service, device = null, flag = false,
-    onconnected, onerror, characteristic, descriptor, ReadValueSuccessCallback, ReadValueErrorCallback, conversionTable, exceptionName, i, j;
-
-t.step(function () {
-    conversionTable = getTypeConversionExceptions("functionObject", true);
-
-    ReadValueSuccessCallback = t.step_func(function (value) {
-        assert_unreached("readValue() success callback should not be invoked.");
-    });
-
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        for (j = 0; j < service.characteristics.length; j++) {
-            characteristic = service.characteristics[j];
-            if (characteristic != undefined) {
-                descriptor = characteristic.descriptors[0];
-                if (descriptor != undefined) {
-                    for (i = 0; i < conversionTable.length; i++) {
-                        ReadValueErrorCallback = conversionTable[i][0];
-                        exceptionName = conversionTable[i][1];
-                        assert_throws({name: exceptionName},
-                            function () {
-                                descriptor.readValue(ReadValueSuccessCallback, ReadValueErrorCallback);
-                            }, "Given incorrect error callback.");
-                    }
-                    device.disconnect();
-                    t.done();
-                }
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    BbLEScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    BbLEScanErrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(BbLEScanSuccessCallback, BbLEScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_readValue_errorCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_readValue_errorCallback_TypeMismatch\r
+//==== LABEL Check if readValue throws exception when errorCallback is incorrect\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, service, device = null, flag = false,\r
+    onconnected, onerror, characteristic, descriptor, ReadValueSuccessCallback, ReadValueErrorCallback, conversionTable, exceptionName, i, j;\r
+\r
+t.step(function () {\r
+    conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+    ReadValueSuccessCallback = t.step_func(function (value) {\r
+        assert_unreached("readValue() success callback should not be invoked.");\r
+    });\r
+\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        for (j = 0; j < service.characteristics.length; j++) {\r
+            characteristic = service.characteristics[j];\r
+            if (characteristic != undefined) {\r
+                descriptor = characteristic.descriptors[0];\r
+                if (descriptor != undefined) {\r
+                    for (i = 0; i < conversionTable.length; i++) {\r
+                        ReadValueErrorCallback = conversionTable[i][0];\r
+                        exceptionName = conversionTable[i][1];\r
+                        assert_throws({name: exceptionName},\r
+                            function () {\r
+                                descriptor.readValue(ReadValueSuccessCallback, ReadValueErrorCallback);\r
+                            }, "Given incorrect error callback.");\r
+                    }\r
+                    device.disconnect();\r
+                    t.done();\r
+                }\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    BbLEScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    BbLEScanErrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(BbLEScanSuccessCallback, BbLEScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index b24099ba8e513704eebf42af5180e0f8b56dfc42..2a59d2f94a532ad50e9c0fd20cbaf035e899585c 100755 (executable)
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothGATTDescriptor_readValue_errorCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_readValue_errorCallback_invalid_cb
-//==== LABEL Check if readValue throws exception when errorCallback is invalid
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, service,
-    onconnected, onerror, characteristic, descriptor, ReadValueSuccessCallback, incorrectCallback, device = null, flag = false, i;
-
-t.step(function () {
-    ReadValueSuccessCallback = t.step_func(function (value) {
-        assert_unreached("readValue() success callback should not be invoked.");
-    });
-
-    incorrectCallback = {
-        onerror: t.step_func(function (error) {
-            assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
-        })
-    };
-
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        for (i = 0; i < service.characteristics.length; i++) {
-            characteristic = service.characteristics[i];
-            if (characteristic != undefined) {
-                descriptor = characteristic.descriptors[0];
-                if (descriptor != undefined) {
-                    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
-                        descriptor.readValue(ReadValueSuccessCallback, incorrectCallback);
-                    }, "Given incorrect errorCallback.");
-                    device.disconnect();
-                    t.done();
-                }
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    BbLEScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    BbLEScanErrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(BbLEScanSuccessCallback, BbLEScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_readValue_errorCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_readValue_errorCallback_invalid_cb\r
+//==== LABEL Check if readValue throws exception when errorCallback is invalid\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, service,\r
+    onconnected, onerror, characteristic, descriptor, ReadValueSuccessCallback, incorrectCallback, device = null, flag = false, i;\r
+\r
+t.step(function () {\r
+    ReadValueSuccessCallback = t.step_func(function (value) {\r
+        assert_unreached("readValue() success callback should not be invoked.");\r
+    });\r
+\r
+    incorrectCallback = {\r
+        onerror: t.step_func(function (error) {\r
+            assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);\r
+        })\r
+    };\r
+\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        for (i = 0; i < service.characteristics.length; i++) {\r
+            characteristic = service.characteristics[i];\r
+            if (characteristic != undefined) {\r
+                descriptor = characteristic.descriptors[0];\r
+                if (descriptor != undefined) {\r
+                    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+                        descriptor.readValue(ReadValueSuccessCallback, incorrectCallback);\r
+                    }, "Given incorrect errorCallback.");\r
+                    device.disconnect();\r
+                    t.done();\r
+                }\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    BbLEScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    BbLEScanErrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(BbLEScanSuccessCallback, BbLEScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 7ff3870ffbc416094d82b170191cc39e6448ac90..6a5804a84e8c83e42b10fb2a4ad0501eddcb117c 100755 (executable)
@@ -1,88 +1,88 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothGATTDescriptor_readValue_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_readValue_exist
-//==== LABEL Check if readValue exists
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P0
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA ME
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, service,
-    onconnected, onerror, characteristic, descriptor, device = null, flag = false, i;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        for (i = 0; i < service.characteristics.length; i++) {
-            characteristic = service.characteristics[i];
-            if (characteristic != undefined) {
-                descriptor = characteristic.descriptors[0];
-                if (descriptor != undefined) {
-                    check_method_exists(descriptor, "readValue");
-                    device.disconnect();
-                    t.done();
-                }
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    BbLEScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    BbLEScanErrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(BbLEScanSuccessCallback, BbLEScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_readValue_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_readValue_exist\r
+//==== LABEL Check if readValue exists\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P0\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA ME\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, service,\r
+    onconnected, onerror, characteristic, descriptor, device = null, flag = false, i;\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        for (i = 0; i < service.characteristics.length; i++) {\r
+            characteristic = service.characteristics[i];\r
+            if (characteristic != undefined) {\r
+                descriptor = characteristic.descriptors[0];\r
+                if (descriptor != undefined) {\r
+                    check_method_exists(descriptor, "readValue");\r
+                    device.disconnect();\r
+                    t.done();\r
+                }\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    BbLEScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    BbLEScanErrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(BbLEScanSuccessCallback, BbLEScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 32c292213288cbe8fd5e97e15546c1cb94c90693..1a0d749ea8eb3ce7fa99f4488fdd88251c4e540e 100755 (executable)
@@ -1,90 +1,90 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothGATTDescriptor_readValue_misarg</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_readValue_misarg
-//==== LABEL Check if readValue method called with missing non-optional argument throws an exception
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MMA
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, service,
-    onconnected, onerror, characteristic, descriptor, device = null, flag = false, i;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        for (i = 0; i < service.characteristics.length; i++) {
-            characteristic = service.characteristics[i];
-            if (characteristic != undefined) {
-                descriptor = characteristic.descriptors[0];
-                if (descriptor != undefined) {
-                    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
-                        descriptor.readValue();
-                    }, "Invoked with missing non-optional arguments.");
-                    device.disconnect();
-                    t.done();
-                }
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    BbLEScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    BbLEScanErrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(BbLEScanSuccessCallback, BbLEScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_readValue_misarg</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_readValue_misarg\r
+//==== LABEL Check if readValue method called with missing non-optional argument throws an exception\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MMA\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, service,\r
+    onconnected, onerror, characteristic, descriptor, device = null, flag = false, i;\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        for (i = 0; i < service.characteristics.length; i++) {\r
+            characteristic = service.characteristics[i];\r
+            if (characteristic != undefined) {\r
+                descriptor = characteristic.descriptors[0];\r
+                if (descriptor != undefined) {\r
+                    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+                        descriptor.readValue();\r
+                    }, "Invoked with missing non-optional arguments.");\r
+                    device.disconnect();\r
+                    t.done();\r
+                }\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    BbLEScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    BbLEScanErrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(BbLEScanSuccessCallback, BbLEScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 93e07bcdebe11198cc567631eb5f035a07b946a4..e3a77c4628645ba059abc501ebe5ef2d06987ed0 100755 (executable)
@@ -1,97 +1,97 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothGATTDescriptor_readValue_successCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_readValue_successCallback_TypeMismatch
-//==== LABEL Check if readValue throws exception when successCallback is incorrect
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MC
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service, device = null,
-    onconnected, onerror, characteristic, descriptor, ReadValueSuccessCallback, conversionTable, exceptionName, i, flag = false, j;
-
-t.step(function () {
-    conversionTable = getTypeConversionExceptions("functionObject", true);
-
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        for (j = 0; j < service.characteristics.length; j++) {
-            characteristic = service.characteristics[j];
-            if (characteristic != undefined) {
-                descriptor = characteristic.descriptors[0];
-                if (descriptor != undefined) {
-                    for (i = 0; i < conversionTable.length; i++) {
-                        ReadValueSuccessCallback = conversionTable[i][0];
-                        exceptionName = conversionTable[i][1];
-                        assert_throws({name: exceptionName},
-                            function () {
-                                descriptor.readValue(ReadValueSuccessCallback);
-                            }, "Given incorrect success callback.");
-                    }
-                    device.disconnect();
-                    t.done();
-                }
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanErrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_readValue_successCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_readValue_successCallback_TypeMismatch\r
+//==== LABEL Check if readValue throws exception when successCallback is incorrect\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service, device = null,\r
+    onconnected, onerror, characteristic, descriptor, ReadValueSuccessCallback, conversionTable, exceptionName, i, flag = false, j;\r
+\r
+t.step(function () {\r
+    conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        for (j = 0; j < service.characteristics.length; j++) {\r
+            characteristic = service.characteristics[j];\r
+            if (characteristic != undefined) {\r
+                descriptor = characteristic.descriptors[0];\r
+                if (descriptor != undefined) {\r
+                    for (i = 0; i < conversionTable.length; i++) {\r
+                        ReadValueSuccessCallback = conversionTable[i][0];\r
+                        exceptionName = conversionTable[i][1];\r
+                        assert_throws({name: exceptionName},\r
+                            function () {\r
+                                descriptor.readValue(ReadValueSuccessCallback);\r
+                            }, "Given incorrect success callback.");\r
+                    }\r
+                    device.disconnect();\r
+                    t.done();\r
+                }\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanErrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 7f3767b0c05e0765a12ee092a2c476f4da89fccf..b0de9e9e7778d7ef903cf15f6198ba035532b2eb 100755 (executable)
@@ -1,96 +1,96 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothGATTDescriptor_readValue_successCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_readValue_successCallback_invalid_cb
-//==== LABEL Check if readValue throws exception when successrCallback is invalid
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, service,
-    onconnected, onerror, characteristic, descriptor, incorrectCallback, device = null, flag = false, i;
-
-t.step(function () {
-    incorrectCallback = {
-        onread: t.step_func(function (value) {
-            assert_unreached("Invalid successcallback invoked");
-        })
-    };
-
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        for (i = 0; i < service.characteristics.length; i++) {
-            characteristic = service.characteristics[i];
-            if (characteristic != undefined) {
-                descriptor = characteristic.descriptors[0];
-                if (descriptor != undefined) {
-                    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
-                        descriptor.readValue(incorrectCallback);
-                    }, "Given incorrect successCallback.");
-                    device.disconnect();
-                    t.done();
-                }
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    BbLEScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    BbLEScanErrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(BbLEScanSuccessCallback, BbLEScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_readValue_successCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_readValue_successCallback_invalid_cb\r
+//==== LABEL Check if readValue throws exception when successrCallback is invalid\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, service,\r
+    onconnected, onerror, characteristic, descriptor, incorrectCallback, device = null, flag = false, i;\r
+\r
+t.step(function () {\r
+    incorrectCallback = {\r
+        onread: t.step_func(function (value) {\r
+            assert_unreached("Invalid successcallback invoked");\r
+        })\r
+    };\r
+\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        for (i = 0; i < service.characteristics.length; i++) {\r
+            characteristic = service.characteristics[i];\r
+            if (characteristic != undefined) {\r
+                descriptor = characteristic.descriptors[0];\r
+                if (descriptor != undefined) {\r
+                    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+                        descriptor.readValue(incorrectCallback);\r
+                    }, "Given incorrect successCallback.");\r
+                    device.disconnect();\r
+                    t.done();\r
+                }\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    BbLEScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    BbLEScanErrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(BbLEScanSuccessCallback, BbLEScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 0bf435d5a6701d5ecfa30c16befd97c3ae8fa3d7..dc0047d649c4093aeb8f4abb626a49ae724d62a7 100755 (executable)
@@ -1,99 +1,99 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothGATTDescriptor_readValue_with_errorCallback</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_readValue_with_errorCallback
-//==== LABEL Check if BluetoothGATTDescriptor readValue method with all optional arguments works properly
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MOA MR
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service,
-    onconnected, onerror, characteristic, descriptor, ReadValueSuccessCallback, ReadValueErrorCallback, retVal = null,
-    device = null, flag = false, i, descFlag;
-
-t.step(function () {
-    ReadValueSuccessCallback = t.step_func(function (value) {
-        assert_equals(retVal, undefined, "readValue should return undefined");
-        device.disconnect();
-        t.done();
-    });
-
-    ReadValueErrorCallback = t.step_func(function (error) {
-        assert_unreached("readValue() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        descFlag = false;
-        for (i = 0; i < service.characteristics.length; i++) {
-            characteristic = service.characteristics[i];
-            if (characteristic != undefined) {
-                descriptor = characteristic.descriptors[0];
-                if (descFlag == false && descriptor != undefined) {
-                    retVal = descriptor.readValue(ReadValueSuccessCallback, ReadValueErrorCallback);
-                    descFlag = true;
-                }
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanErrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_readValue_with_errorCallback</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_readValue_with_errorCallback\r
+//==== LABEL Check if BluetoothGATTDescriptor readValue method with all optional arguments works properly\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MOA MR\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service,\r
+    onconnected, onerror, characteristic, descriptor, ReadValueSuccessCallback, ReadValueErrorCallback, retVal = null,\r
+    device = null, flag = false, i, descFlag;\r
+\r
+t.step(function () {\r
+    ReadValueSuccessCallback = t.step_func(function (value) {\r
+        assert_equals(retVal, undefined, "readValue should return undefined");\r
+        device.disconnect();\r
+        t.done();\r
+    });\r
+\r
+    ReadValueErrorCallback = t.step_func(function (error) {\r
+        assert_unreached("readValue() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        descFlag = false;\r
+        for (i = 0; i < service.characteristics.length; i++) {\r
+            characteristic = service.characteristics[i];\r
+            if (characteristic != undefined) {\r
+                descriptor = characteristic.descriptors[0];\r
+                if (descFlag == false && descriptor != undefined) {\r
+                    retVal = descriptor.readValue(ReadValueSuccessCallback, ReadValueErrorCallback);\r
+                    descFlag = true;\r
+                }\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanErrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 197d3a2b397b2ee86014c47b82387a12bb89babc..9bfb382a2e1961a2a7db1230844e8a6009781a5d 100755 (executable)
@@ -1,88 +1,92 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2020 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Feng Zhao <feng.zhao@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothGATTDescriptor_uuid_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_uuid_attribute
-//==== LABEL Check if BluetoothGATTDescriptor uuid_attribute exists, has type string and is readonly
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:uuid A
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== PRE The bluetooth of the BLE remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, service,
-    onconnected, onerror, characteristic, descriptor, device = null, flag = false, i;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        for (i = 0; i < service.characteristics.length; i++) {
-            characteristic = service.characteristics[i];
-            if (characteristic != undefined) {
-                descriptor = characteristic.descriptors[0];
-                if (descriptor != undefined) {
-                    check_readonly(descriptor, "uuid", descriptor.uuid, "string", descriptor.uuid+"Tizen");
-                    device.disconnect();
-                    t.done();
-                }
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    BbLEScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    BbLEScanErrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(BbLEScanSuccessCallback, BbLEScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2020 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Feng Zhao <feng.zhao@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_uuid_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_uuid_attribute\r
+//==== LABEL Check if BluetoothGATTDescriptor uuid_attribute exists, has type string and is readonly\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:uuid A\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== PRE The bluetooth of the BLE remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, { timeout: 60000 }), adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, service,\r
+    onconnected, onerror, characteristic, descriptor, device = null, flag = false, i;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT && LE_GATT_SUPPORT) { // check bluetooth and le and gatt support\r
+        onconnected = t.step_func(function () {\r
+            service = device.getService(device.uuids[0]);\r
+            for (i = 0; i < service.characteristics.length; i++) {\r
+                characteristic = service.characteristics[i];\r
+                if (characteristic != undefined) {\r
+                    descriptor = characteristic.descriptors[0];\r
+                    if (descriptor != undefined) {\r
+                        check_readonly(descriptor, "uuid", descriptor.uuid, "string", descriptor.uuid + "Tizen");\r
+                        device.disconnect();\r
+                        t.done();\r
+                    }\r
+                }\r
+            }\r
+        });\r
+\r
+        onerror = t.step_func(function (error) {\r
+            assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+        });\r
+\r
+        BbLEScanSuccessCallback = t.step_func(function (bledevice) {\r
+            if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+                adapter.stopScan();\r
+                device = bledevice;\r
+                if (flag == false) {\r
+                    device.connect(onconnected, onerror);\r
+                    flag = true;\r
+                }\r
+            }\r
+        });\r
+\r
+        BbLEScanErrorCallback = t.step_func(function (error) {\r
+            assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getLEAdapter();\r
+        adapter.stopScan();\r
+        adapter.startScan(BbLEScanSuccessCallback, BbLEScanErrorCallback);\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index f1825da9d29d6802f793babb68a4ac4085304a0f..e5a7b201c7cea2163221af140e3e1a3ae2d92622 100755 (executable)
@@ -1,90 +1,90 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothGATTDescriptor_writeValue</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_writeValue
-//==== LABEL heck if BluetoothGATTDescriptor readValue method without optional arguments works properly
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MR MMINA
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service,
-    onconnected, onerror, characteristic, descriptor, device = null, retVal = null, data = new Array(1, 2, 3, 4, 5, 6),
-    flag = false, i;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        for (i = 0; i < service.characteristics.length; i++) {
-            characteristic = service.characteristics[i];
-            if (characteristic != undefined) {
-                descriptor = characteristic.descriptors[0];
-                if (descriptor != undefined) {
-                    retVal = descriptor.writeValue(data);
-                    assert_equals(retVal, undefined, "writeValue should return undefined");
-                    device.disconnect();
-                    t.done();
-                }
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanErrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_writeValue</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_writeValue\r
+//==== LABEL heck if BluetoothGATTDescriptor readValue method without optional arguments works properly\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MR MMINA\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service,\r
+    onconnected, onerror, characteristic, descriptor, device = null, retVal = null, data = new Array(1, 2, 3, 4, 5, 6),\r
+    flag = false, i;\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        for (i = 0; i < service.characteristics.length; i++) {\r
+            characteristic = service.characteristics[i];\r
+            if (characteristic != undefined) {\r
+                descriptor = characteristic.descriptors[0];\r
+                if (descriptor != undefined) {\r
+                    retVal = descriptor.writeValue(data);\r
+                    assert_equals(retVal, undefined, "writeValue should return undefined");\r
+                    device.disconnect();\r
+                    t.done();\r
+                }\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanErrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 8a034f4a3d7d903d1ca803b0693af086f000ec6d..8034346d2b6850f8a03ebe1feaf156da98fb9012 100755 (executable)
@@ -1,85 +1,85 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothGATTDescriptor_writeValue_InvalidStateError</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_writeValue_InvalidStateError
-//==== LABEL Check if BluetoothGATTDescriptor writeValue method throw exception when device is not connected
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MC
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanRrrorCallback, service,
-    characteristic, descriptor, WriteValueSuccessCallback, device, data = new Array(1, 2, 3, 4, 5, 6);
-
-t.step(function () {
-    WriteValueSuccessCallback = t.step_func(function () {
-        assert_unreached("writeValue() success callback should not be invoked");
-    });
-
-    BbLEScanSuccessCallback = {
-        onstarted: t.step_func(function () {
-        }),
-
-        ondevicefound: t.step_func(function (foundDevice) {
-            device = foundDevice;
-            if(device.address == REMOTE_BLE_DEVICE_ADDRESS){
-                adapter.stopScan();
-                service = device.getService(device.uuids[0]);
-                if (service.characteristics.length > 0) {
-                    characteristic = service.characteristics[0];
-                    descriptor = characteristic.descriptors[0];
-                    assert_throws(INVALID_STATE_ERR, function () {
-                        descriptor.writeValue(data, WriteValueSuccessCallback);
-                    }, "Should throw exception when device is not connected");
-                    t.done();
-                }
-            }
-        }),
-
-        onfinished: t.step_func(function (devices) {
-        })
-    };
-
-    BbLEScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.startScan(BbLEScanSuccessCallback, BbLEScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_writeValue_InvalidStateError</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_writeValue_InvalidStateError\r
+//==== LABEL Check if BluetoothGATTDescriptor writeValue method throw exception when device is not connected\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanRrrorCallback, service,\r
+    characteristic, descriptor, WriteValueSuccessCallback, device, data = new Array(1, 2, 3, 4, 5, 6);\r
+\r
+t.step(function () {\r
+    WriteValueSuccessCallback = t.step_func(function () {\r
+        assert_unreached("writeValue() success callback should not be invoked");\r
+    });\r
+\r
+    BbLEScanSuccessCallback = {\r
+        onstarted: t.step_func(function () {\r
+        }),\r
+\r
+        ondevicefound: t.step_func(function (foundDevice) {\r
+            device = foundDevice;\r
+            if(device.address == REMOTE_BLE_DEVICE_ADDRESS){\r
+                adapter.stopScan();\r
+                service = device.getService(device.uuids[0]);\r
+                if (service.characteristics.length > 0) {\r
+                    characteristic = service.characteristics[0];\r
+                    descriptor = characteristic.descriptors[0];\r
+                    assert_throws(INVALID_STATE_ERR, function () {\r
+                        descriptor.writeValue(data, WriteValueSuccessCallback);\r
+                    }, "Should throw exception when device is not connected");\r
+                    t.done();\r
+                }\r
+            }\r
+        }),\r
+\r
+        onfinished: t.step_func(function (devices) {\r
+        })\r
+    };\r
+\r
+    BbLEScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.startScan(BbLEScanSuccessCallback, BbLEScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index f065636e738f3903109f5040312655a9521f788c..72642a866a223ef5493c9f38fcd7c47ebb29fb57 100755 (executable)
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothGATTDescriptor_writeValue_errorCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_writeValue_errorCallback_TypeMismatch
-//==== LABEL Check if writeValue throws exception when errorCallback is incorrect
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MC
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, data = new Array(1, 2, 3, 4, 5, 6),
-    service, device = null,  onconnected, onerror, characteristic, descriptor, WriteValueSuccessCallback,
-    WriteValueErrorCallback, conversionTable, exceptionName, i, flag = false, j;
-
-t.step(function () {
-    conversionTable = getTypeConversionExceptions("functionObject", true);
-
-    WriteValueSuccessCallback = t.step_func(function (value) {
-        assert_unreached("writeValue() success callback should not be invoked.");
-    });
-
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        for (j = 0; j < service.characteristics.length; j++) {
-            characteristic = service.characteristics[j];
-            if (characteristic != undefined) {
-                descriptor = characteristic.descriptors[0];
-                if (descriptor != undefined) {
-                    for (i = 0; i < conversionTable.length; i++) {
-                        WriteValueErrorCallback = conversionTable[i][0];
-                        exceptionName = conversionTable[i][1];
-                        assert_throws({name: exceptionName},
-                            function () {
-                                descriptor.writeValue(data, WriteValueSuccessCallback, WriteValueErrorCallback);
-                            }, "Given incorrect error callback.");
-                    }
-                    device.disconnect();
-                    t.done();
-                }
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanErrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_writeValue_errorCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_writeValue_errorCallback_TypeMismatch\r
+//==== LABEL Check if writeValue throws exception when errorCallback is incorrect\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, data = new Array(1, 2, 3, 4, 5, 6),\r
+    service, device = null,  onconnected, onerror, characteristic, descriptor, WriteValueSuccessCallback,\r
+    WriteValueErrorCallback, conversionTable, exceptionName, i, flag = false, j;\r
+\r
+t.step(function () {\r
+    conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+    WriteValueSuccessCallback = t.step_func(function (value) {\r
+        assert_unreached("writeValue() success callback should not be invoked.");\r
+    });\r
+\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        for (j = 0; j < service.characteristics.length; j++) {\r
+            characteristic = service.characteristics[j];\r
+            if (characteristic != undefined) {\r
+                descriptor = characteristic.descriptors[0];\r
+                if (descriptor != undefined) {\r
+                    for (i = 0; i < conversionTable.length; i++) {\r
+                        WriteValueErrorCallback = conversionTable[i][0];\r
+                        exceptionName = conversionTable[i][1];\r
+                        assert_throws({name: exceptionName},\r
+                            function () {\r
+                                descriptor.writeValue(data, WriteValueSuccessCallback, WriteValueErrorCallback);\r
+                            }, "Given incorrect error callback.");\r
+                    }\r
+                    device.disconnect();\r
+                    t.done();\r
+                }\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanErrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 541b2c967e1e8bf37a6764235b9c005ea6aa30b2..df02ef409c738f41332125c9675e4ba90c5598d6 100755 (executable)
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothGATTDescriptor_writeValue_errorCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_writeValue_errorCallback_invalid_cb
-//==== LABEL Check if writeValue throws exception when errorCallback is invalid
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service, flag = false,
-    onconnected, onerror, characteristic, descriptor, WriteValueSuccessCallback, incorrectCallback, device = null,
-    data = new Array(1, 2, 3, 4, 5, 6), i;
-
-t.step(function () {
-    WriteValueSuccessCallback = t.step_func(function () {
-        assert_unreached("writeValue() success callback should not be invoked.");
-    });
-
-    incorrectCallback = {
-        onerror: t.step_func(function (error) {
-            assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
-        })
-    };
-
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        for (i = 0; i < service.characteristics.length; i++) {
-            characteristic = service.characteristics[i];
-            if (characteristic != undefined) {
-                descriptor = characteristic.descriptors[0];
-                if (descriptor != undefined) {
-                    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
-                        descriptor.writeValue(data, WriteValueSuccessCallback, incorrectCallback);
-                    }, "Given incorrect errorCallback.");
-                    device.disconnect();
-                    t.done();
-                }
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanErrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_writeValue_errorCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_writeValue_errorCallback_invalid_cb\r
+//==== LABEL Check if writeValue throws exception when errorCallback is invalid\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service, flag = false,\r
+    onconnected, onerror, characteristic, descriptor, WriteValueSuccessCallback, incorrectCallback, device = null,\r
+    data = new Array(1, 2, 3, 4, 5, 6), i;\r
+\r
+t.step(function () {\r
+    WriteValueSuccessCallback = t.step_func(function () {\r
+        assert_unreached("writeValue() success callback should not be invoked.");\r
+    });\r
+\r
+    incorrectCallback = {\r
+        onerror: t.step_func(function (error) {\r
+            assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);\r
+        })\r
+    };\r
+\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        for (i = 0; i < service.characteristics.length; i++) {\r
+            characteristic = service.characteristics[i];\r
+            if (characteristic != undefined) {\r
+                descriptor = characteristic.descriptors[0];\r
+                if (descriptor != undefined) {\r
+                    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+                        descriptor.writeValue(data, WriteValueSuccessCallback, incorrectCallback);\r
+                    }, "Given incorrect errorCallback.");\r
+                    device.disconnect();\r
+                    t.done();\r
+                }\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanErrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 33377b0346e385d2d47f30349cd80cf5d8a036da..c07ba7d789279363e4df389c72fdc8cba1a62a53 100755 (executable)
@@ -1,88 +1,88 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothGATTDescriptor_writeValue_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_writeValue_exist
-//==== LABEL Check if writeValue exists
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P0
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA ME
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service,
-    onconnected, onerror, characteristic, descriptor, device = null, flag = false, i;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        for (i = 0; i < service.characteristics.length; i++) {
-            characteristic = service.characteristics[i];
-            if (characteristic != undefined) {
-                descriptor = characteristic.descriptors[0];
-                if (descriptor != undefined) {
-                    check_method_exists(descriptor, "writeValue");
-                    device.disconnect();
-                    t.done();
-                }
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanErrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_writeValue_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_writeValue_exist\r
+//==== LABEL Check if writeValue exists\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P0\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA ME\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service,\r
+    onconnected, onerror, characteristic, descriptor, device = null, flag = false, i;\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        for (i = 0; i < service.characteristics.length; i++) {\r
+            characteristic = service.characteristics[i];\r
+            if (characteristic != undefined) {\r
+                descriptor = characteristic.descriptors[0];\r
+                if (descriptor != undefined) {\r
+                    check_method_exists(descriptor, "writeValue");\r
+                    device.disconnect();\r
+                    t.done();\r
+                }\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanErrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 4db7421047d49a1590b60423931099a79258eecb..f65a4ce6789e54189ce6a9411597ebced1469296 100755 (executable)
@@ -1,90 +1,90 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothGATTDescriptor_writeValue_misarg</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_writeValue_misarg
-//==== LABEL Check if writeValue method called with missing non-optional argument throws an exception
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MMA
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service,
-    onconnected, onerror, characteristic, descriptor, device = null, flag = false, i;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        for (i = 0; i < service.characteristics.length; i++) {
-            characteristic = service.characteristics[i];
-            if (characteristic != undefined) {
-                descriptor = characteristic.descriptors[0];
-                if (descriptor != undefined) {
-                    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
-                        descriptor.writeValue();
-                    }, "Invoked with missing non-optional arguments.");
-                    device.disconnect();
-                    t.done();
-                }
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanErrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_writeValue_misarg</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_writeValue_misarg\r
+//==== LABEL Check if writeValue method called with missing non-optional argument throws an exception\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MMA\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service,\r
+    onconnected, onerror, characteristic, descriptor, device = null, flag = false, i;\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        for (i = 0; i < service.characteristics.length; i++) {\r
+            characteristic = service.characteristics[i];\r
+            if (characteristic != undefined) {\r
+                descriptor = characteristic.descriptors[0];\r
+                if (descriptor != undefined) {\r
+                    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+                        descriptor.writeValue();\r
+                    }, "Invoked with missing non-optional arguments.");\r
+                    device.disconnect();\r
+                    t.done();\r
+                }\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanErrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index dff9cd0c04886602ea7de73bee11c0c5199e8538..89cdbad52790e81fee9edf647f27f91985fcf549 100755 (executable)
@@ -1,97 +1,97 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothGATTDescriptor_writeValue_successCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_writeValue_successCallback_TypeMismatch
-//==== LABEL Check if writeValue throws exception when successCallback is incorrect
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MC
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service, device = null, flag = false,
-    onconnected, onerror, characteristic, descriptor, WriteValueSuccessCallback, conversionTable, exceptionName, i, data = new Array(1, 2, 3, 4, 5, 6), j;
-
-t.step(function () {
-    conversionTable = getTypeConversionExceptions("functionObject", true);
-
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        for (j = 0; j < service.characteristics.length; j++) {
-            characteristic = service.characteristics[j];
-            if (characteristic != undefined) {
-                descriptor = characteristic.descriptors[0];
-                if (descriptor != undefined) {
-                    for (i = 0; i < conversionTable.length; i++) {
-                        WriteValueSuccessCallback = conversionTable[i][0];
-                        exceptionName = conversionTable[i][1];
-                        assert_throws({name: exceptionName},
-                            function () {
-                                descriptor.writeValue(data, WriteValueSuccessCallback);
-                            }, "Given incorrect success callback.");
-                    }
-                    device.disconnect();
-                    t.done();
-                }
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanErrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_writeValue_successCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_writeValue_successCallback_TypeMismatch\r
+//==== LABEL Check if writeValue throws exception when successCallback is incorrect\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service, device = null, flag = false,\r
+    onconnected, onerror, characteristic, descriptor, WriteValueSuccessCallback, conversionTable, exceptionName, i, data = new Array(1, 2, 3, 4, 5, 6), j;\r
+\r
+t.step(function () {\r
+    conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        for (j = 0; j < service.characteristics.length; j++) {\r
+            characteristic = service.characteristics[j];\r
+            if (characteristic != undefined) {\r
+                descriptor = characteristic.descriptors[0];\r
+                if (descriptor != undefined) {\r
+                    for (i = 0; i < conversionTable.length; i++) {\r
+                        WriteValueSuccessCallback = conversionTable[i][0];\r
+                        exceptionName = conversionTable[i][1];\r
+                        assert_throws({name: exceptionName},\r
+                            function () {\r
+                                descriptor.writeValue(data, WriteValueSuccessCallback);\r
+                            }, "Given incorrect success callback.");\r
+                    }\r
+                    device.disconnect();\r
+                    t.done();\r
+                }\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanErrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 4c0b855c07ba809155a9f5fe9b1d033d44170db1..f992225244b101bcd996e4494610c8db6bf6238f 100755 (executable)
@@ -1,97 +1,97 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothGATTDescriptor_writeValue_successCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_writeValue_successCallback_invalid_cb
-//==== LABEL Check if writeValue throws exception when successrCallback is invalid
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service,
-    onconnected, onerror, characteristic, descriptor, device = null, incorrectCallback, data = new Array(1, 2, 3, 4, 5, 6),
-    flag = false, i;
-
-t.step(function () {
-    incorrectCallback = {
-        onsuccess: t.step_func(function () {
-            assert_unreached("Invalid successcallback invoked");
-        })
-    };
-
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        for (i = 0; i < service.characteristics.length; i++) {
-            characteristic = service.characteristics[i];
-            if (characteristic != undefined) {
-                descriptor = characteristic.descriptors[0];
-                if (descriptor != undefined) {
-                    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
-                        descriptor.writeValue(data, incorrectCallback);
-                    }, "Given incorrect successCallback.");
-                    device.disconnect();
-                    t.done();
-                }
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanErrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_writeValue_successCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_writeValue_successCallback_invalid_cb\r
+//==== LABEL Check if writeValue throws exception when successrCallback is invalid\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service,\r
+    onconnected, onerror, characteristic, descriptor, device = null, incorrectCallback, data = new Array(1, 2, 3, 4, 5, 6),\r
+    flag = false, i;\r
+\r
+t.step(function () {\r
+    incorrectCallback = {\r
+        onsuccess: t.step_func(function () {\r
+            assert_unreached("Invalid successcallback invoked");\r
+        })\r
+    };\r
+\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        for (i = 0; i < service.characteristics.length; i++) {\r
+            characteristic = service.characteristics[i];\r
+            if (characteristic != undefined) {\r
+                descriptor = characteristic.descriptors[0];\r
+                if (descriptor != undefined) {\r
+                    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+                        descriptor.writeValue(data, incorrectCallback);\r
+                    }, "Given incorrect successCallback.");\r
+                    device.disconnect();\r
+                    t.done();\r
+                }\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanErrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index f0c051b36321ebc29d396df2a17a584a5f36b6f3..8026e353e3b7d2a4f5e60a989c25f3e544811a09 100755 (executable)
@@ -1,97 +1,97 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothGATTDescriptor_writeValue_value_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_writeValue_value_TypeMismatch
-//==== LABEL Check if readValue throws exception when value is incorrect
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MC
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service,
-    device = null, onconnected, onerror, characteristic, descriptor, conversionTable, exceptionName, i, data, flag = false, j;
-
-t.step(function () {
-    conversionTable = getTypeConversionExceptions("array", true);
-
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        for (j = 0; j < service.characteristics.length; j++) {
-            characteristic = service.characteristics[j];
-            if (characteristic != undefined) {
-                descriptor = characteristic.descriptors[0];
-                if (descriptor != undefined) {
-                    for (i = 0; i < conversionTable.length; i++) {
-                        data = conversionTable[i][0];
-                        exceptionName = conversionTable[i][1];
-                        assert_throws({name: exceptionName},
-                            function () {
-                                descriptor.writeValue(data);
-                            }, "Given incorrect value.");
-                    }
-                    device.disconnect();
-                    t.done();
-                }
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanErrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_writeValue_value_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_writeValue_value_TypeMismatch\r
+//==== LABEL Check if readValue throws exception when value is incorrect\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service,\r
+    device = null, onconnected, onerror, characteristic, descriptor, conversionTable, exceptionName, i, data, flag = false, j;\r
+\r
+t.step(function () {\r
+    conversionTable = getTypeConversionExceptions("array", true);\r
+\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        for (j = 0; j < service.characteristics.length; j++) {\r
+            characteristic = service.characteristics[j];\r
+            if (characteristic != undefined) {\r
+                descriptor = characteristic.descriptors[0];\r
+                if (descriptor != undefined) {\r
+                    for (i = 0; i < conversionTable.length; i++) {\r
+                        data = conversionTable[i][0];\r
+                        exceptionName = conversionTable[i][1];\r
+                        assert_throws({name: exceptionName},\r
+                            function () {\r
+                                descriptor.writeValue(data);\r
+                            }, "Given incorrect value.");\r
+                    }\r
+                    device.disconnect();\r
+                    t.done();\r
+                }\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanErrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 41c261f5dcc688350e1b9e64eab021a8c277a72c..64a1a86df266963654ff3eb35d6779918924a152 100755 (executable)
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothGATTDescriptor_writeValue_with_errorCallback</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_writeValue_with_errorCallback
-//==== LABEL Check if BluetoothGATTDescriptor writeValue method with all optional arguments works properly
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P0
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MOA MR MAST
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, service,
-    onconnected, onerror, characteristic, descriptor, ReadValueSuccessCallback, ReadValueErrorCallback, retVal = null,
-    WriteValueSuccessCallback, WriteValueErrorCallback, data = new Array(1, 2, 3, 4, 5, 6), device = null, flag = false, i,
-    descFalg;
-
-t.step(function () {
-    ReadValueSuccessCallback = t.step_func(function (value) {
-        assert_equals(value, data, "data should be the same");
-        device.disconnect();
-        t.done();
-    });
-
-    ReadValueErrorCallback = t.step_func(function (error) {
-        assert_unreached("readValue() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    WriteValueSuccessCallback = t.step_func(function () {
-        assert_equals(retVal, undefined, "writeValue should return undefined");
-        descriptor.readValue(ReadValueSuccessCallback, ReadValueErrorCallback);
-    });
-
-    WriteValueErrorCallback = t.step_func(function (error) {
-        assert_unreached("readValue() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        descFalg = false;
-        for (i = 0; i < service.characteristics.length; i++) {
-            characteristic = service.characteristics[i];
-            if (descFalg == false && characteristic != undefined) {
-                descriptor = characteristic.descriptors[0];
-                if (descriptor != undefined) {
-                    retVal = descriptor.writeValue(data, WriteValueSuccessCallback, WriteValueErrorCallback);
-                    descFalg = true;
-                }
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    BbLEScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    BbLEScanErrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(BbLEScanSuccessCallback, BbLEScanErrorCallback);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_writeValue_with_errorCallback</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_writeValue_with_errorCallback\r
+//==== LABEL Check if BluetoothGATTDescriptor writeValue method with all optional arguments works properly\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P0\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MOA MR MAST\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, service,\r
+    onconnected, onerror, characteristic, descriptor, ReadValueSuccessCallback, ReadValueErrorCallback, retVal = null,\r
+    WriteValueSuccessCallback, WriteValueErrorCallback, data = new Array(1, 2, 3, 4, 5, 6), device = null, flag = false, i,\r
+    descFalg;\r
+\r
+t.step(function () {\r
+    ReadValueSuccessCallback = t.step_func(function (value) {\r
+        assert_equals(value, data, "data should be the same");\r
+        device.disconnect();\r
+        t.done();\r
+    });\r
+\r
+    ReadValueErrorCallback = t.step_func(function (error) {\r
+        assert_unreached("readValue() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    WriteValueSuccessCallback = t.step_func(function () {\r
+        assert_equals(retVal, undefined, "writeValue should return undefined");\r
+        descriptor.readValue(ReadValueSuccessCallback, ReadValueErrorCallback);\r
+    });\r
+\r
+    WriteValueErrorCallback = t.step_func(function (error) {\r
+        assert_unreached("readValue() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        descFalg = false;\r
+        for (i = 0; i < service.characteristics.length; i++) {\r
+            characteristic = service.characteristics[i];\r
+            if (descFalg == false && characteristic != undefined) {\r
+                descriptor = characteristic.descriptors[0];\r
+                if (descriptor != undefined) {\r
+                    retVal = descriptor.writeValue(data, WriteValueSuccessCallback, WriteValueErrorCallback);\r
+                    descFalg = true;\r
+                }\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    BbLEScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    BbLEScanErrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(BbLEScanSuccessCallback, BbLEScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index a922e12c94ace6bc67c46267b7cbc58178fe28f0..9c914a5e3b3ff217b5c86aaacbb19102a519425a 100755 (executable)
@@ -1,78 +1,78 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothGATTService_characteristics_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTService_characteristics_attribute
-//==== LABEL Check characteristics attribute in BluetoothGATTService is readonly
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTService:characteristics A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA  AE AT ARO
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, service,
-    device = null, flag = false, tmp = [123];
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        assert_own_property(service, "characteristics", "BluetoothGATTService does not own characteristics property.");
-        assert_type(service.characteristics, "array", "characteristics should be an array");
-        service.characteristics = tmp;
-        assert_not_equals(service.characteristics, tmp, "characteristics should not be modified");
-        device.disconnect();
-        t.done();
-    });
-
-    onerror = t.step_func(function (e) {
-        assert_unreached("connect errorCallback exception:" + e.message);
-    });
-
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTService_characteristics_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTService_characteristics_attribute\r
+//==== LABEL Check characteristics attribute in BluetoothGATTService is readonly\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTService:characteristics A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA  AE AT ARO\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, service,\r
+    device = null, flag = false, tmp = [123];\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        assert_own_property(service, "characteristics", "BluetoothGATTService does not own characteristics property.");\r
+        assert_type(service.characteristics, "array", "characteristics should be an array");\r
+        service.characteristics = tmp;\r
+        assert_not_equals(service.characteristics, tmp, "characteristics should not be modified");\r
+        device.disconnect();\r
+        t.done();\r
+    });\r
+\r
+    onerror = t.step_func(function (e) {\r
+        assert_unreached("connect errorCallback exception:" + e.message);\r
+    });\r
+\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index bb770162de9164406a5e992bfcf471665ab5e9af..d4a61fff0d806125a427ccf214814c107f075373 100755 (executable)
@@ -1,75 +1,82 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Feng Zhao <feng.zhao@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothGATTService_serviceUuid_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTService_serviceUuid_attribute
-//==== LABEL Check uuid attribute in BluetoothGATTService is readonly
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the BLE remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTService:serviceUuid A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA  AE AT ARO
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, service,
-    device = null, flag = false;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        check_readonly(service, "serviceUuid", service.serviceUuid, "string", service.serviceUuid+"Tizen");
-        device.disconnect();
-        t.done();
-    });
-
-    onerror = t.step_func(function (e) {
-        assert_unreached("connect errorCallback exception:" + e.message);
-    });
-
-    SuccessCB = t.step_func(function (bledevice) {
-       if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Feng Zhao <feng.zhao@samsung.com>\r
+\r
+-->\r
+<html>\r
+\r
+<head>\r
+    <title>BluetoothGATTService_serviceUuid_attribute</title>\r
+    <meta charset="utf-8" />\r
+    <script src="support/unitcommon.js"></script>\r
+    <script src="support/bluetooth_common.js"></script>\r
+</head>\r
+\r
+<body>\r
+    <div id="log"></div>\r
+    <script>\r
+        //==== TEST: BluetoothGATTService_serviceUuid_attribute\r
+        //==== LABEL Check uuid attribute in BluetoothGATTService is readonly\r
+        //==== EXECUTION_TYPE manual\r
+        //==== PRE The bluetooth of the BLE remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+        //==== PRIORITY P1\r
+        //==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTService:serviceUuid A\r
+        //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+        //==== TEST_CRITERIA  AE AT ARO\r
+\r
+        setup({ timeout: 180000 });\r
+\r
+        var adapter = null, t = async_test(document.title, { timeout: 180000 }), SuccessCB, onconnected, service,\r
+            device = null, flag = false;\r
+\r
+        t.step(function () {\r
+            if (BT_SUPPORT && LE_SUPPORT && LE_GATT_SUPPORT) { // check bluetooth and le and gatt support\r
+                onconnected = t.step_func(function () {\r
+                    service = device.getService(device.uuids[0]);\r
+                    check_readonly(service, "serviceUuid", service.serviceUuid, "string", service.serviceUuid + "Tizen");\r
+                    device.disconnect();\r
+                    t.done();\r
+                });\r
+\r
+                onerror = t.step_func(function (e) {\r
+                    assert_unreached("connect errorCallback exception:" + e.message);\r
+                });\r
+\r
+                SuccessCB = t.step_func(function (bledevice) {\r
+                    if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+                        adapter.stopScan();\r
+                        device = bledevice;\r
+                        if (flag == false) {\r
+                            device.connect(onconnected, onerror);\r
+                            flag = true;\r
+                        }\r
+                    }\r
+                });\r
+\r
+                adapter = tizen.bluetooth.getLEAdapter();\r
+                adapter.stopScan();\r
+                adapter.startScan(SuccessCB);\r
+            } else {\r
+                t.done();\r
+            }\r
+        });\r
+\r
+    </script>\r
+</body>\r
+\r
 </html>
\ No newline at end of file
index 7b3638144c5f371831e4ccf1d41fcece9879f08e..10c17eb08811176e250d698633a825c4d348d44b 100755 (executable)
@@ -1,78 +1,78 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothGATTService_services_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTService_services_attribute
-//==== LABEL Check services attribute in BluetoothGATTService is readonly
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTService:services A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA  AE AT ARO
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, service,
-    retValue = null, device = null, flag = false, tmp = [123];
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        assert_own_property(service, "services", "BluetoothGATTService does not own services property.");
-        assert_type(service.services, "array", "services should be an array");
-        service.services = tmp;
-        assert_not_equals(service.services, tmp, "services should not be modified");
-        device.disconnect();
-        t.done();
-    });
-
-    onerror = t.step_func(function (e) {
-        assert_unreached("connect errorCallback exception:" + e.message);
-    });
-
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTService_services_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTService_services_attribute\r
+//==== LABEL Check services attribute in BluetoothGATTService is readonly\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTService:services A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA  AE AT ARO\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, service,\r
+    retValue = null, device = null, flag = false, tmp = [123];\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        assert_own_property(service, "services", "BluetoothGATTService does not own services property.");\r
+        assert_type(service.services, "array", "services should be an array");\r
+        service.services = tmp;\r
+        assert_not_equals(service.services, tmp, "services should not be modified");\r
+        device.disconnect();\r
+        t.done();\r
+    });\r
+\r
+    onerror = t.step_func(function (e) {\r
+        assert_unreached("connect errorCallback exception:" + e.message);\r
+    });\r
+\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 84298a6a1f0bee7347f884369349928b81c0657c..c3f72d4cfab69308fcf16ac23bd0746741e9a972 100755 (executable)
@@ -1,44 +1,48 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_extend</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_extend
-//==== LABEL Test whether the object can have new properties added for BluetoothLEAdapter
-//==== PRIORITY P3
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:BluetoothLEAdapter U
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA OBX
-
-test(function () {
-    var adapter = tizen.bluetooth.getLEAdapter();
-    check_extensibility(adapter);
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_extend</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_extend\r
+//==== LABEL Test whether the object can have new properties added for BluetoothLEAdapter\r
+//==== PRIORITY P3\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:BluetoothLEAdapter U\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA OBX\r
+\r
+test(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        var adapter = tizen.bluetooth.getLEAdapter();\r
+        check_extensibility(adapter);\r
+\r
+    }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 9bb8c75329230730c54011f4b28eef79a1cd6900..629aa337a04d3251acccc184a86e349c97c82991 100755 (executable)
@@ -1,43 +1,47 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_notexist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_notexist
-//==== LABEL Check if is possible to call BluetoothLEAdapter in new expresion
-//==== PRIORITY P3
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter U
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA NIO
-
-test(function () {
-    check_no_interface_object("BluetoothLEAdapter");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_notexist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_notexist\r
+//==== LABEL Check if is possible to call BluetoothLEAdapter in new expresion\r
+//==== PRIORITY P3\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter U\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA NIO\r
+\r
+test(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        check_no_interface_object("BluetoothLEAdapter");\r
+\r
+    }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 03ba5645f1a786fc983075b9785440e67927c47a..012d91bf0f192dd31200b4ebcee3a5ee952bea84 100755 (executable)
@@ -1,57 +1,63 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startAdvertise</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startAdvertise
-//==== LABEL Check with startAdvertise arguments work properity(without optional argument)
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MMINA MAST MR
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), successCallback,
-    retValue = null, advertiseData;
-
-t.step(function () {
-    successCallback = t.step_func(function (state) {
-            assert_equals(retValue, undefined, "startAdvertise returns wrong value");
-            adapter.stopAdvertise();
-            t.done();
-        });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    advertiseData = new tizen.BluetoothLEAdvertiseData();
-    retValue = adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startAdvertise</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startAdvertise\r
+//==== LABEL Check with startAdvertise arguments work properity(without optional argument)\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MMINA MAST MR\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), successCallback,\r
+    retValue = null, advertiseData;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        successCallback = t.step_func(function (state) {\r
+            assert_equals(retValue, undefined, "startAdvertise returns wrong value");\r
+            adapter.stopAdvertise();\r
+            t.done();\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getLEAdapter();\r
+        advertiseData = new tizen.BluetoothLEAdvertiseData();\r
+        retValue = adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index e9f320c7e685a9c9941b48c755beee3ee84a49b9..1cf6015e37d1b33691691869a8702fe9abf62c20 100755 (executable)
@@ -1,67 +1,73 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startAdvertise_InvalidStateError</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startAdvertise_InvalidStateError
-//==== LABEL Check whether startAdvertise() method throws an exception when device is currently in progress of advertising
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, errorCallback,
-    successCallback, advertiseData;
-
-t.step(function () {
-    successCallback =  t.step_func(function () {
-        assert_unreached("Invalid Success callback invoked");
-    });
-
-    errorCallback = t.step_func(function (e) {
-        assert_unreached("Invalid Error callback invoked");
-    });
-
-    SuccessCB = t.step_func(function () {
-            assert_throws({name: "InvalidStateError"}, function () {
-                adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback, errorCallback);
-            }, "InvalidStateError should be thrown with device is currently in progress of advertising");
-            adapter.stopAdvertise();
-            t.done();
-        });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    advertiseData = new tizen.BluetoothLEAdvertiseData();
-    adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startAdvertise_InvalidStateError</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startAdvertise_InvalidStateError\r
+//==== LABEL Check whether startAdvertise() method throws an exception when device is currently in progress of advertising\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, errorCallback,\r
+    successCallback, advertiseData;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        successCallback = t.step_func(function () {\r
+            assert_unreached("Invalid Success callback invoked");\r
+        });\r
+\r
+        errorCallback = t.step_func(function (e) {\r
+            assert_unreached("Invalid Error callback invoked");\r
+        });\r
+\r
+        SuccessCB = t.step_func(function () {\r
+            assert_throws({ name: "InvalidStateError" }, function () {\r
+                adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback, errorCallback);\r
+            }, "InvalidStateError should be thrown with device is currently in progress of advertising");\r
+            adapter.stopAdvertise();\r
+            t.done();\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getLEAdapter();\r
+        advertiseData = new tizen.BluetoothLEAdvertiseData();\r
+        adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", SuccessCB);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 0205e557519b8446aba844ea183d1a7f212a81e0..220893e8f7fc577e23dd2d72486d6b8383a91c72 100755 (executable)
@@ -1,74 +1,80 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startAdvertise_QuotaExceededError</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startAdvertise_QuotaExceededError
-//==== LABEL Check whether startAdvertise() method throws an exception when input attribute is not compatible with the maximum data size for this attribute
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), errorCallback,
-    successCallback, advertiseData, advertiseDataInit;
-
-t.step(function () {
-
-    advertiseDataInit = {
-        includeName: true,
-        includeTxPowerLevel: true,
-        appearance: 192,
-        serviceuuids: ["180f","181f","182f","183f","184f","185f","186f","187f","188f","189f","190f","180f","181f","182f","183f","184f","185f","186f","187f","188f","189f","190f"],
-        solicitationuuids:  ["180d","181d","182d","183d","184d","185d","186d","187d","188d","189d","190d","180d","181d","182d","183d","184d","185d","186d","187d","188d",
-            "189d","190d","180d","181d","182d","183d","184d","185d","186d","187d","188d","189d","190d","180d","181d","182d","183d","184d","185d","186d","187d","188d","189d",
-            "190d","180d","181d","182d","183d","184d","185d","186d","187d","188d","189d","190d"]
-    };
-
-    successCallback =  t.step_func(function (state) {
-        assert_unreached("SuccessCallback should not be invoked");
-    });
-
-    errorCallback = t.step_func(function (e) {
-        assert_unreached("startAdvertise errorCallback exception:" + e.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);
-    assert_throws({name: "QuotaExceededError"}, function () {
-        adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback, errorCallback);
-    }, "QuotaExceededError should be thrown with input attribute is not compatible with the maximum data size for this attribute");
-    adapter.stopAdvertise();
-    t.done();
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startAdvertise_QuotaExceededError</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startAdvertise_QuotaExceededError\r
+//==== LABEL Check whether startAdvertise() method throws an exception when input attribute is not compatible with the maximum data size for this attribute\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), errorCallback,\r
+    successCallback, advertiseData, advertiseDataInit;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+\r
+        advertiseDataInit = {\r
+            includeName: true,\r
+            includeTxPowerLevel: true,\r
+            appearance: 192,\r
+            serviceuuids: ["180f", "181f", "182f", "183f", "184f", "185f", "186f", "187f", "188f", "189f", "190f", "180f", "181f", "182f", "183f", "184f", "185f", "186f", "187f", "188f", "189f", "190f"],\r
+            solicitationuuids: ["180d", "181d", "182d", "183d", "184d", "185d", "186d", "187d", "188d", "189d", "190d", "180d", "181d", "182d", "183d", "184d", "185d", "186d", "187d", "188d",\r
+                "189d", "190d", "180d", "181d", "182d", "183d", "184d", "185d", "186d", "187d", "188d", "189d", "190d", "180d", "181d", "182d", "183d", "184d", "185d", "186d", "187d", "188d", "189d",\r
+                "190d", "180d", "181d", "182d", "183d", "184d", "185d", "186d", "187d", "188d", "189d", "190d"]\r
+        };\r
+\r
+        successCallback = t.step_func(function (state) {\r
+            assert_unreached("SuccessCallback should not be invoked");\r
+        });\r
+\r
+        errorCallback = t.step_func(function (e) {\r
+            assert_unreached("startAdvertise errorCallback exception:" + e.message);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getLEAdapter();\r
+        advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);\r
+        assert_throws({ name: "QuotaExceededError" }, function () {\r
+            adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback, errorCallback);\r
+        }, "QuotaExceededError should be thrown with input attribute is not compatible with the maximum data size for this attribute");\r
+        adapter.stopAdvertise();\r
+        t.done();\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 8f37fc5871c649655c8275b45b06d9b7d7bde60a..76c5181e03b88bfc041d5a4ba271c0b606f8f46e 100755 (executable)
@@ -1,87 +1,87 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startAdvertise_QuotaPatameterError</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startAdvertise_QuotaPatameterError
-//==== LABEL Check whether startAdvertise() method throws an exception when input attribute is not compatible with the maximum data size for this attribute
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, errorCB, errorCallback,
-    successCallback, advertiseData, advertiseDataInit;
-
-t.step(function () {
-
-    advertiseDataInit = {
-        includeName: true,
-        includeTxPowerLevel: true,
-        appearance: -10,
-        serviceuuids: [battery_svc_uuid_16],
-        solicitationuuids: [heart_rate_svc_uuid_16]
-    };
-
-    successCallback =  t.step_func(function () {
-        assert_unreached("SuccessCallback should not be invoked");
-    });
-
-    errorCallback = t.step_func(function (e) {
-        assert_unreached("ErrorCallback should not be invoked");
-    });
-
-    SuccessCB = {
-        onstarted: t.step_func(function () {
-            assert_throws({name: "QuotaPatameterError"}, function () {
-                adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback, errorCallback);
-            }, "QuotaPatameterError should be thrown with input attribute is not compatible with the maximum data size for this attribute");
-            t.done();
-        }),
-        ondevicefound: t.step_func(function (device) {
-            if(devices.length > 0){
-                adapter.stopScan();
-        }),
-        onfinished: t.step_func(function (devices) {
-        })
-    };
-
-    errorCB = t.step_func(function (e) {
-        assert_unreached("startScanErrorCB exception:" + e.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);
-    adapter.startScan(successCB, errorCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startAdvertise_QuotaPatameterError</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startAdvertise_QuotaPatameterError\r
+//==== LABEL Check whether startAdvertise() method throws an exception when input attribute is not compatible with the maximum data size for this attribute\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, errorCB, errorCallback,\r
+    successCallback, advertiseData, advertiseDataInit;\r
+\r
+t.step(function () {\r
+\r
+    advertiseDataInit = {\r
+        includeName: true,\r
+        includeTxPowerLevel: true,\r
+        appearance: -10,\r
+        serviceuuids: [battery_svc_uuid_16],\r
+        solicitationuuids: [heart_rate_svc_uuid_16]\r
+    };\r
+\r
+    successCallback =  t.step_func(function () {\r
+        assert_unreached("SuccessCallback should not be invoked");\r
+    });\r
+\r
+    errorCallback = t.step_func(function (e) {\r
+        assert_unreached("ErrorCallback should not be invoked");\r
+    });\r
+\r
+    SuccessCB = {\r
+        onstarted: t.step_func(function () {\r
+            assert_throws({name: "QuotaPatameterError"}, function () {\r
+                adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback, errorCallback);\r
+            }, "QuotaPatameterError should be thrown with input attribute is not compatible with the maximum data size for this attribute");\r
+            t.done();\r
+        }),\r
+        ondevicefound: t.step_func(function (device) {\r
+            if(devices.length > 0){\r
+                adapter.stopScan();\r
+        }),\r
+        onfinished: t.step_func(function (devices) {\r
+        })\r
+    };\r
+\r
+    errorCB = t.step_func(function (e) {\r
+        assert_unreached("startScanErrorCB exception:" + e.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);\r
+    adapter.startScan(successCB, errorCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 0f3116d329d6990f016bf772791b811a0da5d544..7488404aeb63e96d8467bfc62e90afac12983893 100755 (executable)
@@ -1,70 +1,76 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startAdvertise_advertiseData_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startAdvertise_advertiseData_TypeMismatch
-//==== LABEL Check whether startAdvertise() method called with invalid advertiseData argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
-    conversionTable, errorCallback, successCallback, advertiseData;
-
-t.step(function () {
-    successCallback = t.step_func(function () {
-        assert_unreached("SuccessCallback should not be invoked");
-    });
-
-    errorCallback = t.step_func(function (e) {
-        assert_unreached("errorCallback exception:" + e.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    conversionTable = getTypeConversionExceptions("object", false);
-    for(i = 0; i < conversionTable.length; i++) {
-        advertiseData = conversionTable[i][0];
-        exceptionName = conversionTable[i][1];
-
-        assert_throws({name: exceptionName},
-            function () {
-                adapter.startAdvertise(advertiseData, "ADVERTISE", successCallback, errorCallback, "BALANCED", true);
-            }, "Given incorrect errorCallback.");
-    }
-    adapter.stopAdvertise();
-    t.done();
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startAdvertise_advertiseData_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startAdvertise_advertiseData_TypeMismatch\r
+//==== LABEL Check whether startAdvertise() method called with invalid advertiseData argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+    conversionTable, errorCallback, successCallback, advertiseData;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        successCallback = t.step_func(function () {\r
+            assert_unreached("SuccessCallback should not be invoked");\r
+        });\r
+\r
+        errorCallback = t.step_func(function (e) {\r
+            assert_unreached("errorCallback exception:" + e.message);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getLEAdapter();\r
+        conversionTable = getTypeConversionExceptions("object", false);\r
+        for (i = 0; i < conversionTable.length; i++) {\r
+            advertiseData = conversionTable[i][0];\r
+            exceptionName = conversionTable[i][1];\r
+\r
+            assert_throws({ name: exceptionName },\r
+                function () {\r
+                    adapter.startAdvertise(advertiseData, "ADVERTISE", successCallback, errorCallback, "BALANCED", true);\r
+                }, "Given incorrect errorCallback.");\r
+        }\r
+        adapter.stopAdvertise();\r
+        t.done();\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index be2e31027c6a9a21166eb277ff9d8c34aba9dd56..6eca3ea2ebe5a0e90433b4852a6137f3568ab60d 100755 (executable)
@@ -1,78 +1,78 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startAdvertise_connectable_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startAdvertise_connectable_TypeMismatch
-//==== LABEL Check whether startAdvertise() method called with invalid connectable argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i, connectable,
-    conversionTable, errorCallback, successCallback, advertiseDataInit, advertiseData;
-
-t.step(function () {
-    advertiseDataInit = {
-        includeName: true,
-        includeTxPowerLevel: true,
-        appearance: 192,
-        serviceuuids: [battery_svc_uuid_16],
-        solicitationuuids: [heart_rate_svc_uuid_16]
-    };
-
-    successCallback = t.step_func(function () {
-        assert_unreached("SuccessCallback should not be invoked");
-    });
-
-    errorCallback = t.step_func(function (e) {
-        assert_unreached("errorCallback exception:" + e.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);
-    conversionTable = getTypeConversionExceptions("boolean", true);
-    for(i = 0; i < conversionTable.length; i++) {
-        connectable = conversionTable[i][0];
-        exceptionName = conversionTable[i][1];
-
-        assert_throws({name: exceptionName},
-            function () {
-                adapter.startAdvertise(advertiseData, "ADVERTISE", successCallback, errorCallback, "BALANCED", connectable);
-            }, "Given incorrect errorCallback.");
-    }
-    t.done();
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startAdvertise_connectable_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startAdvertise_connectable_TypeMismatch\r
+//==== LABEL Check whether startAdvertise() method called with invalid connectable argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i, connectable,\r
+    conversionTable, errorCallback, successCallback, advertiseDataInit, advertiseData;\r
+\r
+t.step(function () {\r
+    advertiseDataInit = {\r
+        includeName: true,\r
+        includeTxPowerLevel: true,\r
+        appearance: 192,\r
+        serviceuuids: [battery_svc_uuid_16],\r
+        solicitationuuids: [heart_rate_svc_uuid_16]\r
+    };\r
+\r
+    successCallback = t.step_func(function () {\r
+        assert_unreached("SuccessCallback should not be invoked");\r
+    });\r
+\r
+    errorCallback = t.step_func(function (e) {\r
+        assert_unreached("errorCallback exception:" + e.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);\r
+    conversionTable = getTypeConversionExceptions("boolean", true);\r
+    for(i = 0; i < conversionTable.length; i++) {\r
+        connectable = conversionTable[i][0];\r
+        exceptionName = conversionTable[i][1];\r
+\r
+        assert_throws({name: exceptionName},\r
+            function () {\r
+                adapter.startAdvertise(advertiseData, "ADVERTISE", successCallback, errorCallback, "BALANCED", connectable);\r
+            }, "Given incorrect errorCallback.");\r
+    }\r
+    t.done();\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 450624657ec0f40d6d00e5f15fddeea67b23e48e..7dea0a58a73bc12fd571bcfcb24fddb0594bba8c 100755 (executable)
@@ -1,67 +1,73 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startAdvertise_errorCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startAdvertise_errorCallback_TypeMismatch
-//==== LABEL Check whether startAdvertise() method called with invalid errorCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
-    conversionTable, errorCallback, successCallback, advertiseData;
-
-t.step(function () {
-
-    successCallback = t.step_func(function () {
-        assert_unreached("SuccessCallback is invoked");
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    advertiseData = new tizen.BluetoothLEAdvertiseData();
-    conversionTable = getTypeConversionExceptions("functionObject", true);
-    for(i = 0; i < conversionTable.length; i++) {
-        errorCallback = conversionTable[i][0];
-        exceptionName = conversionTable[i][1];
-
-        assert_throws({name: exceptionName},
-            function () {
-                adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback, errorCallback);
-            }, "Given incorrect errorCallback.");
-    }
-    adapter.stopAdvertise();
-    t.done();
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startAdvertise_errorCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startAdvertise_errorCallback_TypeMismatch\r
+//==== LABEL Check whether startAdvertise() method called with invalid errorCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+    conversionTable, errorCallback, successCallback, advertiseData;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+\r
+        successCallback = t.step_func(function () {\r
+            assert_unreached("SuccessCallback is invoked");\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getLEAdapter();\r
+        advertiseData = new tizen.BluetoothLEAdvertiseData();\r
+        conversionTable = getTypeConversionExceptions("functionObject", true);\r
+        for (i = 0; i < conversionTable.length; i++) {\r
+            errorCallback = conversionTable[i][0];\r
+            exceptionName = conversionTable[i][1];\r
+\r
+            assert_throws({ name: exceptionName },\r
+                function () {\r
+                    adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback, errorCallback);\r
+                }, "Given incorrect errorCallback.");\r
+        }\r
+        adapter.stopAdvertise();\r
+        t.done();\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index d92f75800a6511260d3422054bea05fc26fb0f08..15c4fd1898ddd5a07524bc597b8e91e160cedc91 100755 (executable)
@@ -1,66 +1,72 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startAdvertise_errorCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startAdvertise_errorCallback_invalid_cb
-//==== LABEL Check startAdvertise() argument errorCallback validation - use simple function
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
-    successCallback, errorCallback, advertiseData;
-
-t.step(function () {
-    successCallback = t.step_func(function () {
-        assert_unreached("SuccessCallback is invoked");
-    });
-
-    errorCallback = {
-        onerror: t.step_func(function () {
-            assert_unreached("Invalid callback invoked");
-        })
-    };
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    advertiseData = new tizen.BluetoothLEAdvertiseData();
-    assert_throws(TYPE_MISMATCH_EXCEPTION,
-        function () {
-            adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback, errorCallback);
-        }, "Given incorrect errorCallback.");
-    adapter.stopAdvertise();
-    t.done();
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startAdvertise_errorCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startAdvertise_errorCallback_invalid_cb\r
+//==== LABEL Check startAdvertise() argument errorCallback validation - use simple function\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+    successCallback, errorCallback, advertiseData;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        successCallback = t.step_func(function () {\r
+            assert_unreached("SuccessCallback is invoked");\r
+        });\r
+\r
+        errorCallback = {\r
+            onerror: t.step_func(function () {\r
+                assert_unreached("Invalid callback invoked");\r
+            })\r
+        };\r
+\r
+        adapter = tizen.bluetooth.getLEAdapter();\r
+        advertiseData = new tizen.BluetoothLEAdvertiseData();\r
+        assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+            function () {\r
+                adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback, errorCallback);\r
+            }, "Given incorrect errorCallback.");\r
+        adapter.stopAdvertise();\r
+        t.done();\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index b9aaff78458aed02c5504984f775db2d9663cf45..506dd81189ae47a0e99fdd0f05b2bcf456ad2013 100755 (executable)
@@ -1,45 +1,49 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startAdvertise_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startAdvertise_exist
-//==== LABEL Check if startAdvertise method exists
-//==== PRIORITY P0
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startAdvertise M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA ME
-
-test(function () {
-    var adapter = tizen.bluetooth.getLEAdapter();
-    check_method_exists(adapter, "startAdvertise");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startAdvertise_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startAdvertise_exist\r
+//==== LABEL Check if startAdvertise method exists\r
+//==== PRIORITY P0\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startAdvertise M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA ME\r
+\r
+test(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        var adapter = tizen.bluetooth.getLEAdapter();\r
+        check_method_exists(adapter, "startAdvertise");\r
+\r
+    }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index e20dbbf601b986104cbfc8f3dd116dc8f03c3c8b..45df803f9d30ec7867fd5d7ffe546c75be4ff285 100755 (executable)
@@ -1,50 +1,54 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startAdvertise_misarg</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startAdvertise_misarg
-//==== LABEL Check startAdvertise with missing all argument
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MMA
-
-var adapter;
-
-test(function () {
-    adapter = tizen.bluetooth.getLEAdapter();
-    assert_throws(TYPE_MISMATCH_EXCEPTION,
-        function () {
-            adapter.startAdvertise();
-        }, "Method with non optional argument.");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startAdvertise_misarg</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startAdvertise_misarg\r
+//==== LABEL Check startAdvertise with missing all argument\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MMA\r
+\r
+var adapter;\r
+\r
+test(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        adapter = tizen.bluetooth.getLEAdapter();\r
+        assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+            function () {\r
+                adapter.startAdvertise();\r
+            }, "Method with non optional argument.");\r
+\r
+    }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 611cef8ea433ad140b01982ac9aee627b86d7d93..72993e78ad5a96e3eef6495482e2ec3d87c795f2 100755 (executable)
@@ -1,80 +1,86 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startAdvertise_mode_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startAdvertise_mode_TypeMismatch
-//==== LABEL Check whether startAdvertise() method called with invalid mode argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i, mode,
-    conversionTable, errorCallback, successCallback, advertiseDataInit, advertiseData;
-
-t.step(function () {
-
-    advertiseDataInit = {
-        includeName: true,
-        includeTxPowerLevel: true,
-        appearance: 192,
-        serviceuuids: ["180f"],
-        solicitationuuids: ["180d"]
-    };
-
-    successCallback = t.step_func(function () {
-        assert_unreached("SuccessCallback should not be invoked");
-    });
-
-    errorCallback = t.step_func(function (e) {
-        assert_unreached("errorCallback exception:" + e.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);
-    conversionTable = getTypeConversionExceptions("enum", true, true);
-    for(i = 0; i < conversionTable.length; i++) {
-        mode = conversionTable[i][0];
-        exceptionName = conversionTable[i][1];
-
-        assert_throws({name: exceptionName},
-            function () {
-                adapter.startAdvertise(advertiseData, "ADVERTISE", successCallback, errorCallback, mode, true);
-            }, "Given incorrect mode.");
-    }
-    adapter.stopAdvertise();
-    t.done();
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startAdvertise_mode_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startAdvertise_mode_TypeMismatch\r
+//==== LABEL Check whether startAdvertise() method called with invalid mode argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i, mode,\r
+    conversionTable, errorCallback, successCallback, advertiseDataInit, advertiseData;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+\r
+        advertiseDataInit = {\r
+            includeName: true,\r
+            includeTxPowerLevel: true,\r
+            appearance: 192,\r
+            serviceuuids: ["180f"],\r
+            solicitationuuids: ["180d"]\r
+        };\r
+\r
+        successCallback = t.step_func(function () {\r
+            assert_unreached("SuccessCallback should not be invoked");\r
+        });\r
+\r
+        errorCallback = t.step_func(function (e) {\r
+            assert_unreached("errorCallback exception:" + e.message);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getLEAdapter();\r
+        advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);\r
+        conversionTable = getTypeConversionExceptions("enum", true, true);\r
+        for (i = 0; i < conversionTable.length; i++) {\r
+            mode = conversionTable[i][0];\r
+            exceptionName = conversionTable[i][1];\r
+\r
+            assert_throws({ name: exceptionName },\r
+                function () {\r
+                    adapter.startAdvertise(advertiseData, "ADVERTISE", successCallback, errorCallback, mode, true);\r
+                }, "Given incorrect mode.");\r
+        }\r
+        adapter.stopAdvertise();\r
+        t.done();\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 9a9a0698ae93e89148d86403ed54da69c556c20a..17aa7be033b25b41da911ed7116b9aa36fdf0e70 100755 (executable)
@@ -1,79 +1,85 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startAdvertise_packetType_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startAdvertise_packetType_TypeMismatch
-//==== LABEL Check whether startAdvertise() method called with invalid packetType argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i, packetType,
-    conversionTable, errorCallback, successCallback, advertiseDataInit, advertiseData;
-
-t.step(function () {
-
-    advertiseDataInit = {
-        includeName: true,
-        includeTxPowerLevel: true,
-        appearance: 192,
-        serviceuuids: ["180f"],
-        solicitationuuids: ["180d"]
-    };
-
-    successCallback = t.step_func(function () {
-        assert_unreached("SuccessCallback should not be invoked");
-    });
-
-    errorCallback = t.step_func(function (e) {
-        assert_unreached("errorCallback exception:" + e.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);
-    conversionTable = getTypeConversionExceptions("enum", false);
-    for(i = 0; i < conversionTable.length; i++) {
-        packetType = conversionTable[i][0];
-        exceptionName = conversionTable[i][1];
-
-        assert_throws({name: exceptionName},
-            function () {
-                adapter.startAdvertise(advertiseData, packetType, successCallback, errorCallback, "BALANCED", true);
-            }, "Given incorrect packetType.");
-    }
-    t.done();
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startAdvertise_packetType_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startAdvertise_packetType_TypeMismatch\r
+//==== LABEL Check whether startAdvertise() method called with invalid packetType argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i, packetType,\r
+    conversionTable, errorCallback, successCallback, advertiseDataInit, advertiseData;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+\r
+        advertiseDataInit = {\r
+            includeName: true,\r
+            includeTxPowerLevel: true,\r
+            appearance: 192,\r
+            serviceuuids: ["180f"],\r
+            solicitationuuids: ["180d"]\r
+        };\r
+\r
+        successCallback = t.step_func(function () {\r
+            assert_unreached("SuccessCallback should not be invoked");\r
+        });\r
+\r
+        errorCallback = t.step_func(function (e) {\r
+            assert_unreached("errorCallback exception:" + e.message);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getLEAdapter();\r
+        advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);\r
+        conversionTable = getTypeConversionExceptions("enum", false);\r
+        for (i = 0; i < conversionTable.length; i++) {\r
+            packetType = conversionTable[i][0];\r
+            exceptionName = conversionTable[i][1];\r
+\r
+            assert_throws({ name: exceptionName },\r
+                function () {\r
+                    adapter.startAdvertise(advertiseData, packetType, successCallback, errorCallback, "BALANCED", true);\r
+                }, "Given incorrect packetType.");\r
+        }\r
+        t.done();\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index e8cc39af822400d29768376a526636684c0589bc..ae51bf674fe297a22e34ae1ee710dce0226d2672 100755 (executable)
@@ -1,67 +1,73 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startAdvertise_successCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startAdvertise_successCallback_TypeMismatch
-//==== LABEL Check whether startAdvertise() method called with invalid successCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
-    conversionTable, errorCallback, successCallback, advertiseData;
-
-t.step(function () {
-
-    errorCallback = t.step_func(function (e) {
-        assert_unreached("successCallback exception:" + e.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    advertiseData = new tizen.BluetoothLEAdvertiseData();
-    conversionTable = getTypeConversionExceptions("functionObject", true);
-    for(i = 0; i < conversionTable.length; i++) {
-        successCallback = conversionTable[i][0];
-        exceptionName = conversionTable[i][1];
-
-        assert_throws({name: exceptionName},
-            function () {
-                adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback, errorCallback);
-            }, "Given incorrect errorCallback.");
-    }
-    t.done();
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startAdvertise_successCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startAdvertise_successCallback_TypeMismatch\r
+//==== LABEL Check whether startAdvertise() method called with invalid successCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+    conversionTable, errorCallback, successCallback, advertiseData;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+\r
+        errorCallback = t.step_func(function (e) {\r
+            assert_unreached("successCallback exception:" + e.message);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getLEAdapter();\r
+        advertiseData = new tizen.BluetoothLEAdvertiseData();\r
+        conversionTable = getTypeConversionExceptions("functionObject", true);\r
+        for (i = 0; i < conversionTable.length; i++) {\r
+            successCallback = conversionTable[i][0];\r
+            exceptionName = conversionTable[i][1];\r
+\r
+            assert_throws({ name: exceptionName },\r
+                function () {\r
+                    adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback, errorCallback);\r
+                }, "Given incorrect errorCallback.");\r
+        }\r
+        t.done();\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 2a85aff5e98a83d17ac3b3d60cf48e2265ca397b..a8bc764b0efa7dd8cd124437e38d6831b7ecf9a6 100755 (executable)
@@ -1,65 +1,71 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startAdvertise_successCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startAdvertise_successCallback_invalid_cb
-//==== LABEL Check startAdvertise() argument successCallback validation - use simple function
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
-    successCallback, errorCallback, advertiseData;
-
-t.step(function () {
-    successCallback = {
-        onsuccess: t.step_func(function () {
-            assert_unreached("Method startAdvertise shouldn't end successfully.");
-        })
-    };
-
-    errorCallback = t.step_func(function (e) {
-        assert_unreached("errorCB exception:" + e.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    advertiseData = new tizen.BluetoothLEAdvertiseData();
-    assert_throws(TYPE_MISMATCH_EXCEPTION,
-        function () {
-            adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback, errorCallback);
-        }, "Given incorrect successCallback.");
-    t.done();
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startAdvertise_successCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startAdvertise_successCallback_invalid_cb\r
+//==== LABEL Check startAdvertise() argument successCallback validation - use simple function\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+    successCallback, errorCallback, advertiseData;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        successCallback = {\r
+            onsuccess: t.step_func(function () {\r
+                assert_unreached("Method startAdvertise shouldn't end successfully.");\r
+            })\r
+        };\r
+\r
+        errorCallback = t.step_func(function (e) {\r
+            assert_unreached("errorCB exception:" + e.message);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getLEAdapter();\r
+        advertiseData = new tizen.BluetoothLEAdvertiseData();\r
+        assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+            function () {\r
+                adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback, errorCallback);\r
+            }, "Given incorrect successCallback.");\r
+        t.done();\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index d0c741a08ab7d87958794b81e6c387914bc6ab02..5cc669708dfb3bfbb58d748fa8ee91c6cdb70632 100755 (executable)
@@ -1,62 +1,68 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startAdvertise_with_connectable</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startAdvertise_with_connectable
-//==== LABEL Check with startAdvertise arguments work properity(with all optional arguments)
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MOA MAST MR
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), successCallback, errorCallback,
-    retValue = null, advertiseData;
-
-t.step(function () {
-    successCallback = t.step_func(function (state) {
-        assert_equals(retValue, undefined, "startAdvertise returns wrong value");
-        adapter.stopAdvertise();
-        t.done();
-        });
-
-    errorCallback = t.step_func(function (e) {
-        assert_unreached("startAdvertise errorCallback exception:" + e.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    advertiseData = new tizen.BluetoothLEAdvertiseData();
-    retValue = adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback, errorCallback, "LOW_ENERGY", false);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startAdvertise_with_connectable</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startAdvertise_with_connectable\r
+//==== LABEL Check with startAdvertise arguments work properity(with all optional arguments)\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MOA MAST MR\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), successCallback, errorCallback,\r
+    retValue = null, advertiseData;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        successCallback = t.step_func(function (state) {\r
+            assert_equals(retValue, undefined, "startAdvertise returns wrong value");\r
+            adapter.stopAdvertise();\r
+            t.done();\r
+        });\r
+\r
+        errorCallback = t.step_func(function (e) {\r
+            assert_unreached("startAdvertise errorCallback exception:" + e.message);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getLEAdapter();\r
+        advertiseData = new tizen.BluetoothLEAdvertiseData();\r
+        retValue = adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback, errorCallback, "LOW_ENERGY", false);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index e1d75e169ceb8a2ea0445b07538740019ff407a2..8872d2572d93fdc6810a518da05cfe4edd3160c8 100755 (executable)
@@ -1,59 +1,59 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startScan</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startScan
-//==== LABEL Check with non-optional arguments startScan(valid_successCallback)
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startScan M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MMINA MAST MR
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB,
-    retValue = null;
-
-t.step(function () {
-    SuccessCB = t.step_func(function (device) {
-        assert_equals(retValue, undefined, "startScan returns wrong value");
-        adapter.stopScan();
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    retValue = adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startScan</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startScan\r
+//==== LABEL Check with non-optional arguments startScan(valid_successCallback)\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startScan M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MMINA MAST MR\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB,\r
+    retValue = null;\r
+\r
+t.step(function () {\r
+    SuccessCB = t.step_func(function (device) {\r
+        assert_equals(retValue, undefined, "startScan returns wrong value");\r
+        adapter.stopScan();\r
+        t.done();\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    retValue = adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 44a036ec33b27e1bda524e5dd3a5da77afba4d0c..714b87e8859a6112fa713bcb81c9eed514b3bb51 100755 (executable)
@@ -1,72 +1,72 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startScan_InvalidStateError</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startScan_InvalidStateError
-//==== LABEL Check startScan() method could throw InvalidStateError exception
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startScan M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), successCB, errorCB, successCB1, errorCB1;
-
-t.step(function () {
-    successCB1 =  t.step_func(function () {
-        assert_unreached("Invalid Success callback invoked");
-    });
-
-    errorCB1 = t.step_func(function (e) {
-        assert_unreached("Invalid Error callback invoked");
-    });
-
-    successCB =  t.step_func(function () {
-        assert_throws({name: 'InvalidStateError'}, function () {
-            adapter.startScan(successCB1, errorCB1);
-        }, "InvalidStateError should be thrown when bluetooth is turned off");
-        t.done();
-    });
-
-    errorCB = t.step_func(function (e) {
-        assert_unreached("Invalid Error callback invoked");
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(successCB, errorCB);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startScan_InvalidStateError</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startScan_InvalidStateError\r
+//==== LABEL Check startScan() method could throw InvalidStateError exception\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startScan M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), successCB, errorCB, successCB1, errorCB1;\r
+\r
+t.step(function () {\r
+    successCB1 =  t.step_func(function () {\r
+        assert_unreached("Invalid Success callback invoked");\r
+    });\r
+\r
+    errorCB1 = t.step_func(function (e) {\r
+        assert_unreached("Invalid Error callback invoked");\r
+    });\r
+\r
+    successCB =  t.step_func(function () {\r
+        assert_throws({name: 'InvalidStateError'}, function () {\r
+            adapter.startScan(successCB1, errorCB1);\r
+        }, "InvalidStateError should be thrown when bluetooth is turned off");\r
+        t.done();\r
+    });\r
+\r
+    errorCB = t.step_func(function (e) {\r
+        assert_unreached("Invalid Error callback invoked");\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(successCB, errorCB);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 9871ff1b80d907569abf9b89baa7fd83f986fe27..c75885a9e968f7161dfab031d2a4f99fe41dd537 100755 (executable)
@@ -1,65 +1,71 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startScan_errorCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startScan_errorCallback_TypeMismatch
-//==== LABEL Check whether startScan() method called with invalid errorCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startScan M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
-    conversionTable, errorCallback, successCallback;
-
-t.step(function () {
-    successCallback = t.step_func(function () {
-        assert_unreached("Success callback invoked");
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    conversionTable = getTypeConversionExceptions("functionObject", true);
-    for(i = 0; i < conversionTable.length; i++) {
-        errorCallback = conversionTable[i][0];
-        exceptionName = conversionTable[i][1];
-
-        assert_throws({name: exceptionName},
-            function () {
-                adapter.startScan(successCallback, errorCallback);
-            }, "Given incorrect errorCallback.");
-    }
-    t.done();
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startScan_errorCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startScan_errorCallback_TypeMismatch\r
+//==== LABEL Check whether startScan() method called with invalid errorCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startScan M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+    conversionTable, errorCallback, successCallback;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        successCallback = t.step_func(function () {\r
+            assert_unreached("Success callback invoked");\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getLEAdapter();\r
+        adapter.stopScan();\r
+        conversionTable = getTypeConversionExceptions("functionObject", true);\r
+        for (i = 0; i < conversionTable.length; i++) {\r
+            errorCallback = conversionTable[i][0];\r
+            exceptionName = conversionTable[i][1];\r
+\r
+            assert_throws({ name: exceptionName },\r
+                function () {\r
+                    adapter.startScan(successCallback, errorCallback);\r
+                }, "Given incorrect errorCallback.");\r
+        }\r
+        t.done();\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 18f2f8eece262cbcf82e465f50d7d7f72d70bfee..9b5b1129abaafc1d2060e706636137daf817af43 100755 (executable)
@@ -1,65 +1,71 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startScan_errorCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startScan_errorCallback_invalid_cb
-//==== LABEL Check startScan() argument errorCallback validation - use simple function
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startScan M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
-    successCB, errorCB;
-
-t.step(function () {
-    successCB = t.step_func(function () {
-        assert_unreached("Success callback invoked");
-    });
-
-    errorCB = {
-        onerror: t.step_func(function () {
-            assert_unreached("Invalid callback invoked");
-        })
-    };
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    assert_throws(TYPE_MISMATCH_EXCEPTION,
-        function () {
-            adapter.startScan(successCB, errorCB);
-        }, "Given incorrect successCallback.");
-    t.done();
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startScan_errorCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startScan_errorCallback_invalid_cb\r
+//==== LABEL Check startScan() argument errorCallback validation - use simple function\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startScan M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+    successCB, errorCB;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        successCB = t.step_func(function () {\r
+            assert_unreached("Success callback invoked");\r
+        });\r
+\r
+        errorCB = {\r
+            onerror: t.step_func(function () {\r
+                assert_unreached("Invalid callback invoked");\r
+            })\r
+        };\r
+\r
+        adapter = tizen.bluetooth.getLEAdapter();\r
+        adapter.stopScan();\r
+        assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+            function () {\r
+                adapter.startScan(successCB, errorCB);\r
+            }, "Given incorrect successCallback.");\r
+        t.done();\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index cef6a13e8d4f3210a4a9fedc4c7bf24df70575d0..04ffb287ec5b77de17eba2d5a6646b4c6bdfcc19 100755 (executable)
@@ -1,45 +1,49 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startScan_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startScan_exist
-//==== LABEL Method of startScan exists in BluetoothLEAdapter
-//==== PRIORITY P0
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startScan M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA ME
-
-test(function () {
-    var adapter = tizen.bluetooth.getLEAdapter();
-    check_method_exists(adapter, "startScan");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startScan_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startScan_exist\r
+//==== LABEL Method of startScan exists in BluetoothLEAdapter\r
+//==== PRIORITY P0\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startScan M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA ME\r
+\r
+test(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        var adapter = tizen.bluetooth.getLEAdapter();\r
+        check_method_exists(adapter, "startScan");\r
+\r
+    }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 5937d7481d674e9f1023f98c3481c1023494c073..8a048ce54ee1ab8f06dafa05d82bd2a55ae2635a 100755 (executable)
@@ -1,49 +1,53 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startScan_misarg</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startScan_misarg
-//==== LABEL Check startScan with missing all argument
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startScan M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MMA
-
-test(function () {
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    assert_throws ({name:"TypeMismatchError"},
-        function () {
-            adapter.startScan();
-        }, "Method with missing non-optional argument.");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startScan_misarg</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startScan_misarg\r
+//==== LABEL Check startScan with missing all argument\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startScan M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MMA\r
+\r
+test(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        adapter = tizen.bluetooth.getLEAdapter();\r
+        adapter.stopScan();\r
+        assert_throws({ name: "TypeMismatchError" },\r
+            function () {\r
+                adapter.startScan();\r
+            }, "Method with missing non-optional argument.");\r
+\r
+    }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 97059ce891cf0d13bfbb3a8d810491381b582be4..665506aa18a621f68e696b540f81491df51625cc 100755 (executable)
@@ -1,65 +1,71 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startScan_successCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startScan_successCallback_TypeMismatch
-//==== LABEL Check whether startScan() method called with invalid successCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startScan M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
-    conversionTable, errorCallback, successCallback;
-
-t.step(function () {
-    errorCallback = t.step_func(function (e) {
-        assert_unreached("errorCallback exception:" + e.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    conversionTable = getTypeConversionExceptions("functionObject", false);
-    for(i = 0; i < conversionTable.length; i++) {
-        successCallback = conversionTable[i][0];
-        exceptionName = conversionTable[i][1];
-
-        assert_throws(TYPE_MISMATCH_EXCEPTION,
-            function () {
-                adapter.startScan(successCallback, errorCallback);
-            }, "Given incorrect successCallback.");
-    }
-    t.done();
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startScan_successCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startScan_successCallback_TypeMismatch\r
+//==== LABEL Check whether startScan() method called with invalid successCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startScan M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+    conversionTable, errorCallback, successCallback;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        errorCallback = t.step_func(function (e) {\r
+            assert_unreached("errorCallback exception:" + e.message);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getLEAdapter();\r
+        adapter.stopScan();\r
+        conversionTable = getTypeConversionExceptions("functionObject", false);\r
+        for (i = 0; i < conversionTable.length; i++) {\r
+            successCallback = conversionTable[i][0];\r
+            exceptionName = conversionTable[i][1];\r
+\r
+            assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+                function () {\r
+                    adapter.startScan(successCallback, errorCallback);\r
+                }, "Given incorrect successCallback.");\r
+        }\r
+        t.done();\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 3ba95a99a01baebd171e687221d865181fe3e878..ad8e2a2643f0d492397c061767cfbe0a590a5d33 100755 (executable)
@@ -1,66 +1,72 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startScan_successCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startScan_successCallback_invalid_cb
-//==== LABEL Check startScan() argument successCallback validation - use simple function
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startScan M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 180000});
-
-var adapter, t = async_test(document.title, {timeout: 180000}),
-    InvalidSuccessCB, errorCB;
-
-t.step(function () {
-    InvalidSuccessCB = {
-        onsuccess: t.step_func(function (device) {
-            assert_unreached("Invalid successCallback invoked.");
-        })
-    };
-
-    errorCB = t.step_func(function (e) {
-        assert_unreached("errorCB exception:" + e.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    assert_throws(TYPE_MISMATCH_EXCEPTION,
-        function () {
-            adapter.startScan(InvalidSuccessCB, errorCB);
-        }, "Given incorrect successCallback.");
-    t.done();
-
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startScan_successCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startScan_successCallback_invalid_cb\r
+//==== LABEL Check startScan() argument successCallback validation - use simple function\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startScan M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter, t = async_test(document.title, {timeout: 180000}),\r
+    InvalidSuccessCB, errorCB;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        InvalidSuccessCB = {\r
+            onsuccess: t.step_func(function (device) {\r
+                assert_unreached("Invalid successCallback invoked.");\r
+            })\r
+        };\r
+\r
+        errorCB = t.step_func(function (e) {\r
+            assert_unreached("errorCB exception:" + e.message);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getLEAdapter();\r
+        adapter.stopScan();\r
+        assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+            function () {\r
+                adapter.startScan(InvalidSuccessCB, errorCB);\r
+            }, "Given incorrect successCallback.");\r
+        t.done();\r
+\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 420e1fd28f3921bcf9bb542a9ef9f0daf7f5f3f0..a8dfdf4afa1b16d6a15b3ec436452c28dd4f86b6 100755 (executable)
@@ -1,61 +1,67 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startScan_with_errorCallback</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startScan_with_errorCallback
-//==== LABEL Check with optional arguments startScan(valid_successCallback, errorCallback)
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startScan M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MOA MAST
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), successCB, errorCB;
-
-t.step(function () {
-    successCB = t.step_func(function (device) {
-        adapter.stopScan();
-        t.done();
-    });
-
-    errorCB = t.step_func(function (e) {
-        assert_unreached("startScan ErrorCB exception:" + e.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(successCB, errorCB);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startScan_with_errorCallback</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startScan_with_errorCallback\r
+//==== LABEL Check with optional arguments startScan(valid_successCallback, errorCallback)\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startScan M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MOA MAST\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), successCB, errorCB;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        successCB = t.step_func(function (device) {\r
+            adapter.stopScan();\r
+            t.done();\r
+        });\r
+\r
+        errorCB = t.step_func(function (e) {\r
+            assert_unreached("startScan ErrorCB exception:" + e.message);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getLEAdapter();\r
+        adapter.stopScan();\r
+        adapter.startScan(successCB, errorCB);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 73aeabbd1bdb9796d4992fc5c0a4477a53836128..098cf57341ebc6b29a80c60a2b89ed6e137b5ef0 100755 (executable)
@@ -1,57 +1,63 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_stopAdvertise</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_stopAdvertise
-//==== LABEL Check with stopAdvertise method of BluetoothLEAdapter work properly
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:stopAdvertise M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MNA MNAST MR
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), successCallback,
-    retValue = null, advertiseData;
-
-t.step(function () {
-    successCallback = t.step_func(function (state) {
-        retValue = adapter.stopAdvertise();
-        assert_equals(retValue, undefined, "stopScan returns wrong value");
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    advertiseData = new tizen.BluetoothLEAdvertiseData();
-    adapter.stopAdvertise();
-    adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_stopAdvertise</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_stopAdvertise\r
+//==== LABEL Check with stopAdvertise method of BluetoothLEAdapter work properly\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:stopAdvertise M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MNA MNAST MR\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), successCallback,\r
+    retValue = null, advertiseData;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        successCallback = t.step_func(function (state) {\r
+            retValue = adapter.stopAdvertise();\r
+            assert_equals(retValue, undefined, "stopScan returns wrong value");\r
+            t.done();\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getLEAdapter();\r
+        advertiseData = new tizen.BluetoothLEAdvertiseData();\r
+        adapter.stopAdvertise();\r
+        adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 7b6d2f54ae0bc2262770ff3862793e4a1afa2c7c..43cd84284028d177e1daac0f11ed805dc768a6f2 100755 (executable)
@@ -1,44 +1,48 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_stopAdvertise_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_stopAdvertise_exist
-//==== LABEL Check if stopAdvertise method exists
-//==== PRIORITY P0
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:stopAdvertise M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA ME
-
-test(function () {
-    var adapter = tizen.bluetooth.getLEAdapter();
-    check_method_exists(adapter, "stopAdvertise");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_stopAdvertise_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_stopAdvertise_exist\r
+//==== LABEL Check if stopAdvertise method exists\r
+//==== PRIORITY P0\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:stopAdvertise M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA ME\r
+\r
+test(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        var adapter = tizen.bluetooth.getLEAdapter();\r
+        check_method_exists(adapter, "stopAdvertise");\r
+\r
+    }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 1c898f6caa42b42d57a1b27b14a5d71ce30f6000..27a61d7a90deb8179bb66ac42b6a838923fb0fdb 100755 (executable)
@@ -1,46 +1,50 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_stopAdvertise_extra_argument</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_stopAdvertise_extra_argument
-//==== LABEL Check if method stopAdvertise of BluetoothLEAdapter accepts extra argument
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:stopAdvertise M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MNAEX
-
-var adapter;
-
-test(function () {
-    adapter = tizen.bluetooth.getLEAdapter();
-    checkExtraArgument(adapter, "stopAdvertise");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_stopAdvertise_extra_argument</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_stopAdvertise_extra_argument\r
+//==== LABEL Check if method stopAdvertise of BluetoothLEAdapter accepts extra argument\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:stopAdvertise M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MNAEX\r
+\r
+var adapter;\r
+\r
+test(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        adapter = tizen.bluetooth.getLEAdapter();\r
+        checkExtraArgument(adapter, "stopAdvertise");\r
+\r
+    }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 8bf8ea1c4a6bae97bea4a6b6efd5403998d8be90..2dba229cc02d9a75497a4381b1c69cd6792e8a17 100755 (executable)
@@ -1,62 +1,62 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_stopScan</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_stopScan
-//==== LABEL check stopScan method is working well in BluetoothLEAdapter
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:stopScan M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MNA MNAST MR
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), successCB, errorCB,
-    retValue = null;
-
-t.step(function () {
-    successCB = t.step_func(function (device) {
-        retValue = adapter.stopScan();
-        assert_equals(retValue, undefined, "stopScan returns wrong value");
-        t.done();
-    });
-
-    errorCB = t.step_func(function (e) {
-        assert_unreached("startScanErrorCB exception:" + e.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(successCB, errorCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_stopScan</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_stopScan\r
+//==== LABEL check stopScan method is working well in BluetoothLEAdapter\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:stopScan M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MNA MNAST MR\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), successCB, errorCB,\r
+    retValue = null;\r
+\r
+t.step(function () {\r
+    successCB = t.step_func(function (device) {\r
+        retValue = adapter.stopScan();\r
+        assert_equals(retValue, undefined, "stopScan returns wrong value");\r
+        t.done();\r
+    });\r
+\r
+    errorCB = t.step_func(function (e) {\r
+        assert_unreached("startScanErrorCB exception:" + e.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(successCB, errorCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index c9969ace4489a0167af05bd73748973d4070f852..9382d4681ec8ada09b29069b512f38c5ca5564bf 100755 (executable)
@@ -1,46 +1,50 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_stopScan_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_stopScan_exist
-//==== LABEL Check if stopScan method exist
-//==== PRIORITY P0
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:stopScan M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA ME
-
-var adapter;
-
-test(function () {
-    adapter = tizen.bluetooth.getLEAdapter();
-    check_method_exists(adapter, "stopScan");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_stopScan_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_stopScan_exist\r
+//==== LABEL Check if stopScan method exist\r
+//==== PRIORITY P0\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:stopScan M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA ME\r
+\r
+var adapter;\r
+\r
+test(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        adapter = tizen.bluetooth.getLEAdapter();\r
+        check_method_exists(adapter, "stopScan");\r
+\r
+    }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index f2edea7f6129f97266ccd7541745a1d25013b1cc..0b2a7c48e43be48d253bf4c39742ce6fbe67ed18 100755 (executable)
@@ -1,46 +1,50 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_stopScan_extra_argument</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_stopScan_extra_argument
-//==== LABEL Check if method stopScan of BluetoothLEAdapter accepts extra argument
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:stopScan M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MNAEX
-
-var adapter;
-
-test(function () {
-    adapter = tizen.bluetooth.getLEAdapter();
-    checkExtraArgument(adapter, "stopScan");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_stopScan_extra_argument</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_stopScan_extra_argument\r
+//==== LABEL Check if method stopScan of BluetoothLEAdapter accepts extra argument\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:stopScan M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MNAEX\r
+\r
+var adapter;\r
+\r
+test(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        adapter = tizen.bluetooth.getLEAdapter();\r
+        checkExtraArgument(adapter, "stopScan");\r
+\r
+    }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index eaa01fffe49748d5aced2143da5174588d8064f9..a3c7f017b7c7e8e5d74065d803623bdfc2bc7250 100755 (executable)
@@ -1,43 +1,47 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdvertiseCallback_notexist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdvertiseCallback_notexist
-//==== LABEL Check if interface BluetoothLEAdvertiseCallback exists,it should not
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseCallback:BluetoothLEAdvertiseCallback U
-//==== SPEC_URL TBD
-//==== PRIORITY P3
-//==== TEST_CRITERIA CBNIO
-
-test(function () {
-    check_no_interface_object("BluetoothLEAdvertiseCallback");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdvertiseCallback_notexist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdvertiseCallback_notexist\r
+//==== LABEL Check if interface BluetoothLEAdvertiseCallback exists,it should not\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseCallback:BluetoothLEAdvertiseCallback U\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P3\r
+//==== TEST_CRITERIA CBNIO\r
+\r
+test(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        check_no_interface_object("BluetoothLEAdvertiseCallback");\r
+\r
+    }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index b3b8b6254ce62db298d8fd471bdee36bf20d4dd5..898d2d4c6ff08a554c3fca6832ab06d20ce64339 100755 (executable)
@@ -1,64 +1,70 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdvertiseCallback_onstate</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdvertiseCallback_onstate
-//==== LABEL Check if BluetoothLEAdvertiseCallback onstate is called and if its arguments have proper type
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseCallback:onstate M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA CBOA CBT
-
-setup({timeout: 60000});
-
-var adapter = null, t = async_test(document.title, {timeout: 60000}), successCallback, errorCallback, advertiseData, advertiseOptions;
-
-t.step(function () {
-    successCallback = t.step_func(function (state) {
-        assert_type(state, "string", "state type is wrong");
-        assert_equals(state, "STARTED", "state type check");
-        adapter.stopAdvertise();
-        t.done();
-    });
-
-    errorCallback = t.step_func(function (e) {
-        assert_unreached("startAdvertise errorCallback exception:" + e.message);
-    });
-
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    advertiseData = new tizen.BluetoothLEAdvertiseData();
-    retValue = adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback, errorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdvertiseCallback_onstate</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdvertiseCallback_onstate\r
+//==== LABEL Check if BluetoothLEAdvertiseCallback onstate is called and if its arguments have proper type\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseCallback:onstate M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA CBOA CBT\r
+\r
+setup({timeout: 60000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 60000}), successCallback, errorCallback, advertiseData, advertiseOptions;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        successCallback = t.step_func(function (state) {\r
+            assert_type(state, "string", "state type is wrong");\r
+            assert_equals(state, "STARTED", "state type check");\r
+            adapter.stopAdvertise();\r
+            t.done();\r
+        });\r
+\r
+        errorCallback = t.step_func(function (e) {\r
+            assert_unreached("startAdvertise errorCallback exception:" + e.message);\r
+        });\r
+\r
+\r
+        adapter = tizen.bluetooth.getLEAdapter();\r
+        advertiseData = new tizen.BluetoothLEAdvertiseData();\r
+        retValue = adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback, errorCallback);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index ab0fcd8bb49e60d353d974be35c3ded38d5ec0a2..6077e07347e3416f8bd9af4d78258e2c3dc3030d 100755 (executable)
@@ -1,53 +1,57 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdvertiseData_appearance_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdvertiseData_appearance_attribute
-//==== LABEL Check if BluetoothLEAdvertiseData have appearance attribute with proper type and is writeable
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:appearance A
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA AE AT ADV ASG
-
-test(function () {
-    var advertiseDataInit, advertiseData, battery_svc_uuid_16 = "180f", heart_rate_svc_uuid_16 = "180d";
-
-    advertiseDataInit = {
-        includeName: true,
-        includeTxPowerLevel: true,
-        uuids: [battery_svc_uuid_16],
-        solicitationuuids: [heart_rate_svc_uuid_16]
-    };
-
-    advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);
-    check_attribute(advertiseData, "appearance", null, "unsigned long", 192);
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdvertiseData_appearance_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdvertiseData_appearance_attribute\r
+//==== LABEL Check if BluetoothLEAdvertiseData have appearance attribute with proper type and is writeable\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:appearance A\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA AE AT ADV ASG\r
+\r
+test(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        var advertiseDataInit, advertiseData, battery_svc_uuid_16 = "180f", heart_rate_svc_uuid_16 = "180d";\r
+\r
+        advertiseDataInit = {\r
+            includeName: true,\r
+            includeTxPowerLevel: true,\r
+            uuids: [battery_svc_uuid_16],\r
+            solicitationuuids: [heart_rate_svc_uuid_16]\r
+        };\r
+\r
+        advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);\r
+        check_attribute(advertiseData, "appearance", null, "unsigned long", 192);\r
+\r
+    }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 74d6c2088b58cf3e2870fd65e6fbef97f2c2040f..82e3b724b56ff50a1dd2b6e697bcebb04db244b9 100755 (executable)
@@ -1,58 +1,62 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdvertiseData_constructor</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdvertiseData_constructor
-//==== LABEL Check BluetoothLEAdvertiseData constructor
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:BluetoothLEAdvertiseData C
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA CONSTRA CONSTRM
-
-test(function () {
-    var advertiseDataInit, advertiseData, battery_svc_uuid_16 = "180f", heart_rate_svc_uuid_16 = "180d";
-
-    advertiseDataInit = {
-        includeName: true,
-        includeTxPowerLevel: true,
-        appearance: 192,
-        uuids: [battery_svc_uuid_16],
-        solicitationuuids: [heart_rate_svc_uuid_16]
-    };
-
-    advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);
-    assert_equals(advertiseData.includeName, advertiseDataInit.includeName, "includeName should not be equal");
-    assert_equals(advertiseData.includeTxPowerLevel, advertiseDataInit.includeTxPowerLevel, "includeTxPowerLevel should not be equal");
-    assert_equals(advertiseData.appearance, advertiseDataInit.appearance, "appearance should not be equal");
-    assert_equals(advertiseData.uuids[0], advertiseDataInit.uuids[0], "uuids should not be equal");
-    assert_equals(advertiseData.solicitationuuids[0], advertiseDataInit.solicitationuuids[0], "solicitationuuids should not be equal");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdvertiseData_constructor</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdvertiseData_constructor\r
+//==== LABEL Check BluetoothLEAdvertiseData constructor\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:BluetoothLEAdvertiseData C\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA CONSTRA CONSTRM\r
+\r
+test(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        var advertiseDataInit, advertiseData, battery_svc_uuid_16 = "180f", heart_rate_svc_uuid_16 = "180d";\r
+\r
+        advertiseDataInit = {\r
+            includeName: true,\r
+            includeTxPowerLevel: true,\r
+            appearance: 192,\r
+            uuids: [battery_svc_uuid_16],\r
+            solicitationuuids: [heart_rate_svc_uuid_16]\r
+        };\r
+\r
+        advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);\r
+        assert_equals(advertiseData.includeName, advertiseDataInit.includeName, "includeName should not be equal");\r
+        assert_equals(advertiseData.includeTxPowerLevel, advertiseDataInit.includeTxPowerLevel, "includeTxPowerLevel should not be equal");\r
+        assert_equals(advertiseData.appearance, advertiseDataInit.appearance, "appearance should not be equal");\r
+        assert_equals(advertiseData.uuids[0], advertiseDataInit.uuids[0], "uuids should not be equal");\r
+        assert_equals(advertiseData.solicitationuuids[0], advertiseDataInit.solicitationuuids[0], "solicitationuuids should not be equal");\r
+\r
+    }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index cd13abb0de0738ac5339f382955d70c74f50ee72..240b06e0b9e85016505a79a903764e7788a5719e 100755 (executable)
@@ -1,43 +1,47 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdvertiseData_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdvertiseData_exist
-//==== LABEL Check if BluetoothLEAdvertiseData exists
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:BluetoothLEAdvertiseData C
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA CONSTRF
-
-test(function () {
-    check_constructor("BluetoothLEAdvertiseData");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdvertiseData_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdvertiseData_exist\r
+//==== LABEL Check if BluetoothLEAdvertiseData exists\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:BluetoothLEAdvertiseData C\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA CONSTRF\r
+\r
+test(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        check_constructor("BluetoothLEAdvertiseData");\r
+\r
+    }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 957513ede7736535b54326f08bf05d124c624942..e14d3e94cf791a6498a9b8e844890063aa26139e 100755 (executable)
@@ -1,44 +1,48 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdvertiseData_extend</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdvertiseData_extend
-//==== LABEL Check if BluetoothLEAdvertiseData can have new properties added
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:BluetoothLEAdvertiseData U
-//==== SPEC_URL TBD
-//==== PRIORITY P3
-//==== TEST_CRITERIA OBX
-
-test(function () {
-    var advertiseData = new tizen.BluetoothLEAdvertiseData();
-    check_extensibility(advertiseData);
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdvertiseData_extend</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdvertiseData_extend\r
+//==== LABEL Check if BluetoothLEAdvertiseData can have new properties added\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:BluetoothLEAdvertiseData U\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P3\r
+//==== TEST_CRITERIA OBX\r
+\r
+test(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        var advertiseData = new tizen.BluetoothLEAdvertiseData();\r
+        check_extensibility(advertiseData);\r
+\r
+    }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 92807dbf51e9dfd2fdb500f3a188332eee0cd6bf..900d2aeae3fc29ae25725bb38147ade72314d2ab 100755 (executable)
@@ -1,57 +1,61 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdvertiseData_includeName_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdvertiseData_includeName_attribute
-//==== LABEL Check if BluetoothLEAdvertiseData have includeName attribute with proper type and is writeable
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:includeName A
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA AE AT ADV ASG
-
-test(function () {
-    var advertiseDataInit, advertiseData, battery_svc_uuid_16 = "180f", heart_rate_svc_uuid_16 = "180d";
-
-    advertiseDataInit = {
-        includeTxPowerLevel: true,
-        appearance: 192,
-        uuids: [battery_svc_uuid_16],
-        solicitationuuids: [heart_rate_svc_uuid_16]
-    };
-
-    advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);
-    assert_own_property(advertiseData, "includeName", "advertiseData does not own includeName property");
-    assert_equals(advertiseData.includeName, false, "includeName should be false by default");
-    assert_type(advertiseData.includeName, "boolean", "includeName isn't an boolean");
-    advertiseData.includeName = true;
-    assert_equals(advertiseData.includeName, true, "includeName should be true");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdvertiseData_includeName_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdvertiseData_includeName_attribute\r
+//==== LABEL Check if BluetoothLEAdvertiseData have includeName attribute with proper type and is writeable\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:includeName A\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA AE AT ADV ASG\r
+\r
+test(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        var advertiseDataInit, advertiseData, battery_svc_uuid_16 = "180f", heart_rate_svc_uuid_16 = "180d";\r
+\r
+        advertiseDataInit = {\r
+            includeTxPowerLevel: true,\r
+            appearance: 192,\r
+            uuids: [battery_svc_uuid_16],\r
+            solicitationuuids: [heart_rate_svc_uuid_16]\r
+        };\r
+\r
+        advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);\r
+        assert_own_property(advertiseData, "includeName", "advertiseData does not own includeName property");\r
+        assert_equals(advertiseData.includeName, false, "includeName should be false by default");\r
+        assert_type(advertiseData.includeName, "boolean", "includeName isn't an boolean");\r
+        advertiseData.includeName = true;\r
+        assert_equals(advertiseData.includeName, true, "includeName should be true");\r
+\r
+    }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 7f6463503300732bf8060da2821239e9a2f7d422..9ccdba377d1e74838595c95da7d3c4dbc4d8999d 100755 (executable)
@@ -1,57 +1,61 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdvertiseData_includeTxPowerLevel_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdvertiseData_includeTxPowerLevel_attribute
-//==== LABEL Check if BluetoothLEAdvertiseData have includeTxPowerLevel attribute with proper type and is writeable
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:includeTxPowerLevel A
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA AE AT ADV ASG
-
-test(function () {
-    var advertiseDataInit, advertiseData, battery_svc_uuid_16 = "180f", heart_rate_svc_uuid_16 = "180d";
-
-    advertiseDataInit = {
-        includeName: true,
-        appearance: 192,
-        uuids: [battery_svc_uuid_16],
-        solicitationuuids: [heart_rate_svc_uuid_16]
-    };
-
-    advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);
-    assert_own_property(advertiseData, "includeTxPowerLevel", "advertiseData does not own includeTxPowerLevel property");
-    assert_equals(advertiseData.includeTxPowerLevel, false, "includeTxPowerLevel should be false by default");
-    assert_type(advertiseData.includeTxPowerLevel, "boolean", "includeTxPowerLevel isn't an boolean");
-    advertiseData.includeTxPowerLevel = true;
-    assert_equals(advertiseData.includeTxPowerLevel, true, "includeTxPowerLevel should be true");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdvertiseData_includeTxPowerLevel_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdvertiseData_includeTxPowerLevel_attribute\r
+//==== LABEL Check if BluetoothLEAdvertiseData have includeTxPowerLevel attribute with proper type and is writeable\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:includeTxPowerLevel A\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA AE AT ADV ASG\r
+\r
+test(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        var advertiseDataInit, advertiseData, battery_svc_uuid_16 = "180f", heart_rate_svc_uuid_16 = "180d";\r
+\r
+        advertiseDataInit = {\r
+            includeName: true,\r
+            appearance: 192,\r
+            uuids: [battery_svc_uuid_16],\r
+            solicitationuuids: [heart_rate_svc_uuid_16]\r
+        };\r
+\r
+        advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);\r
+        assert_own_property(advertiseData, "includeTxPowerLevel", "advertiseData does not own includeTxPowerLevel property");\r
+        assert_equals(advertiseData.includeTxPowerLevel, false, "includeTxPowerLevel should be false by default");\r
+        assert_type(advertiseData.includeTxPowerLevel, "boolean", "includeTxPowerLevel isn't an boolean");\r
+        advertiseData.includeTxPowerLevel = true;\r
+        assert_equals(advertiseData.includeTxPowerLevel, true, "includeTxPowerLevel should be true");\r
+\r
+    }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 337c42fd6288434d0b9c695b46deb4da1ab86690..c9f16aa972d139e6220b17a69eba4dc163eece98 100755 (executable)
@@ -1,59 +1,61 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdvertiseData_manufacturerData_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdvertiseData_manufacturerData_attribute
-//==== LABEL Check if BluetoothLEAdvertiseData have manufacturerData attribute with proper type and is writeable
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:manufacturerData A
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA AE AT ASG
-
-test(function () {
- var adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, advertiseDataInit, advertiseData, battery_svc_uuid_16 = "180f",
-    device = null, heart_rate_svc_uuid_16 = "180d", mock_manufactureData;
-
-    advertiseDataInit = {
-        includeName: true,
-        includeTxPowerLevel: true,
-        uuids: [battery_svc_uuid_16],
-        solicitationuuids: [heart_rate_svc_uuid_16]
-    };
-    advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);
-    assert_own_property(advertiseData, "manufacturerData", "advertiseData does not own manufacturerData property");
-    assert_equals(advertiseData.manufacturerData, null, "manufacturerData should be null by default");
-    mock_manufactureData = new tizen.BluetoothLEManufacturerData("127", "0x0057");
-    advertiseData.manufacturerData = mock_manufactureData;
-    assert_equals(advertiseData.manufacturerData.id, mock_manufactureData.id, "manufacturerData should be updated");
-    assert_equals(advertiseData.manufacturerData.data, mock_manufactureData.data, "manufacturerData should be updated");
-},document.title);
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdvertiseData_manufacturerData_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdvertiseData_manufacturerData_attribute\r
+//==== LABEL Check if BluetoothLEAdvertiseData have manufacturerData attribute with proper type and is writeable\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:manufacturerData A\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA AE AT ASG\r
+\r
+test(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+        var adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, advertiseDataInit, advertiseData, battery_svc_uuid_16 = "180f",\r
+            device = null, heart_rate_svc_uuid_16 = "180d", mock_manufactureData;\r
+\r
+        advertiseDataInit = {\r
+            includeName: true,\r
+            includeTxPowerLevel: true,\r
+            uuids: [battery_svc_uuid_16],\r
+            solicitationuuids: [heart_rate_svc_uuid_16]\r
+        };\r
+        advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);\r
+        assert_own_property(advertiseData, "manufacturerData", "advertiseData does not own manufacturerData property");\r
+        assert_equals(advertiseData.manufacturerData, null, "manufacturerData should be null by default");\r
+        mock_manufactureData = new tizen.BluetoothLEManufacturerData("127", "0x0057");\r
+        advertiseData.manufacturerData = mock_manufactureData;\r
+        assert_equals(advertiseData.manufacturerData.id, mock_manufactureData.id, "manufacturerData should be updated");\r
+        assert_equals(advertiseData.manufacturerData.data, mock_manufactureData.data, "manufacturerData should be updated");\r
+    }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 827d460eda62e9405d5d66b1999708eb1b33c9d4..f916db759b828342a34718888d04012216da492e 100755 (executable)
@@ -1,61 +1,65 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Feng Zhao <feng.zhao@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdvertiseData_servicesData_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdvertiseData_servicesData_attribute
-//==== LABEL Check if BluetoothLEAdvertiseData have servicesData attribute with proper type and is writeable
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:servicesData A
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA AE AT ADV ASG
-
-test(function () {
-    var adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, advertiseDataInit, advertiseData,
-    device = null, battery_svc_uuid_16 = "180f", heart_rate_svc_uuid_16 = "180d", mock_serviceData;
-    advertiseDataInit = {
-        includeName: true,
-        includeTxPowerLevel: true,
-        uuids: [battery_svc_uuid_16],
-        solicitationuuids: [heart_rate_svc_uuid_16]
-    };
-
-    advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);
-    assert_own_property(advertiseData, "servicesData", "advertiseData does not own servicesData property");
-    assert_equals(advertiseData.servicesData, null, "servicesData should be null by default");
-
-    var firstService = new tizen.BluetoothLEServiceData("11e5", "0x1811");
-    var secondService = new tizen.BluetoothLEServiceData("a5e8", "0x1815");
-    advertiseData.servicesData = [firstService, secondService];
-
-    assert_equals(advertiseData.servicesData[0].uuid, firstService.uuid, "servicesData should be updated");
-    assert_equals(advertiseData.servicesData[1].data, secondService.data, "servicesData should be updated");
-}, document.title);
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Feng Zhao <feng.zhao@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdvertiseData_servicesData_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdvertiseData_servicesData_attribute\r
+//==== LABEL Check if BluetoothLEAdvertiseData have servicesData attribute with proper type and is writeable\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:servicesData A\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA AE AT ADV ASG\r
+\r
+test(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        var adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, advertiseDataInit, advertiseData,\r
+            device = null, battery_svc_uuid_16 = "180f", heart_rate_svc_uuid_16 = "180d", mock_serviceData;\r
+        advertiseDataInit = {\r
+            includeName: true,\r
+            includeTxPowerLevel: true,\r
+            uuids: [battery_svc_uuid_16],\r
+            solicitationuuids: [heart_rate_svc_uuid_16]\r
+        };\r
+\r
+        advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);\r
+        assert_own_property(advertiseData, "servicesData", "advertiseData does not own servicesData property");\r
+        assert_equals(advertiseData.servicesData, null, "servicesData should be null by default");\r
+\r
+        var firstService = new tizen.BluetoothLEServiceData("11e5", "0x1811");\r
+        var secondService = new tizen.BluetoothLEServiceData("a5e8", "0x1815");\r
+        advertiseData.servicesData = [firstService, secondService];\r
+\r
+        assert_equals(advertiseData.servicesData[0].uuid, firstService.uuid, "servicesData should be updated");\r
+        assert_equals(advertiseData.servicesData[1].data, secondService.data, "servicesData should be updated");\r
+\r
+    }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>\r
index ae3a5d0f0b9698583b36f82aa52c1baf3bf9fb64..7990fa03f762f8d55445aaf316d9787944c6b42a 100755 (executable)
@@ -1,56 +1,60 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdvertiseData_solicitationuuids_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdvertiseData_solicitationuuids_attribute
-//==== LABEL Check if BluetoothLEAdvertiseData have solicitationuuids attribute with proper type and is writeable
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:solicitationuuids A
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA AE AT ADV ASG
-
-test(function () {
-    var advertiseDataInit, advertiseData, battery_svc_uuid_16 = "180f", heart_rate_svc_uuid_16 = "180d";
-
-    advertiseDataInit = {
-        includeName: true,
-        includeTxPowerLevel: true,
-        appearance: 192,
-        uuids: [battery_svc_uuid_16]
-    };
-
-    advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);
-    assert_own_property(advertiseData, "solicitationuuids", "advertiseData does not own solicitationuuids property");
-    assert_equals(advertiseData.solicitationuuids, null, "solicitationuuids should be null by default");
-    advertiseData.solicitationuuids = [heart_rate_svc_uuid_16];
-    assert_array_equals(advertiseData.solicitationuuids, ["180d"], "solicitationuuids should be updated");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdvertiseData_solicitationuuids_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdvertiseData_solicitationuuids_attribute\r
+//==== LABEL Check if BluetoothLEAdvertiseData have solicitationuuids attribute with proper type and is writeable\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:solicitationuuids A\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA AE AT ADV ASG\r
+\r
+test(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        var advertiseDataInit, advertiseData, battery_svc_uuid_16 = "180f", heart_rate_svc_uuid_16 = "180d";\r
+\r
+        advertiseDataInit = {\r
+            includeName: true,\r
+            includeTxPowerLevel: true,\r
+            appearance: 192,\r
+            uuids: [battery_svc_uuid_16]\r
+        };\r
+\r
+        advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);\r
+        assert_own_property(advertiseData, "solicitationuuids", "advertiseData does not own solicitationuuids property");\r
+        assert_equals(advertiseData.solicitationuuids, null, "solicitationuuids should be null by default");\r
+        advertiseData.solicitationuuids = [heart_rate_svc_uuid_16];\r
+        assert_array_equals(advertiseData.solicitationuuids, ["180d"], "solicitationuuids should be updated");\r
+\r
+    }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index f505428179ddc55775704ed205aaed8753b19eac..7836f87e11993ebd2ccde48dcd21ab156bcd2131 100755 (executable)
@@ -1,57 +1,61 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdvertiseData_uuids_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdvertiseData_uuids_attribute
-//==== LABEL Check if BluetoothLEAdvertiseData have uuids attribute with proper type and is writable
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:uuids A
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA AE AT ADV ASG
-
-test(function () {
-    var advertiseDataInit, advertiseData, battery_svc_uuid_16 = "180f", heart_rate_svc_uuid_16 = "180d";
-
-    advertiseDataInit = {
-        includeName: true,
-        includeTxPowerLevel: true,
-        appearance: 192,
-        solicitationuuids: [heart_rate_svc_uuid_16]
-    };
-
-    advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);
-    assert_own_property(advertiseData, "uuids", "advertiseData does not own uuids property");
-    assert_equals(advertiseData.uuids, null, "Should be null by default");
-    advertiseData.uuids = [battery_svc_uuid_16];
-    assert_array_equals(advertiseData.uuids, [battery_svc_uuid_16], "uuids can be modified.");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdvertiseData_uuids_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdvertiseData_uuids_attribute\r
+//==== LABEL Check if BluetoothLEAdvertiseData have uuids attribute with proper type and is writable\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:uuids A\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA AE AT ADV ASG\r
+\r
+test(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        var advertiseDataInit, advertiseData, battery_svc_uuid_16 = "180f", heart_rate_svc_uuid_16 = "180d";\r
+\r
+        advertiseDataInit = {\r
+            includeName: true,\r
+            includeTxPowerLevel: true,\r
+            appearance: 192,\r
+            solicitationuuids: [heart_rate_svc_uuid_16]\r
+        };\r
+\r
+        advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);\r
+        assert_own_property(advertiseData, "uuids", "advertiseData does not own uuids property");\r
+        assert_equals(advertiseData.uuids, null, "Should be null by default");\r
+        advertiseData.uuids = [battery_svc_uuid_16];\r
+        assert_array_equals(advertiseData.uuids, [battery_svc_uuid_16], "uuids can be modified.");\r
+\r
+    }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index d1e52a9..88e8d75
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2017 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Michal Bistyga <m.bistyga@samsung.com>
-    Lei Tang <lei312.tang@samsung.com>
-    Xiaoyan Qian <xy.qian@samsung.com>
-    Qunfang Lin <qunfang.lin@samsung.com>
--->
-<html>
-<head>
-<title>BluetoothLEAttributes</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAttributes
-//==== LABEL Check BluetoothDevice attributes and functions
-//==== EXECUTION_TYPE manual
-//==== PRIORITY P3
-//==== ONLOAD_DELAY 180
-//==== STEP several tests executed from base test
-//==== EXPECT all subtests should be successful
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:address A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:appearance A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:manufacturerData A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:name A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:rssi A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:serviceData A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:solicitationuuids A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:txpowerlevel A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:uuids A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEManufacturerData:data A
-//==== TEST_CRITERIA AE AT ASG
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEManufacturerData:id A
-//==== TEST_CRITERIA AE AT ASG
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEServiceData:data A
-//==== TEST_CRITERIA AE AT ASG
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEServiceData:uuid A
-//==== TEST_CRITERIA AE AT ASG AN
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEManufacturerData:BluetoothLEManufacturerData U
-//==== TEST_CRITERIA OBX
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEServiceData:BluetoothLEServiceData U
-//==== TEST_CRITERIA OBX
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.
-
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), device, proccessDevice, adapter = null, tmp, tmpUuids = [123];
-
-t.step(function () {
-    proccessDevice = t.step_func(function (device)
-    {
-        //BluetoothLEDevice_address_attribute
-        test(function () {
-            check_readonly(device, "address", device.address, "string", REMOTE_BLE_DEVICE_ADDRESS + "Tizen");
-        }, "BluetoothLEDevice_address_attribute");
-
-        //BluetoothLEDevice_appearance_attribute
-        test(function () {
-            check_readonly(device, "appearance", device.appearance, "unsigned long", 1234);
-        }, "BluetoothLEDevice_appearance_attribute");
-
-        //BluetoothLEDevice_manufacturerData_attribute
-        test(function () {
-            if (device.manufacturerData != null)
-            {
-                tmp = device.manufacturerData;
-                device.manufacturerData = new tizen.BluetoothLEManufacturerData("mock_id", "mock_data");
-                assert_equals(device.manufacturerData.id, tmp.id, "ManufacturerData can be modified.");
-                assert_equals(device.manufacturerData.data, tmp.data, "ManufacturerData can be modified.");
-            }
-        }, "BluetoothLEDevice_manufacturerData_attribute");
-
-        //BluetoothLEDevice_name_attribute
-        test(function () {
-            check_readonly(device, "name", device.name, "string", REMOTE_DEVICE_NAME + "Tizen");
-        }, "BluetoothLEDevice_name_attribute");
-
-        //BluetoothLEDevice_rssi_attribute
-        test(function () {
-            check_readonly(device, "rssi", device.rssi, "long", -1024);
-        }, "BluetoothLEDevice_rssi_attribute");
-
-        //BluetoothLEDevice_serviceData_attribute
-        test(function () {
-            check_readonly(device, "serviceData", device.serviceData, "array", 123);
-        }, "BluetoothLEDevice_serviceData_attribute");
-
-        //BluetoothLEDevice_solicitationuuids_attribute
-        test(function () {
-            assert_own_property(device, "solicitationuuids", "BluetoothLEDevice does not own solicitationuuids property.");
-            if (device.solicitationuuids != null) {
-                assert_type(device.solicitationuuids, "array", "solicitationuuids should be an array");
-                device.solicitationuuids = tmpSoUuids;
-                assert_not_equals(device.solicitationuuids, tmpSoUuids, "solicitationuuids should not be modified");
-            }
-        }, "BluetoothLEDevice_solicitationuuids_attribute");
-
-        //BluetoothLEDevice_txPowerLevel_attribute
-        test(function () {
-            check_readonly(device, "txpowerlevel", device.txpowerlevel, "long", 1234);
-        }, "BluetoothLEDevice_txPowerLevel_attribute");
-
-        //BluetoothLEDevice_uuids_attribute
-        test(function () {
-            assert_own_property(device, "uuids", "BluetoothLEDevice does not own uuids property.");
-            if (device.uuids != null) {
-                assert_type(device.uuids, "array", "uuids should be an array");
-                device.uuids = tmpUuids;
-                assert_not_equals(device.uuids, tmpUuids, "uuids should not be modified");
-            }
-        }, "BluetoothLEDevice_uuids_attribute");
-
-        //BluetoothLEManufacturerData_data_attribute
-        test(function () {
-            if (device.manufacturerData != null) {
-                check_attribute(device.manufacturerData, "data", device.manufacturerData.data, "string", device.manufacturerData.data + "new");
-            }
-        }, "BluetoothLEManufacturerData_data_attribute");
-
-        //BluetoothLEManufacturerData_id_attribute
-        test(function () {
-            if (device.manufacturerData != null) {
-                check_attribute(device.manufacturerData, "id", device.manufacturerData.id, "string", device.manufacturerData.id + "new");
-            }
-        }, "BluetoothLEManufacturerData_id_attribute");
-
-        //BluetoothLEServiceData_data_attribute
-        test(function () {
-            if (device.serviceData != null) {
-                check_attribute(device.serviceData, "data", device.serviceData.data, "string", device.serviceData.data + "new");
-            }
-        }, "BluetoothLEServiceData_data_attribute");
-
-        //BluetoothLEServiceData_uuid_attribute
-        test(function () {
-            if (device.serviceData != null) {
-                check_attribute(device.serviceData, "uuid", device.serviceData.uuid, "string", device.serviceData.uuid + "new");
-                check_not_nullable(device.serviceData, "uuid");
-            }
-        }, "BluetoothLEServiceData_uuid_attribute");
-
-        //BluetoothLEManufacturerData_extend
-        test(function () {
-            if (device.manufacturerData != null) {
-                check_extensibility(device.manufacturerData);
-            };
-        }, "BluetoothLEManufacturerData_extend");
-
-        //BluetoothLEServiceData_extend
-        test(function () {
-            if (device.serviceData != null) {
-                check_extensibility(device.serviceData);
-            };
-        }, "BluetoothLEServiceData_extend");
-        t.done();
-
-    })
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(function onsuccess(bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS)
-        {
-            adapter.stopScan();
-            console.log("Found device: " + bledevice.name);
-            device=bledevice;
-            proccessDevice(device);
-        }
-    }, bleScanRrrorCallback);
-});
-
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2017 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Michal Bistyga <m.bistyga@samsung.com>\r
+    Lei Tang <lei312.tang@samsung.com>\r
+    Xiaoyan Qian <xy.qian@samsung.com>\r
+    Qunfang Lin <qunfang.lin@samsung.com>\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAttributes</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAttributes\r
+//==== LABEL Check BluetoothDevice attributes and functions\r
+//==== EXECUTION_TYPE manual\r
+//==== PRIORITY P3\r
+//==== ONLOAD_DELAY 180\r
+//==== STEP several tests executed from base test\r
+//==== EXPECT all subtests should be successful\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:address A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:appearance A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:manufacturerData A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:name A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:rssi A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:serviceData A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:solicitationuuids A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:txpowerlevel A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:uuids A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEManufacturerData:data A\r
+//==== TEST_CRITERIA AE AT ASG\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEManufacturerData:id A\r
+//==== TEST_CRITERIA AE AT ASG\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEServiceData:data A\r
+//==== TEST_CRITERIA AE AT ASG\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEServiceData:uuid A\r
+//==== TEST_CRITERIA AE AT ASG AN\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEManufacturerData:BluetoothLEManufacturerData U\r
+//==== TEST_CRITERIA OBX\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEServiceData:BluetoothLEServiceData U\r
+//==== TEST_CRITERIA OBX\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.\r
+\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), device, proccessDevice, adapter = null, tmp, tmpUuids = [123];\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        proccessDevice = t.step_func(function (device) {\r
+            //BluetoothLEDevice_address_attribute\r
+            test(function () {\r
+                check_readonly(device, "address", device.address, "string", REMOTE_BLE_DEVICE_ADDRESS + "Tizen");\r
+            }, "BluetoothLEDevice_address_attribute");\r
+\r
+            //BluetoothLEDevice_appearance_attribute\r
+            test(function () {\r
+                check_readonly(device, "appearance", device.appearance, "unsigned long", 1234);\r
+            }, "BluetoothLEDevice_appearance_attribute");\r
+\r
+            //BluetoothLEDevice_manufacturerData_attribute\r
+            test(function () {\r
+                if (device.manufacturerData != null) {\r
+                    tmp = device.manufacturerData;\r
+                    device.manufacturerData = new tizen.BluetoothLEManufacturerData("mock_id", "mock_data");\r
+                    assert_equals(device.manufacturerData.id, tmp.id, "ManufacturerData can be modified.");\r
+                    assert_equals(device.manufacturerData.data, tmp.data, "ManufacturerData can be modified.");\r
+                }\r
+            }, "BluetoothLEDevice_manufacturerData_attribute");\r
+\r
+            //BluetoothLEDevice_name_attribute\r
+            test(function () {\r
+                check_readonly(device, "name", device.name, "string", REMOTE_DEVICE_NAME + "Tizen");\r
+            }, "BluetoothLEDevice_name_attribute");\r
+\r
+            //BluetoothLEDevice_rssi_attribute\r
+            test(function () {\r
+                check_readonly(device, "rssi", device.rssi, "long", -1024);\r
+            }, "BluetoothLEDevice_rssi_attribute");\r
+\r
+            //BluetoothLEDevice_serviceData_attribute\r
+            test(function () {\r
+                check_readonly(device, "serviceData", device.serviceData, "array", 123);\r
+            }, "BluetoothLEDevice_serviceData_attribute");\r
+\r
+            //BluetoothLEDevice_solicitationuuids_attribute\r
+            test(function () {\r
+                assert_own_property(device, "solicitationuuids", "BluetoothLEDevice does not own solicitationuuids property.");\r
+                if (device.solicitationuuids != null) {\r
+                    assert_type(device.solicitationuuids, "array", "solicitationuuids should be an array");\r
+                    device.solicitationuuids = tmpSoUuids;\r
+                    assert_not_equals(device.solicitationuuids, tmpSoUuids, "solicitationuuids should not be modified");\r
+                }\r
+            }, "BluetoothLEDevice_solicitationuuids_attribute");\r
+\r
+            //BluetoothLEDevice_txPowerLevel_attribute\r
+            test(function () {\r
+                check_readonly(device, "txpowerlevel", device.txpowerlevel, "long", 1234);\r
+            }, "BluetoothLEDevice_txPowerLevel_attribute");\r
+\r
+            //BluetoothLEDevice_uuids_attribute\r
+            test(function () {\r
+                assert_own_property(device, "uuids", "BluetoothLEDevice does not own uuids property.");\r
+                if (device.uuids != null) {\r
+                    assert_type(device.uuids, "array", "uuids should be an array");\r
+                    device.uuids = tmpUuids;\r
+                    assert_not_equals(device.uuids, tmpUuids, "uuids should not be modified");\r
+                }\r
+            }, "BluetoothLEDevice_uuids_attribute");\r
+\r
+            //BluetoothLEManufacturerData_data_attribute\r
+            test(function () {\r
+                if (device.manufacturerData != null) {\r
+                    check_attribute(device.manufacturerData, "data", device.manufacturerData.data, "string", device.manufacturerData.data + "new");\r
+                }\r
+            }, "BluetoothLEManufacturerData_data_attribute");\r
+\r
+            //BluetoothLEManufacturerData_id_attribute\r
+            test(function () {\r
+                if (device.manufacturerData != null) {\r
+                    check_attribute(device.manufacturerData, "id", device.manufacturerData.id, "string", device.manufacturerData.id + "new");\r
+                }\r
+            }, "BluetoothLEManufacturerData_id_attribute");\r
+\r
+            //BluetoothLEServiceData_data_attribute\r
+            test(function () {\r
+                if (device.serviceData != null) {\r
+                    check_attribute(device.serviceData, "data", device.serviceData.data, "string", device.serviceData.data + "new");\r
+                }\r
+            }, "BluetoothLEServiceData_data_attribute");\r
+\r
+            //BluetoothLEServiceData_uuid_attribute\r
+            test(function () {\r
+                if (device.serviceData != null) {\r
+                    check_attribute(device.serviceData, "uuid", device.serviceData.uuid, "string", device.serviceData.uuid + "new");\r
+                    check_not_nullable(device.serviceData, "uuid");\r
+                }\r
+            }, "BluetoothLEServiceData_uuid_attribute");\r
+\r
+            //BluetoothLEManufacturerData_extend\r
+            test(function () {\r
+                if (device.manufacturerData != null) {\r
+                    check_extensibility(device.manufacturerData);\r
+                };\r
+            }, "BluetoothLEManufacturerData_extend");\r
+\r
+            //BluetoothLEServiceData_extend\r
+            test(function () {\r
+                if (device.serviceData != null) {\r
+                    check_extensibility(device.serviceData);\r
+                };\r
+            }, "BluetoothLEServiceData_extend");\r
+            t.done();\r
+\r
+        })\r
+        bleScanRrrorCallback = t.step_func(function (error) {\r
+            assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getLEAdapter();\r
+        adapter.stopScan();\r
+        adapter.startScan(function onsuccess(bledevice) {\r
+            if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS) {\r
+                adapter.stopScan();\r
+                console.log("Found device: " + bledevice.name);\r
+                device = bledevice;\r
+                proccessDevice(device);\r
+            }\r
+        }, bleScanRrrorCallback);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+\r
+</script>\r
+</body>\r
+</html>\r
old mode 100644 (file)
new mode 100755 (executable)
index bac2100..46d4811
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2017 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Michal Bistyga <m.bistyga@samsung.com>
-    Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEConnectChangeCallback_connection</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEConnectChangeCallback_connection
-//==== LABEL Check BluetoothDevice attributes and functions
-//==== EXECUTION_TYPE manual
-//==== PRIORITY P3
-//==== ONLOAD_DELAY 180
-//==== STEP several tests executed from base test
-//==== EXPECT all subtests should be successful
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEConnectChangeCallback:onconnected M
-//==== TEST_CRITERIA CBOA CBT
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEConnectChangeCallback:ondisconnected M
-//==== TEST_CRITERIA CBOA CBT
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.
-
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, bleScanSuccessCallback, bleScanErrorCallback,
-    onConnectionStateChange, watchID, flag = false, onconnected, onerror, device = null;
-
-t.step(function () {
-    onConnectionStateChange = {
-        onconnected: t.step_func(function (remotedevice) {
-            //BluetoothLEConnectChangeCallback_onconnected
-            test(function () {
-                assert_type(remotedevice, "object", "device isn't an object");
-                assert_type(remotedevice.address, "string", "address type check");
-                assert_not_equals(remotedevice.address, null, "address should not be null");
-            }, "BluetoothLEConnectChangeCallback_onconnected");
-
-        }),
-
-        ondisconnected: t.step_func(function (device) {
-            //BluetoothLEConnectChangeCallback_ondisconnected
-            test(function () {
-                assert_type(device, "object", "device isn't an object");
-                assert_type(device.address, "string", "address type check");
-                assert_not_equals(device.address, null, "address should not be null");
-            }, "BluetoothLEConnectChangeCallback_ondisconnected");
-            setTimeout(function(){ //We can't call disconnect until all async tasks are finished.
-                device.removeConnectStateChangeListener(watchID);
-                t.done();}
-            , 15000);
-        })
-    }
-
-    onconnected = t.step_func(function (e) {
-        device.disconnect();
-    });
-
-    onerror = t.step_func(function (e) {
-        assert_unreached("connect errorCallback exception:" + e.message);
-    });
-
-     bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            device = bledevice;
-            adapter.stopScan();
-            watchID = device.addConnectStateChangeListener(onConnectionStateChange);
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanErrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2017 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+        Michal Bistyga <m.bistyga@samsung.com>\r
+    Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEConnectChangeCallback_connection</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEConnectChangeCallback_connection\r
+//==== LABEL Check BluetoothDevice attributes and functions\r
+//==== EXECUTION_TYPE manual\r
+//==== PRIORITY P3\r
+//==== ONLOAD_DELAY 180\r
+//==== STEP several tests executed from base test\r
+//==== EXPECT all subtests should be successful\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEConnectChangeCallback:onconnected M\r
+//==== TEST_CRITERIA CBOA CBT\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEConnectChangeCallback:ondisconnected M\r
+//==== TEST_CRITERIA CBOA CBT\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.\r
+\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, bleScanSuccessCallback, bleScanErrorCallback,\r
+    onConnectionStateChange, watchID, flag = false, onconnected, onerror, device = null;\r
+\r
+t.step(function () {\r
+    onConnectionStateChange = {\r
+        onconnected: t.step_func(function (remotedevice) {\r
+            //BluetoothLEConnectChangeCallback_onconnected\r
+            test(function () {\r
+                assert_type(remotedevice, "object", "device isn't an object");\r
+                assert_type(remotedevice.address, "string", "address type check");\r
+                assert_not_equals(remotedevice.address, null, "address should not be null");\r
+            }, "BluetoothLEConnectChangeCallback_onconnected");\r
+\r
+        }),\r
+\r
+        ondisconnected: t.step_func(function (device) {\r
+            //BluetoothLEConnectChangeCallback_ondisconnected\r
+            test(function () {\r
+                assert_type(device, "object", "device isn't an object");\r
+                assert_type(device.address, "string", "address type check");\r
+                assert_not_equals(device.address, null, "address should not be null");\r
+            }, "BluetoothLEConnectChangeCallback_ondisconnected");\r
+            setTimeout(function(){ //We can't call disconnect until all async tasks are finished.\r
+                device.removeConnectStateChangeListener(watchID);\r
+                t.done();}\r
+            , 15000);\r
+        })\r
+    }\r
+\r
+    onconnected = t.step_func(function (e) {\r
+        device.disconnect();\r
+    });\r
+\r
+    onerror = t.step_func(function (e) {\r
+        assert_unreached("connect errorCallback exception:" + e.message);\r
+    });\r
+\r
+     bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            device = bledevice;\r
+            adapter.stopScan();\r
+            watchID = device.addConnectStateChangeListener(onConnectionStateChange);\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanErrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 5483a171ebc771e6258895d995539d2c8dddb8f8..2ba01042b5a084da30a3ad7d5768d21effc1287d 100755 (executable)
@@ -1,43 +1,47 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEConnectChangeCallback_notexist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEConnectChangeCallback_notexist
-//==== LABEL Check if interface BluetoothLEConnectChangeCallback exists,it should not
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEConnectChangeCallback:BluetoothLEConnectChangeCallback U
-//==== SPEC_URL TBD
-//==== PRIORITY P3
-//==== TEST_CRITERIA CBNIO
-
-test(function () {
-    check_no_interface_object("BluetoothLEConnectChangeCallback");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEConnectChangeCallback_notexist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEConnectChangeCallback_notexist\r
+//==== LABEL Check if interface BluetoothLEConnectChangeCallback exists,it should not\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEConnectChangeCallback:BluetoothLEConnectChangeCallback U\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P3\r
+//==== TEST_CRITERIA CBNIO\r
+\r
+test(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        check_no_interface_object("BluetoothLEConnectChangeCallback");\r
+\r
+    }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 70a96397fcd06dffa6a57cdfcaacd07cf3239483..f2e88c3445b45068af5fc1721affaf38f5113c04 100755 (executable)
@@ -1,91 +1,91 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEConnectChangeCallback_onconnected</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEConnectChangeCallback_onconnected
-//==== LABEL Check if BluetoothLEConnectChangeCallback onconnected is called and if its arguments have proper type
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEConnectChangeCallback:onconnected M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA CBOA CBT
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback,
-    onConnectionStateChange, watchID, flag = false, onconnected, onerror, device = null;
-
-t.step(function () {
-    onConnectionStateChange = {
-        onconnected: t.step_func(function (remotedevice) {
-            assert_type(remotedevice, "object", "device isn't an object");
-            assert_type(remotedevice.address, "string", "address type check");
-            assert_not_equals(remotedevice.address, null, "address should not be null");
-            device.removeConnectStateChangeListener(watchID);
-            t.done();
-        }),
-
-        ondisconnected: t.step_func(function (device) {
-        })
-    }
-
-    onconnected = t.step_func(function (e) {
-        device.disconnect();
-    });
-
-    onerror = t.step_func(function (e) {
-        assert_unreached("connect errorCallback exception:" + e.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            device = bledevice;
-            adapter.stopScan();
-            watchID = device.addConnectStateChangeListener(onConnectionStateChange);
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanErrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEConnectChangeCallback_onconnected</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEConnectChangeCallback_onconnected\r
+//==== LABEL Check if BluetoothLEConnectChangeCallback onconnected is called and if its arguments have proper type\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEConnectChangeCallback:onconnected M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA CBOA CBT\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback,\r
+    onConnectionStateChange, watchID, flag = false, onconnected, onerror, device = null;\r
+\r
+t.step(function () {\r
+    onConnectionStateChange = {\r
+        onconnected: t.step_func(function (remotedevice) {\r
+            assert_type(remotedevice, "object", "device isn't an object");\r
+            assert_type(remotedevice.address, "string", "address type check");\r
+            assert_not_equals(remotedevice.address, null, "address should not be null");\r
+            device.removeConnectStateChangeListener(watchID);\r
+            t.done();\r
+        }),\r
+\r
+        ondisconnected: t.step_func(function (device) {\r
+        })\r
+    }\r
+\r
+    onconnected = t.step_func(function (e) {\r
+        device.disconnect();\r
+    });\r
+\r
+    onerror = t.step_func(function (e) {\r
+        assert_unreached("connect errorCallback exception:" + e.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            device = bledevice;\r
+            adapter.stopScan();\r
+            watchID = device.addConnectStateChangeListener(onConnectionStateChange);\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanErrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index bb502e66f10af7280ec49d6cb3ff85110a98bfc2..9be7efdb38d9282da7d6b433958c999559ca1718 100755 (executable)
@@ -1,91 +1,91 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEConnectChangeCallback_ondisconnected</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEConnectChangeCallback_ondisconnected
-//==== LABEL Check if BluetoothLEConnectChangeCallback ondisconnected is called and if its arguments have proper type
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEConnectChangeCallback:ondisconnected M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA CBOA CBT
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback,
-    onConnectionStateChange, watchID, flag = false, onconnected, onerror, device = null;
-
-t.step(function () {
-    onConnectionStateChange = {
-        onconnected: t.step_func(function (device) {
-        }),
-
-        ondisconnected: t.step_func(function (remotedevice) {
-            assert_type(remotedevice, "object", "device isn't an object");
-            assert_type(remotedevice.address, "string", "address type check");
-            assert_not_equals(remotedevice.address, null, "address should not be null");
-            device.removeConnectStateChangeListener(watchID);
-            t.done();
-        })
-    }
-
-    onconnected = t.step_func(function (e) {
-        device.disconnect();
-    });
-
-    onerror = t.step_func(function (e) {
-        assert_unreached("connect errorCallback exception:" + e.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            device = bledevice;
-            adapter.stopScan();
-            watchID = device.addConnectStateChangeListener(onConnectionStateChange);
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanErrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEConnectChangeCallback_ondisconnected</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEConnectChangeCallback_ondisconnected\r
+//==== LABEL Check if BluetoothLEConnectChangeCallback ondisconnected is called and if its arguments have proper type\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEConnectChangeCallback:ondisconnected M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA CBOA CBT\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback,\r
+    onConnectionStateChange, watchID, flag = false, onconnected, onerror, device = null;\r
+\r
+t.step(function () {\r
+    onConnectionStateChange = {\r
+        onconnected: t.step_func(function (device) {\r
+        }),\r
+\r
+        ondisconnected: t.step_func(function (remotedevice) {\r
+            assert_type(remotedevice, "object", "device isn't an object");\r
+            assert_type(remotedevice.address, "string", "address type check");\r
+            assert_not_equals(remotedevice.address, null, "address should not be null");\r
+            device.removeConnectStateChangeListener(watchID);\r
+            t.done();\r
+        })\r
+    }\r
+\r
+    onconnected = t.step_func(function (e) {\r
+        device.disconnect();\r
+    });\r
+\r
+    onerror = t.step_func(function (e) {\r
+        assert_unreached("connect errorCallback exception:" + e.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            device = bledevice;\r
+            adapter.stopScan();\r
+            watchID = device.addConnectStateChangeListener(onConnectionStateChange);\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanErrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index dd60fbb88dfcdeea5751ac4698d4d4b4d7c6c3af..2d9f9aa7a35460fa4d8fa0e50505af5023f824cc 100755 (executable)
@@ -1,83 +1,83 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_addConnectStateChangeListener</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_addConnectStateChangeListener
-//==== LABEL Check if addConnectStateChangeListener method work properly with BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MAST MR
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onConnectionStateChange,
-    listenerID, device = null, flag = false, onerror, onconnected;
-
-t.step(function () {
-    onConnectionStateChange = {
-        onconnected: t.step_func(function (device) {
-            assert_type(listenerID, "long", "addConnectStateChangeListener return type has wrong.");
-        }),
-        ondisconnected: t.step_func(function (device) {
-            device.removeConnectStateChangeListener(listenerID);
-            t.done();
-        }),
-    };
-
-    onconnected = t.step_func(function () {
-        device.disconnect();
-    });
-
-    onerror = t.step_func(function (e) {
-        assert_unreached("connect errorCallback exception:" + e.message);
-    });
-
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            device = bledevice;
-            adapter.stopScan();
-            listenerID = device.addConnectStateChangeListener(onConnectionStateChange);
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_addConnectStateChangeListener</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_addConnectStateChangeListener\r
+//==== LABEL Check if addConnectStateChangeListener method work properly with BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MAST MR\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onConnectionStateChange,\r
+    listenerID, device = null, flag = false, onerror, onconnected;\r
+\r
+t.step(function () {\r
+    onConnectionStateChange = {\r
+        onconnected: t.step_func(function (device) {\r
+            assert_type(listenerID, "long", "addConnectStateChangeListener return type has wrong.");\r
+        }),\r
+        ondisconnected: t.step_func(function (device) {\r
+            device.removeConnectStateChangeListener(listenerID);\r
+            t.done();\r
+        }),\r
+    };\r
+\r
+    onconnected = t.step_func(function () {\r
+        device.disconnect();\r
+    });\r
+\r
+    onerror = t.step_func(function (e) {\r
+        assert_unreached("connect errorCallback exception:" + e.message);\r
+    });\r
+\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            device = bledevice;\r
+            adapter.stopScan();\r
+            listenerID = device.addConnectStateChangeListener(onConnectionStateChange);\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 3da0b63c18af4d63964342e2601c3508922962f8..b0349a27ceae1de73b025dfd28ef8c1dc45a015a 100755 (executable)
@@ -1,69 +1,69 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothLEDevice_addConnectStateChangeListener_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_addConnectStateChangeListener_TypeMismatch
-//==== LABEL Check whether addConnectStateChangeListener() method called with invalid listener argument throws an exception
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB,
-    device = null, conversionTable, i, listener, exceptionName;
-
-t.step(function () {
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            device = bledevice;
-            adapter.stopScan();
-            conversionTable = getTypeConversionExceptions("object", false);
-            for(i = 0; i < conversionTable.length; i++) {
-                listener = conversionTable[i][0];
-                exceptionName = conversionTable[i][1];
-                assert_throws({name: exceptionName},
-                    function () {
-                        device.addConnectStateChangeListener(listener);
-                    }, "Given incorrect listener.");
-            };
-            t.done();
-        }
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_addConnectStateChangeListener_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_addConnectStateChangeListener_TypeMismatch\r
+//==== LABEL Check whether addConnectStateChangeListener() method called with invalid listener argument throws an exception\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB,\r
+    device = null, conversionTable, i, listener, exceptionName;\r
+\r
+t.step(function () {\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            device = bledevice;\r
+            adapter.stopScan();\r
+            conversionTable = getTypeConversionExceptions("object", false);\r
+            for(i = 0; i < conversionTable.length; i++) {\r
+                listener = conversionTable[i][0];\r
+                exceptionName = conversionTable[i][1];\r
+                assert_throws({name: exceptionName},\r
+                    function () {\r
+                        device.addConnectStateChangeListener(listener);\r
+                    }, "Given incorrect listener.");\r
+            };\r
+            t.done();\r
+        }\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 6bbb7ad9f39ea4ac07b11b86436eb0601ba518b3..d0d004ee90e6871f375f0ab0c3227c4684ca9e15 100755 (executable)
@@ -1,61 +1,61 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_addConnectStateChangeListener_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_addConnectStateChangeListener_exist
-//==== LABEL Check if addConnectStateChangeListener method exists
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA ME
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, listenerID, device = null;
-
-t.step(function () {
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            device = bledevice;
-            adapter.stopScan();
-            check_method_exists(device, "addConnectStateChangeListener");
-            t.done();
-        }
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_addConnectStateChangeListener_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_addConnectStateChangeListener_exist\r
+//==== LABEL Check if addConnectStateChangeListener method exists\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA ME\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, listenerID, device = null;\r
+\r
+t.step(function () {\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            device = bledevice;\r
+            adapter.stopScan();\r
+            check_method_exists(device, "addConnectStateChangeListener");\r
+            t.done();\r
+        }\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 01539158cb5ba2f8058771f741d7d2a280299bb0..271d151e608d72c13957ee398caf3d927b8c0192 100755 (executable)
@@ -1,70 +1,70 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_addConnectStateChangeListener_listener_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_addConnectStateChangeListener_listener_invalid_cb
-//==== LABEL Check addConnectStateChangeListener() with invalid callback
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTL
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, incorrectListeners, incorrectListener,
-    device = null, exceptionName, i;
-
-t.step(function () {
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            device = bledevice;
-            adapter.stopScan();
-            incorrectListeners = getListenerConversionExceptions(["onconnected", "ondisconnected"]);
-            for(i = 0; i < incorrectListeners.length; i++) {
-                incorrectListener  = incorrectListeners[i][0];
-                exceptionName = incorrectListeners[i][1];
-                assert_throws({name: exceptionName},
-                    function () {
-                        device.addConnectStateChangeListener(incorrectListener);
-                    }, "Given incorrect listener.");
-            }
-            t.done();
-        }
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_addConnectStateChangeListener_listener_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_addConnectStateChangeListener_listener_invalid_cb\r
+//==== LABEL Check addConnectStateChangeListener() with invalid callback\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTL\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, incorrectListeners, incorrectListener,\r
+    device = null, exceptionName, i;\r
+\r
+t.step(function () {\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            device = bledevice;\r
+            adapter.stopScan();\r
+            incorrectListeners = getListenerConversionExceptions(["onconnected", "ondisconnected"]);\r
+            for(i = 0; i < incorrectListeners.length; i++) {\r
+                incorrectListener  = incorrectListeners[i][0];\r
+                exceptionName = incorrectListeners[i][1];\r
+                assert_throws({name: exceptionName},\r
+                    function () {\r
+                        device.addConnectStateChangeListener(incorrectListener);\r
+                    }, "Given incorrect listener.");\r
+            }\r
+            t.done();\r
+        }\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index ec7ef1b3fe09b26298a199e8c0fa82b7e933baef..30fe897a55706513c60cf7d3801b9bdf081a3cf8 100755 (executable)
@@ -1,63 +1,63 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothLEDevice_addConnectStateChangeListener_missarg</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_addConnectStateChangeListener_missarg
-//==== LABEL Check addConnectStateChangeListener with missing non-optional argument
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MMA
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null;
-
-t.step(function () {
-
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            device = bledevice;
-            adapter.stopScan();
-            assert_throws (TYPE_MISMATCH_EXCEPTION,
-                function () {
-                    device.addConnectStateChangeListener();
-                }, "Method with non optional argument.");
-            t.done();
-        }
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_addConnectStateChangeListener_missarg</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_addConnectStateChangeListener_missarg\r
+//==== LABEL Check addConnectStateChangeListener with missing non-optional argument\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MMA\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null;\r
+\r
+t.step(function () {\r
+\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            device = bledevice;\r
+            adapter.stopScan();\r
+            assert_throws (TYPE_MISMATCH_EXCEPTION,\r
+                function () {\r
+                    device.addConnectStateChangeListener();\r
+                }, "Method with non optional argument.");\r
+            t.done();\r
+        }\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
old mode 100644 (file)
new mode 100755 (executable)
index 4006936..6bf298d
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2017 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Michal Bistyga <m.bistyga@samsung.com>
-    Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_addremoveConnectStateChangeListener_combined</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_add/removeConnectStateChangeListener_combined
-//==== LABEL Check BluetoothDevice attributes and functions
-//==== EXECUTION_TYPE manual
-//==== PRIORITY P3
-//==== ONLOAD_DELAY 180
-//==== STEP several tests executed from base test
-//==== EXPECT all subtests should be successful
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M
-//==== TEST_CRITERIA ME
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M
-//==== TEST_CRITERIA MTL
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M
-//==== TEST_CRITERIA MMA
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M
-//==== TEST_CRITERIA MAST MR
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:removeConnectStateChangeListener M
-//==== TEST_CRITERIA ME
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:removeConnectStateChangeListener M
-//==== TEST_CRITERIA MAST MR
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.
-
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter = null, bleScanSuccessCallback, bleScanErrorCallback, conversionTabl, retValue,
-    onConnectionStateChange, flag = false, onconnected, onerror, device = null, listenerId, incorrectListeners, incorrectListener, exceptionName, i;
-
-t.step(function () {
-    //BluetoothLEDevice_addConnectStateChangeListener
-    onConnectionStateChange = {
-        onconnected: t.step_func(function (remotedevice) {
-            //BluetoothLEDevice_addConnectStateChangeListener
-            test(function () {
-                assert_type(listenerID, "long", "addConnectStateChangeListener return type has wrong.");
-            }, "BluetoothLEDevice_addConnectStateChangeListener");
-        }),
-
-        ondisconnected: t.step_func(function (device) {
-            //BluetoothLEDevice_removeConnectStateChangeListener_exist
-            test(function () {
-                check_method_exists(device, "removeConnectStateChangeListener");
-            }, "BluetoothLEDevice_removeConnectStateChangeListener_exist");
-            //BluetoothLEDevice_removeConnectStateChangeListener
-            test(function () {
-            retValue = device.removeConnectStateChangeListener(listenerID);
-            assert_equals(retValue, undefined, "removeConnectStateChangeListener returns wrong value");
-            }, "BluetoothLEDevice_removeConnectStateChangeListener");
-            t.done();
-        })
-    }
-
-    onconnected = t.step_func(function (e) {
-        device.disconnect();
-    });
-
-    onerror = t.step_func(function (e) {
-        assert_unreached("connect errorCallback exception:" + e.message);
-    });
-
-     bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            device = bledevice;
-            adapter.stopScan();
-            //BluetoothLEDevice_addConnectStateChangeListener_exist
-            test(function () {
-                check_method_exists(device, "addConnectStateChangeListener");
-            }, "BluetoothLEDevice_addConnectStateChangeListener_exist");
-
-            //BluetoothLEDevice_addConnectStateChangeListener_listener_invalid_cb
-            test(function () {
-                incorrectListeners = getListenerConversionExceptions(["onconnected", "ondisconnected"]);
-                for(i = 0; i < incorrectListeners.length; i++) {
-                    incorrectListener  = incorrectListeners[i][0];
-                    exceptionName = incorrectListeners[i][1];
-                    assert_throws({name: exceptionName},
-                        function () {
-                            device.addConnectStateChangeListener(incorrectListener);
-                        }, "Given incorrect listener.");
-                }
-            }, "BluetoothLEDevice_addConnectStateChangeListener_listener_invalid_cb");
-
-            //BluetoothLEDevice_addConnectStateChangeListener_missarg
-            test(function () {
-                assert_throws (TYPE_MISMATCH_EXCEPTION,
-                    function () {
-                        device.addConnectStateChangeListener();
-                    }, "Method with non optional argument.");
-            }, "BluetoothLEDevice_addConnectStateChangeListener_missarg");
-
-            //BluetoothLEDevice_addConnectStateChangeListener_TypeMismatch
-            test(function () {
-                conversionTable = getTypeConversionExceptions("object", false);
-                for(i = 0; i < conversionTable.length; i++) {
-                    listener = conversionTable[i][0];
-                    exceptionName = conversionTable[i][1];
-                    assert_throws({name: exceptionName},
-                        function () {
-                            device.addConnectStateChangeListener(listener);
-                        }, "Given incorrect listener.");
-                };
-            }, "BluetoothLEDevice_addConnectStateChangeListener_TypeMismatch");
-
-            listenerID = device.addConnectStateChangeListener(onConnectionStateChange);
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanErrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);
-});
-
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2017 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+        Michal Bistyga <m.bistyga@samsung.com>\r
+    Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_addremoveConnectStateChangeListener_combined</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_add/removeConnectStateChangeListener_combined\r
+//==== LABEL Check BluetoothDevice attributes and functions\r
+//==== EXECUTION_TYPE manual\r
+//==== PRIORITY P3\r
+//==== ONLOAD_DELAY 180\r
+//==== STEP several tests executed from base test\r
+//==== EXPECT all subtests should be successful\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M\r
+//==== TEST_CRITERIA ME\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M\r
+//==== TEST_CRITERIA MTL\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M\r
+//==== TEST_CRITERIA MMA\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M\r
+//==== TEST_CRITERIA MAST MR\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:removeConnectStateChangeListener M\r
+//==== TEST_CRITERIA ME\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:removeConnectStateChangeListener M\r
+//==== TEST_CRITERIA MAST MR\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.\r
+\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter = null, bleScanSuccessCallback, bleScanErrorCallback, conversionTabl, retValue,\r
+    onConnectionStateChange, flag = false, onconnected, onerror, device = null, listenerId, incorrectListeners, incorrectListener, exceptionName, i;\r
+\r
+t.step(function () {\r
+    //BluetoothLEDevice_addConnectStateChangeListener\r
+    onConnectionStateChange = {\r
+        onconnected: t.step_func(function (remotedevice) {\r
+            //BluetoothLEDevice_addConnectStateChangeListener\r
+            test(function () {\r
+                assert_type(listenerID, "long", "addConnectStateChangeListener return type has wrong.");\r
+            }, "BluetoothLEDevice_addConnectStateChangeListener");\r
+        }),\r
+\r
+        ondisconnected: t.step_func(function (device) {\r
+            //BluetoothLEDevice_removeConnectStateChangeListener_exist\r
+            test(function () {\r
+                check_method_exists(device, "removeConnectStateChangeListener");\r
+            }, "BluetoothLEDevice_removeConnectStateChangeListener_exist");\r
+            //BluetoothLEDevice_removeConnectStateChangeListener\r
+            test(function () {\r
+            retValue = device.removeConnectStateChangeListener(listenerID);\r
+            assert_equals(retValue, undefined, "removeConnectStateChangeListener returns wrong value");\r
+            }, "BluetoothLEDevice_removeConnectStateChangeListener");\r
+            t.done();\r
+        })\r
+    }\r
+\r
+    onconnected = t.step_func(function (e) {\r
+        device.disconnect();\r
+    });\r
+\r
+    onerror = t.step_func(function (e) {\r
+        assert_unreached("connect errorCallback exception:" + e.message);\r
+    });\r
+\r
+     bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            device = bledevice;\r
+            adapter.stopScan();\r
+            //BluetoothLEDevice_addConnectStateChangeListener_exist\r
+            test(function () {\r
+                check_method_exists(device, "addConnectStateChangeListener");\r
+            }, "BluetoothLEDevice_addConnectStateChangeListener_exist");\r
+\r
+            //BluetoothLEDevice_addConnectStateChangeListener_listener_invalid_cb\r
+            test(function () {\r
+                incorrectListeners = getListenerConversionExceptions(["onconnected", "ondisconnected"]);\r
+                for(i = 0; i < incorrectListeners.length; i++) {\r
+                    incorrectListener  = incorrectListeners[i][0];\r
+                    exceptionName = incorrectListeners[i][1];\r
+                    assert_throws({name: exceptionName},\r
+                        function () {\r
+                            device.addConnectStateChangeListener(incorrectListener);\r
+                        }, "Given incorrect listener.");\r
+                }\r
+            }, "BluetoothLEDevice_addConnectStateChangeListener_listener_invalid_cb");\r
+\r
+            //BluetoothLEDevice_addConnectStateChangeListener_missarg\r
+            test(function () {\r
+                assert_throws (TYPE_MISMATCH_EXCEPTION,\r
+                    function () {\r
+                        device.addConnectStateChangeListener();\r
+                    }, "Method with non optional argument.");\r
+            }, "BluetoothLEDevice_addConnectStateChangeListener_missarg");\r
+\r
+            //BluetoothLEDevice_addConnectStateChangeListener_TypeMismatch\r
+            test(function () {\r
+                conversionTable = getTypeConversionExceptions("object", false);\r
+                for(i = 0; i < conversionTable.length; i++) {\r
+                    listener = conversionTable[i][0];\r
+                    exceptionName = conversionTable[i][1];\r
+                    assert_throws({name: exceptionName},\r
+                        function () {\r
+                            device.addConnectStateChangeListener(listener);\r
+                        }, "Given incorrect listener.");\r
+                };\r
+            }, "BluetoothLEDevice_addConnectStateChangeListener_TypeMismatch");\r
+\r
+            listenerID = device.addConnectStateChangeListener(onConnectionStateChange);\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanErrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);\r
+});\r
+\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 55253122aedc809021bea892cb93b7221e506f19..175876a22a89d87dada048e83b16e60a10b28235 100755 (executable)
@@ -1,60 +1,60 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_address_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_address_attribute
-//==== LABEL Check address attribute in BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:address A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null;
-
-t.step(function () {
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            device = bledevice;
-            adapter.stopScan();
-            check_readonly(device, "address", device.address, "string", REMOTE_BLE_DEVICE_ADDRESS + "Tizen");
-            t.done();
-        }
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_address_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_address_attribute\r
+//==== LABEL Check address attribute in BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:address A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null;\r
+\r
+t.step(function () {\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            device = bledevice;\r
+            adapter.stopScan();\r
+            check_readonly(device, "address", device.address, "string", REMOTE_BLE_DEVICE_ADDRESS + "Tizen");\r
+            t.done();\r
+        }\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 4916646cc69f77d4c2b22069f1531819b8068950..e5814f0e8ef66e6f38411a9d4aa5967606fc88bc 100755 (executable)
@@ -1,60 +1,60 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_appearance_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_appearance_attribute
-//==== LABEL Check appearance attribute in BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:appearance A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null;
-
-t.step(function () {
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            device = bledevice;
-            adapter.stopScan();
-            check_readonly(device, "appearance", device.appearance, "unsigned long", 1234);
-            t.done();
-        }
-    });
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_appearance_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_appearance_attribute\r
+//==== LABEL Check appearance attribute in BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:appearance A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null;\r
+\r
+t.step(function () {\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            device = bledevice;\r
+            adapter.stopScan();\r
+            check_readonly(device, "appearance", device.appearance, "unsigned long", 1234);\r
+            t.done();\r
+        }\r
+    });\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 1fc88342bac1f3b6eafc97dcb18fc40068ad4647..c823d593ad807b9fd73c0bb64585d6fa371f9f8a 100755 (executable)
@@ -1,74 +1,74 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_connect</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_connect
-//==== LABEL Check if connect method work properly with BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MMINA MR
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null, flag = false,
-    onconnected, onerror;
-
-t.step(function () {
-    onconnected = t.step_func(function (e) {
-        device.disconnect();
-    });
-
-    onerror = t.step_func(function (e) {
-        assert_unreached("connect errorCallback exception:" + e.message);
-    });
-
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                retValue = device.connect(onconnected, onerror);
-                assert_equals(retValue, undefined, "startScan returns wrong value");
-                flag = true;
-                t.done();
-            }
-        }
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    retValue = adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_connect</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_connect\r
+//==== LABEL Check if connect method work properly with BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MMINA MR\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null, flag = false,\r
+    onconnected, onerror;\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function (e) {\r
+        device.disconnect();\r
+    });\r
+\r
+    onerror = t.step_func(function (e) {\r
+        assert_unreached("connect errorCallback exception:" + e.message);\r
+    });\r
+\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                retValue = device.connect(onconnected, onerror);\r
+                assert_equals(retValue, undefined, "startScan returns wrong value");\r
+                flag = true;\r
+                t.done();\r
+            }\r
+        }\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    retValue = adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index 9a4d3f6..7c145c1
-<!DOCTYPE html>
-<!--
-Copyright (c) 2017 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-        Pawel Kaczmarczyk <p.kaczmarczy@partner.samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_connect_combined</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_connect_and_disconnect
-//==== LABEL Check if connect method work properly with BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P3
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startScan M
-//==== TEST_CRITERIA MMINA MAST MR
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startScan M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEScanCallback:onsuccess M
-//==== TEST_CRITERIA CBOA CBT
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:stopScan M
-//==== TEST_CRITERIA MNA MNAST MR
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M
-//==== TEST_CRITERIA MMINA MR
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M
-//==== TEST_CRITERIA ME
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M
-//==== TEST_CRITERIA MTCB
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M
-//==== TEST_CRITERIA MTCB
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:BluetoothLEDevice U
-//==== TEST_CRITERIA OBX
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M
-//==== TEST_CRITERIA MMINA MR
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null, flag = false,
-    onconnected, onerror, retValue;
-
-t.step(function () {
-    onConnected = t.step_func(function () {
-        device.disconnect();
-    });
-
-    onError = t.step_func(function (e) {
-        assert_unreached("connect errorCallback exception:" + e.message);
-    });
-
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-
-            //BluetoothLEAdapter_startScan MMINA MAST MR
-            device = bledevice;
-            test(function() {
-                assert_equals(retValue, undefined, "startScan returns wrong value");
-            }, "startScan");
-
-            //BluetoothLEAdapter_startScan_InvalidStateError MC
-            test(function() {
-                var successCB1 = function () {
-                    assert_unreached("Invalid Success callback invoked");
-                };
-
-                var errorCB1 = function (e) {
-                    assert_unreached("Invalid Error callback invoked");
-                };
-
-                assert_throws({name: 'InvalidStateError'}, function () {
-                    adapter.startScan(successCB1, errorCB1);
-                }, "InvalidStateError should be thrown when bluetooth is turned off");
-            }, "startScan_InvalidStateError");
-
-            // BluetoothLEScanCallback_onsuccess CBOA CBT
-            test(function() {
-                    assert_type(bledevice, "object", "foundDevice isn't an object");
-                    assert_type(bledevice.address, "string", "address type check");
-                    assert_type(bledevice.name, "string", "name type check");
-                    assert_not_equals(bledevice.address, null, "address should not be null");
-            }, "BluetoothLEScanCallback_onsuccess");
-
-            //BluetoothLEAdapter_stopScan MNA MNAST MR
-            test(function() {
-                retValue = adapter.stopScan();
-                assert_equals(retValue, undefined, "stopScan returns wrong value");
-            }, "BluetoothLEAdapter_stopScan");
-
-            //BluetoothLEDevice_connect ME
-            test(function() {
-                check_method_exists(device, "connect");
-            }, "connect_exist");
-
-            //connect_errorCallback_invalid_cb MTCB
-            test(function() {
-                var onconnected = function (e) {
-                    assert_unreached("Method connect shouldn't end successfully. (This could affect other TCTs");
-                };
-                var onerror = {
-                    onerror: function (error) {
-                        assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
-                    }
-                };
-
-                assert_throws(TYPE_MISMATCH_EXCEPTION,
-                    function () {
-                        device.connect(onconnected, onerror);
-                    }, "Given incorrect errorCallback.");
-            }, "connect_errorCallback_invalid_cb");
-
-            //connect_errorCallback_TypeMismatch MC
-            test(function() {
-                var onconnected = function (e) {
-                    assert_unreached("Method connect shouldn't end successfully. (This could affect other TCTs");
-                };
-                var conversionTable = getTypeConversionExceptions("functionObject", true);
-
-                for(i = 0; i < conversionTable.length; i++) {
-                    var errorCallback = conversionTable[i][0];
-                    var exceptionName = conversionTable[i][1];
-
-                    assert_throws(TYPE_MISMATCH_EXCEPTION,
-                        function () {
-                            device.connect(onconnected, errorCallback);
-                        }, "Given incorrect errorCallback.");
-                }
-            }, "connect_errorCallback_TypeMismatch");
-
-            //connect_successCallback_invalid_cb MTCB
-            test(function() {
-                var onconnected = {
-                    onsuccess: function () {
-                        assert_unreached("Method connect shouldn't end successfully. This could affect other TCTs");
-                    }
-                };
-                var onerror = function (error) {
-                    assert_unreached("Invalid errorCallback invoked:" + error.name + ": " + error.message);
-                };
-
-                assert_throws(TYPE_MISMATCH_EXCEPTION,
-                    function () {
-                        device.connect(onconnected, onerror);
-                }, "Given incorrect successCallback.");
-            }, "connect_successCallback_invalid_cb");
-
-            //connect_successCallback_TypeMismatch MC
-            test(function() {
-                var onerror = t.step_func(function (e) {
-                    assert_unreached("errorCallback exception:" + e.message);
-                });
-                var conversionTable = getTypeConversionExceptions("functionObject", true);
-
-                for(i = 0; i < conversionTable.length; i++) {
-                    var onconnected = conversionTable[i][0];
-                    var exceptionName = conversionTable[i][1];
-                    assert_throws(TYPE_MISMATCH_EXCEPTION,
-                        function () {
-                            device.connect(onconnected, onerror);
-                        }, "Given incorrect successCallback.");
-                }
-            }, "connect_successCallback_TypeMismatch");
-
-            //BluetoothLEDevice_extend OBX
-            test(function() {
-                check_extensibility(device);
-            }, "BluetoothLEDevice_extend");
-
-            //connect MMINA MR
-            test(function() {
-                if (flag == false) {
-                    retValue = device.connect(onConnected, onError);
-                    assert_equals(retValue, undefined, "connect returns wrong value");
-                    flag = true;
-                    t.done();
-                }
-            }, "connect");
-        }
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    retValue = adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2017 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+        Pawel Kaczmarczyk <p.kaczmarczy@partner.samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_connect_combined</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_connect_and_disconnect\r
+//==== LABEL Check if connect method work properly with BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P3\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startScan M\r
+//==== TEST_CRITERIA MMINA MAST MR\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startScan M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEScanCallback:onsuccess M\r
+//==== TEST_CRITERIA CBOA CBT\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:stopScan M\r
+//==== TEST_CRITERIA MNA MNAST MR\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M\r
+//==== TEST_CRITERIA MMINA MR\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M\r
+//==== TEST_CRITERIA ME\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M\r
+//==== TEST_CRITERIA MTCB\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M\r
+//==== TEST_CRITERIA MTCB\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:BluetoothLEDevice U\r
+//==== TEST_CRITERIA OBX\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M\r
+//==== TEST_CRITERIA MMINA MR\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null, flag = false,\r
+    onconnected, onerror, retValue;\r
+\r
+t.step(function () {\r
+    onConnected = t.step_func(function () {\r
+        device.disconnect();\r
+    });\r
+\r
+    onError = t.step_func(function (e) {\r
+        assert_unreached("connect errorCallback exception:" + e.message);\r
+    });\r
+\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+\r
+            //BluetoothLEAdapter_startScan MMINA MAST MR\r
+            device = bledevice;\r
+            test(function() {\r
+                assert_equals(retValue, undefined, "startScan returns wrong value");\r
+            }, "startScan");\r
+\r
+            //BluetoothLEAdapter_startScan_InvalidStateError MC\r
+            test(function() {\r
+                var successCB1 = function () {\r
+                    assert_unreached("Invalid Success callback invoked");\r
+                };\r
+\r
+                var errorCB1 = function (e) {\r
+                    assert_unreached("Invalid Error callback invoked");\r
+                };\r
+\r
+                assert_throws({name: 'InvalidStateError'}, function () {\r
+                    adapter.startScan(successCB1, errorCB1);\r
+                }, "InvalidStateError should be thrown when bluetooth is turned off");\r
+            }, "startScan_InvalidStateError");\r
+\r
+            // BluetoothLEScanCallback_onsuccess CBOA CBT\r
+            test(function() {\r
+                    assert_type(bledevice, "object", "foundDevice isn't an object");\r
+                    assert_type(bledevice.address, "string", "address type check");\r
+                    assert_type(bledevice.name, "string", "name type check");\r
+                    assert_not_equals(bledevice.address, null, "address should not be null");\r
+            }, "BluetoothLEScanCallback_onsuccess");\r
+\r
+            //BluetoothLEAdapter_stopScan MNA MNAST MR\r
+            test(function() {\r
+                retValue = adapter.stopScan();\r
+                assert_equals(retValue, undefined, "stopScan returns wrong value");\r
+            }, "BluetoothLEAdapter_stopScan");\r
+\r
+            //BluetoothLEDevice_connect ME\r
+            test(function() {\r
+                check_method_exists(device, "connect");\r
+            }, "connect_exist");\r
+\r
+            //connect_errorCallback_invalid_cb MTCB\r
+            test(function() {\r
+                var onconnected = function (e) {\r
+                    assert_unreached("Method connect shouldn't end successfully. (This could affect other TCTs");\r
+                };\r
+                var onerror = {\r
+                    onerror: function (error) {\r
+                        assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);\r
+                    }\r
+                };\r
+\r
+                assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+                    function () {\r
+                        device.connect(onconnected, onerror);\r
+                    }, "Given incorrect errorCallback.");\r
+            }, "connect_errorCallback_invalid_cb");\r
+\r
+            //connect_errorCallback_TypeMismatch MC\r
+            test(function() {\r
+                var onconnected = function (e) {\r
+                    assert_unreached("Method connect shouldn't end successfully. (This could affect other TCTs");\r
+                };\r
+                var conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+                for(i = 0; i < conversionTable.length; i++) {\r
+                    var errorCallback = conversionTable[i][0];\r
+                    var exceptionName = conversionTable[i][1];\r
+\r
+                    assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+                        function () {\r
+                            device.connect(onconnected, errorCallback);\r
+                        }, "Given incorrect errorCallback.");\r
+                }\r
+            }, "connect_errorCallback_TypeMismatch");\r
+\r
+            //connect_successCallback_invalid_cb MTCB\r
+            test(function() {\r
+                var onconnected = {\r
+                    onsuccess: function () {\r
+                        assert_unreached("Method connect shouldn't end successfully. This could affect other TCTs");\r
+                    }\r
+                };\r
+                var onerror = function (error) {\r
+                    assert_unreached("Invalid errorCallback invoked:" + error.name + ": " + error.message);\r
+                };\r
+\r
+                assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+                    function () {\r
+                        device.connect(onconnected, onerror);\r
+                }, "Given incorrect successCallback.");\r
+            }, "connect_successCallback_invalid_cb");\r
+\r
+            //connect_successCallback_TypeMismatch MC\r
+            test(function() {\r
+                var onerror = t.step_func(function (e) {\r
+                    assert_unreached("errorCallback exception:" + e.message);\r
+                });\r
+                var conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+                for(i = 0; i < conversionTable.length; i++) {\r
+                    var onconnected = conversionTable[i][0];\r
+                    var exceptionName = conversionTable[i][1];\r
+                    assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+                        function () {\r
+                            device.connect(onconnected, onerror);\r
+                        }, "Given incorrect successCallback.");\r
+                }\r
+            }, "connect_successCallback_TypeMismatch");\r
+\r
+            //BluetoothLEDevice_extend OBX\r
+            test(function() {\r
+                check_extensibility(device);\r
+            }, "BluetoothLEDevice_extend");\r
+\r
+            //connect MMINA MR\r
+            test(function() {\r
+                if (flag == false) {\r
+                    retValue = device.connect(onConnected, onError);\r
+                    assert_equals(retValue, undefined, "connect returns wrong value");\r
+                    flag = true;\r
+                    t.done();\r
+                }\r
+            }, "connect");\r
+        }\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    retValue = adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index a0214aa5676d1a9a4fd37bb0f35a3dad752fcaad..070952c6d5b4282cbd404f157805255f7078746b 100755 (executable)
@@ -1,78 +1,78 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_connect_errorCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_connect_errorCallback_TypeMismatch
-//==== LABEL Check whether connect() method called with invalid errorCallback argument throws an exception
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
-    conversionTable, onconnected, errorCallback, SuccessCB, device = null, flag = false;
-
-t.step(function () {
-
-    onconnected = t.step_func(function () {
-        assert_unreached("Method connect shouldn't end successfully. Given incorrect errorCallback.");
-    });
-
-    conversionTable = getTypeConversionExceptions("functionObject", true);
-    SuccessCB = t.step_func(function (bledevice) {
-       if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag ==false) {
-                for(i = 0; i < conversionTable.length; i++) {
-                    errorCallback = conversionTable[i][0];
-                    exceptionName = conversionTable[i][1];
-
-                    assert_throws(TYPE_MISMATCH_EXCEPTION,
-                        function () {
-                            device.connect(onconnected, errorCallback);
-                        }, "Given incorrect errorCallback.");
-                }
-                flag = true;
-            }
-            t.done();
-        }
-    });
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_connect_errorCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_connect_errorCallback_TypeMismatch\r
+//==== LABEL Check whether connect() method called with invalid errorCallback argument throws an exception\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+    conversionTable, onconnected, errorCallback, SuccessCB, device = null, flag = false;\r
+\r
+t.step(function () {\r
+\r
+    onconnected = t.step_func(function () {\r
+        assert_unreached("Method connect shouldn't end successfully. Given incorrect errorCallback.");\r
+    });\r
+\r
+    conversionTable = getTypeConversionExceptions("functionObject", true);\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+       if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag ==false) {\r
+                for(i = 0; i < conversionTable.length; i++) {\r
+                    errorCallback = conversionTable[i][0];\r
+                    exceptionName = conversionTable[i][1];\r
+\r
+                    assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+                        function () {\r
+                            device.connect(onconnected, errorCallback);\r
+                        }, "Given incorrect errorCallback.");\r
+                }\r
+                flag = true;\r
+            }\r
+            t.done();\r
+        }\r
+    });\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index eb4d914a34f359034aa250511594030e327d9386..70c5e10cf5cc2d523c2ae8bf07e40347a28299f7 100755 (executable)
@@ -1,80 +1,80 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_connect_errorCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_connect_errorCallback_invalid_cb
-//==== LABEL Check connect() argument errorCallback validation - use simple function
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB,
-    onconnected, onerror, flag = false, device = null;
-
-t.step(function () {
-    onerror = {
-        onerror: t.step_func(function (error) {
-            assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
-        })
-    };
-
-    onconnected = t.step_func(function (e) {
-        assert_unreached("Method connect shouldn't end successfully.");
-    });
-
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag ==false) {
-                assert_throws(TYPE_MISMATCH_EXCEPTION,
-                    function () {
-                        device.connect(onconnected, onerror);
-                    }, "Given incorrect errorCallback.");
-                flag = true;
-            }
-            t.done();
-        }
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    retValue = adapter.startScan(SuccessCB);
-
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_connect_errorCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_connect_errorCallback_invalid_cb\r
+//==== LABEL Check connect() argument errorCallback validation - use simple function\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB,\r
+    onconnected, onerror, flag = false, device = null;\r
+\r
+t.step(function () {\r
+    onerror = {\r
+        onerror: t.step_func(function (error) {\r
+            assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);\r
+        })\r
+    };\r
+\r
+    onconnected = t.step_func(function (e) {\r
+        assert_unreached("Method connect shouldn't end successfully.");\r
+    });\r
+\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag ==false) {\r
+                assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+                    function () {\r
+                        device.connect(onconnected, onerror);\r
+                    }, "Given incorrect errorCallback.");\r
+                flag = true;\r
+            }\r
+            t.done();\r
+        }\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    retValue = adapter.startScan(SuccessCB);\r
+\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 35ad38c725b0451dae8fb4918f8a30099464796d..72dcd3a38177a10c520d20bb0d5de79a7a491512 100755 (executable)
@@ -1,61 +1,61 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_connect_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_connect_exist
-//==== LABEL Method of connect exists in BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA ME
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null;
-
-t.step(function () {
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            device = bledevice;
-            adapter.stopScan();
-            check_method_exists(device, "connect");
-            t.done();
-        }
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_connect_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_connect_exist\r
+//==== LABEL Method of connect exists in BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA ME\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null;\r
+\r
+t.step(function () {\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            device = bledevice;\r
+            adapter.stopScan();\r
+            check_method_exists(device, "connect");\r
+            t.done();\r
+        }\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index b2ebc237e2fae515a5eef2497b66f1583f3ecc19..4d76ed42663f40c2f5d55090f9c064ec3573b8f3 100755 (executable)
@@ -1,78 +1,78 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_connect_successCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_connect_successCallback_TypeMismatch
-//==== LABEL Check whether connect() method called with invalid successCallback argument throws an exception
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
-    conversionTable, onconnected, onerror, SuccessCB, device = null, flag = false;
-
-t.step(function () {
-
-    onerror = t.step_func(function (e) {
-        assert_unreached("errorCallback exception:" + e.message);
-    });
-
-    conversionTable = getTypeConversionExceptions("functionObject", true);
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag ==false) {
-                for(i = 0; i < conversionTable.length; i++) {
-                    onconnected = conversionTable[i][0];
-                    exceptionName = conversionTable[i][1];
-
-                    assert_throws(TYPE_MISMATCH_EXCEPTION,
-                        function () {
-                            device.connect(onconnected, onerror);
-                        }, "Given incorrect successCallback.");
-                }
-                flag = true;
-            }
-            t.done();
-        }
-    });
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_connect_successCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_connect_successCallback_TypeMismatch\r
+//==== LABEL Check whether connect() method called with invalid successCallback argument throws an exception\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+    conversionTable, onconnected, onerror, SuccessCB, device = null, flag = false;\r
+\r
+t.step(function () {\r
+\r
+    onerror = t.step_func(function (e) {\r
+        assert_unreached("errorCallback exception:" + e.message);\r
+    });\r
+\r
+    conversionTable = getTypeConversionExceptions("functionObject", true);\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag ==false) {\r
+                for(i = 0; i < conversionTable.length; i++) {\r
+                    onconnected = conversionTable[i][0];\r
+                    exceptionName = conversionTable[i][1];\r
+\r
+                    assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+                        function () {\r
+                            device.connect(onconnected, onerror);\r
+                        }, "Given incorrect successCallback.");\r
+                }\r
+                flag = true;\r
+            }\r
+            t.done();\r
+        }\r
+    });\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index d4b424e898c5f28bd95f080d30886ea207518b75..e16773c3acb0906b70b4cc8d52aece1e1bbeeb40 100755 (executable)
@@ -1,80 +1,80 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_connect_successCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_connect_successCallback_invalid_cb
-//==== LABEL Check connect() argument successCallback validation - use simple function
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB,
-    onconnected, onerror, device = null, flag = false;
-
-t.step(function () {
-    onconnected = {
-        onsuccess: t.step_func(function () {
-            assert_unreached("Method connect shouldn't end successfully.");
-        })
-    };
-
-    onerror = t.step_func(function (e) {
-        assert_unreached("errorCB exception:" + e.message);
-    });
-
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag ==false) {
-                assert_throws(TYPE_MISMATCH_EXCEPTION,
-                    function () {
-                        device.connect(onconnected, onerror);
-                    }, "Given incorrect successCallback.");
-                flag = true;
-            }
-            t.done();
-        }
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    retValue = adapter.startScan(SuccessCB);
-
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_connect_successCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_connect_successCallback_invalid_cb\r
+//==== LABEL Check connect() argument successCallback validation - use simple function\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB,\r
+    onconnected, onerror, device = null, flag = false;\r
+\r
+t.step(function () {\r
+    onconnected = {\r
+        onsuccess: t.step_func(function () {\r
+            assert_unreached("Method connect shouldn't end successfully.");\r
+        })\r
+    };\r
+\r
+    onerror = t.step_func(function (e) {\r
+        assert_unreached("errorCB exception:" + e.message);\r
+    });\r
+\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag ==false) {\r
+                assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+                    function () {\r
+                        device.connect(onconnected, onerror);\r
+                    }, "Given incorrect successCallback.");\r
+                flag = true;\r
+            }\r
+            t.done();\r
+        }\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    retValue = adapter.startScan(SuccessCB);\r
+\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 8241c2d0fbd9bd4d64c129ffb16e38d107af6450..182a3b508e245e43b6b4c6a2988b4e4e686dc30f 100755 (executable)
@@ -1,74 +1,74 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_connect_with_errorcallback</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_connect_with_errorcallback
-//==== LABEL Check if connect method work properly of BluetoothLEDevice(with optional argument)
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MOA MR
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected,
-    onerror, device = null, flag = false;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        assert_equals(retValue, undefined, "connect returns wrong value");
-        device.disconnect();
-        t.done();
-    });
-
-    onerror = t.step_func(function (e) {
-        assert_unreached("connect errorCallback exception:" + e.message);
-    });
-
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                retValue = device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_connect_with_errorcallback</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_connect_with_errorcallback\r
+//==== LABEL Check if connect method work properly of BluetoothLEDevice(with optional argument)\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MOA MR\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected,\r
+    onerror, device = null, flag = false;\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        assert_equals(retValue, undefined, "connect returns wrong value");\r
+        device.disconnect();\r
+        t.done();\r
+    });\r
+\r
+    onerror = t.step_func(function (e) {\r
+        assert_unreached("connect errorCallback exception:" + e.message);\r
+    });\r
+\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                retValue = device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 293e6770524fa293634851ac24748b2622617050..344dafa199f08209d87862b8153c32b49d85a7e6 100755 (executable)
@@ -1,74 +1,74 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_disconnect</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_disconnect
-//==== LABEL Check if disconnect method work properly with BluetoothLEDevice(without optional argument)
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MMINA MAST MR
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected,
-    retValue = null, onerror, device, flag = false, device = null;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        retValue = device.disconnect();
-        assert_equals(retValue, undefined, "connect returns wrong value");
-        t.done();
-    });
-
-    onerror = t.step_func(function (e) {
-        assert_unreached("connect errorCallback exception:" + e.message);
-    });
-
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_disconnect</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_disconnect\r
+//==== LABEL Check if disconnect method work properly with BluetoothLEDevice(without optional argument)\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MMINA MAST MR\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected,\r
+    retValue = null, onerror, device, flag = false, device = null;\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        retValue = device.disconnect();\r
+        assert_equals(retValue, undefined, "connect returns wrong value");\r
+        t.done();\r
+    });\r
+\r
+    onerror = t.step_func(function (e) {\r
+        assert_unreached("connect errorCallback exception:" + e.message);\r
+    });\r
+\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index d688bec24d12dd79730171c6751293b0a53bd8c1..5227dd7b89aa4afb8d7ebe31714c485a63e82d68 100755 (executable)
@@ -1,72 +1,72 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_disconnect_InvalidStateError</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_disconnect_InvalidStateError
-//==== LABEL Check if disconnect method could throw InvalidStateError exception when device is not connected
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, ondisconnectsuccess, ondisconnecterror,
-    device = null, onerror;
-
-t.step(function () {
-    ondisconnectsuccess = t.step_func(function () {
-        assert_unreached("Invalid Success callback invoked");
-    });
-
-    ondisconnecterror = t.step_func(function (e) {
-        assert_unreached("Invalid Error callback invoked");
-    });
-
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            device = bledevice;
-            adapter.stopScan();
-            assert_throws({name: 'InvalidStateError'}, function () {
-                device.disconnect(ondisconnectsuccess, ondisconnecterror);
-            }, "InvalidStateError should be thrown with device is not connected");
-        t.done();
-        }
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_disconnect_InvalidStateError</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_disconnect_InvalidStateError\r
+//==== LABEL Check if disconnect method could throw InvalidStateError exception when device is not connected\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, ondisconnectsuccess, ondisconnecterror,\r
+    device = null, onerror;\r
+\r
+t.step(function () {\r
+    ondisconnectsuccess = t.step_func(function () {\r
+        assert_unreached("Invalid Success callback invoked");\r
+    });\r
+\r
+    ondisconnecterror = t.step_func(function (e) {\r
+        assert_unreached("Invalid Error callback invoked");\r
+    });\r
+\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            device = bledevice;\r
+            adapter.stopScan();\r
+            assert_throws({name: 'InvalidStateError'}, function () {\r
+                device.disconnect(ondisconnectsuccess, ondisconnecterror);\r
+            }, "InvalidStateError should be thrown with device is not connected");\r
+        t.done();\r
+        }\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index 847581c..4f4b8c5
-<!DOCTYPE html>
-<!--
-Copyright (c) 2017 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-        Pawel Kaczmarczyk <p.kaczmarczy@partner.samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_disconnect_combined</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_connect_and_disconnect
-//==== LABEL Check if connect method work properly with BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P3
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M
-//==== TEST_CRITERIA ME
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M
-//==== TEST_CRITERIA ME
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M
-//==== TEST_CRITERIA MTCB
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M
-//==== TEST_CRITERIA MTCB
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M
-//==== TEST_CRITERIA MMINA MAST MR
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null, flag = false,
-    onConnected, onError;
-
-t.step(function () {
-    onConnected = t.step_func(function () {
-        // BluetoothLEDevice_disconnect_exist ME
-        test(function() {
-            check_method_exists(device, "disconnect");
-        }, "disconnect_exist");
-
-        //BluetoothLEDevice_disconnect_successCallback_invalid_cb MTCB
-        test(function() {
-            var ondisconnectsuccess = {
-                    onsuccess: function () {
-                        assert_unreached("Method disconnect shouldn't end successfully.");
-                    }
-            };
-
-           ondisconnecterror = function (e) {
-               assert_unreached("errorCB exception:" + e.message);
-           };
-
-            assert_throws(TYPE_MISMATCH_EXCEPTION,
-                function () {
-                    device.disconnect(ondisconnectsuccess, ondisconnecterror);
-                }, "Given incorrect successCallback.");
-        }, "disconnectsuccessCallback_invalid_cb");
-
-        // BluetoothLEDevice_disconnect_errorCallback_invalid_cb MTCB
-        test(function() {
-            var ondisconnecterror = {
-                onerror: function (error) {
-                    assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
-                }
-            };
-            var ondisconnectsuccess = function (e) {
-                assert_unreached("Method disconnect shouldn't end successfully. This could affect other TCTs");
-            };
-
-            assert_throws(TYPE_MISMATCH_EXCEPTION,
-                function () {
-                    device.disconnect(ondisconnectsuccess, ondisconnecterror);
-                }, "Given incorrect errorCallback.");
-        }, "disconnect_errorCallback_invalid_cb");
-
-        // BluetoothLEDevice_disconnect_errorCallback_TypeMismatch MC
-        test(function() {
-            var ondisconnectsuccess = function() {
-                assert_unreached("Method disconnect shouldn't end successfully. This could affect other TCTs");
-            }
-            var conversionTable = getTypeConversionExceptions("functionObject", true);
-
-            for (i = 0; i < conversionTable.length; i++) {
-                var ondisconnecterror = conversionTable[i][0];
-                var exceptionName = conversionTable[i][1];
-                    assert_throws(TYPE_MISMATCH_EXCEPTION,
-                        function () {
-                            device.disconnect(ondisconnectsuccess, ondisconnecterror);
-                        }, "Given incorrect errorCallback.");
-                }
-        }, "disconnect_errorCallback_TypeMismatch" );
-
-        //BluetoothLEDevice_disconnect_successCallback_TypeMismatch MC
-        test(function() {
-            var ondisconnecterror = function (e) {
-                assert_unreached("errorCallback exception:" + e.message);
-            }
-            var conversionTable = getTypeConversionExceptions("functionObject", true);
-
-            for(i = 0; i < conversionTable.length; i++) {
-                var ondisconnectsuccess = conversionTable[i][0];
-                var exceptionName = conversionTable[i][1];
-                assert_throws(TYPE_MISMATCH_EXCEPTION,
-                    function () {
-                        device.disconnect(ondisconnectsuccess, ondisconnecterror);
-                    }, "Given incorrect successCallback.");
-            }
-        }, "disconnect_successCallback_TypeMismatch");
-
-        //BluetoothLEDevice_disconnect MMINA MAST MR
-        test(function() {
-            retValue = device.disconnect();
-            assert_equals(retValue, undefined, "connect returns wrong value");
-        }, "disconnect");
-
-        t.done();
-    });
-
-    onError = t.step_func(function (e) {
-        assert_unreached("connect errorCallback exception:" + e.message);
-    });
-
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            device = bledevice;
-            adapter.stopScan();
-
-            //BluetoothLEDevice_disconnect_InvalidStateError MC
-            test(function() {
-                var ondisconnectsuccess = function () {
-                    assert_unreached("Invalid Success callback invoked. This could affect other TCTs");
-                };
-                var ondisconnecterror = function (e) {
-                    assert_unreached("Invalid Error callback invoked");
-                };
-
-                assert_throws({name: 'InvalidStateError'}, function () {
-                    device.disconnect(ondisconnectsuccess, ondisconnecterror);
-                }, "InvalidStateError should be thrown with device is not connected");
-            }, "disconnect_InvalidStateError");
-
-            if (flag == false) {
-                device.connect(onConnected, onError);
-                flag = true;
-            }
-        }
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    retValue = adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2017 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+        Pawel Kaczmarczyk <p.kaczmarczy@partner.samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_disconnect_combined</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_connect_and_disconnect\r
+//==== LABEL Check if connect method work properly with BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P3\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M\r
+//==== TEST_CRITERIA ME\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M\r
+//==== TEST_CRITERIA ME\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M\r
+//==== TEST_CRITERIA MTCB\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M\r
+//==== TEST_CRITERIA MTCB\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M\r
+//==== TEST_CRITERIA MMINA MAST MR\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null, flag = false,\r
+    onConnected, onError;\r
+\r
+t.step(function () {\r
+    onConnected = t.step_func(function () {\r
+        // BluetoothLEDevice_disconnect_exist ME\r
+        test(function() {\r
+            check_method_exists(device, "disconnect");\r
+        }, "disconnect_exist");\r
+\r
+        //BluetoothLEDevice_disconnect_successCallback_invalid_cb MTCB\r
+        test(function() {\r
+            var ondisconnectsuccess = {\r
+                    onsuccess: function () {\r
+                        assert_unreached("Method disconnect shouldn't end successfully.");\r
+                    }\r
+            };\r
+\r
+           ondisconnecterror = function (e) {\r
+               assert_unreached("errorCB exception:" + e.message);\r
+           };\r
+\r
+            assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+                function () {\r
+                    device.disconnect(ondisconnectsuccess, ondisconnecterror);\r
+                }, "Given incorrect successCallback.");\r
+        }, "disconnectsuccessCallback_invalid_cb");\r
+\r
+        // BluetoothLEDevice_disconnect_errorCallback_invalid_cb MTCB\r
+        test(function() {\r
+            var ondisconnecterror = {\r
+                onerror: function (error) {\r
+                    assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);\r
+                }\r
+            };\r
+            var ondisconnectsuccess = function (e) {\r
+                assert_unreached("Method disconnect shouldn't end successfully. This could affect other TCTs");\r
+            };\r
+\r
+            assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+                function () {\r
+                    device.disconnect(ondisconnectsuccess, ondisconnecterror);\r
+                }, "Given incorrect errorCallback.");\r
+        }, "disconnect_errorCallback_invalid_cb");\r
+\r
+        // BluetoothLEDevice_disconnect_errorCallback_TypeMismatch MC\r
+        test(function() {\r
+            var ondisconnectsuccess = function() {\r
+                assert_unreached("Method disconnect shouldn't end successfully. This could affect other TCTs");\r
+            }\r
+            var conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+            for (i = 0; i < conversionTable.length; i++) {\r
+                var ondisconnecterror = conversionTable[i][0];\r
+                var exceptionName = conversionTable[i][1];\r
+                    assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+                        function () {\r
+                            device.disconnect(ondisconnectsuccess, ondisconnecterror);\r
+                        }, "Given incorrect errorCallback.");\r
+                }\r
+        }, "disconnect_errorCallback_TypeMismatch" );\r
+\r
+        //BluetoothLEDevice_disconnect_successCallback_TypeMismatch MC\r
+        test(function() {\r
+            var ondisconnecterror = function (e) {\r
+                assert_unreached("errorCallback exception:" + e.message);\r
+            }\r
+            var conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+            for(i = 0; i < conversionTable.length; i++) {\r
+                var ondisconnectsuccess = conversionTable[i][0];\r
+                var exceptionName = conversionTable[i][1];\r
+                assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+                    function () {\r
+                        device.disconnect(ondisconnectsuccess, ondisconnecterror);\r
+                    }, "Given incorrect successCallback.");\r
+            }\r
+        }, "disconnect_successCallback_TypeMismatch");\r
+\r
+        //BluetoothLEDevice_disconnect MMINA MAST MR\r
+        test(function() {\r
+            retValue = device.disconnect();\r
+            assert_equals(retValue, undefined, "connect returns wrong value");\r
+        }, "disconnect");\r
+\r
+        t.done();\r
+    });\r
+\r
+    onError = t.step_func(function (e) {\r
+        assert_unreached("connect errorCallback exception:" + e.message);\r
+    });\r
+\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            device = bledevice;\r
+            adapter.stopScan();\r
+\r
+            //BluetoothLEDevice_disconnect_InvalidStateError MC\r
+            test(function() {\r
+                var ondisconnectsuccess = function () {\r
+                    assert_unreached("Invalid Success callback invoked. This could affect other TCTs");\r
+                };\r
+                var ondisconnecterror = function (e) {\r
+                    assert_unreached("Invalid Error callback invoked");\r
+                };\r
+\r
+                assert_throws({name: 'InvalidStateError'}, function () {\r
+                    device.disconnect(ondisconnectsuccess, ondisconnecterror);\r
+                }, "InvalidStateError should be thrown with device is not connected");\r
+            }, "disconnect_InvalidStateError");\r
+\r
+            if (flag == false) {\r
+                device.connect(onConnected, onError);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    retValue = adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 412bc3734740370e0c30e46cdebdb0ebd92de987..28cb8fc3e97262c971b93660d86eeace8f8ceeee 100755 (executable)
@@ -1,86 +1,86 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_disconnect_errorCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_disconnect_errorCallback_TypeMismatch
-//==== LABEL Check whether disconnect() method called with invalid errorCallback argument throws an exception
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, ondisconnectsuccess, ondisconnecterror, onerror,
-    exceptionName, i, conversionTable, device = null, flag = false;
-
-t.step(function () {
-    ondisconnectsuccess = t.step_func(function () {
-        assert_unreached("Method disconnect shouldn't end successfully. Given incorrect errorCallback.");
-    });
-
-    conversionTable = getTypeConversionExceptions("functionObject", true);
-    onconnected = t.step_func(function () {
-        for(i = 0; i < conversionTable.length; i++) {
-            ondisconnecterror = conversionTable[i][0];
-            exceptionName = conversionTable[i][1];
-            assert_throws(TYPE_MISMATCH_EXCEPTION,
-                function () {
-                    device.disconnect(ondisconnectsuccess, ondisconnecterror);
-                }, "Given incorrect errorCallback.");
-        }
-        device.disconnect();
-        t.done();
-    });
-
-    onerror = t.step_func(function (e) {
-        assert_unreached("connect errorCallback exception:" + e.message);
-    });
-
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_disconnect_errorCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_disconnect_errorCallback_TypeMismatch\r
+//==== LABEL Check whether disconnect() method called with invalid errorCallback argument throws an exception\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, ondisconnectsuccess, ondisconnecterror, onerror,\r
+    exceptionName, i, conversionTable, device = null, flag = false;\r
+\r
+t.step(function () {\r
+    ondisconnectsuccess = t.step_func(function () {\r
+        assert_unreached("Method disconnect shouldn't end successfully. Given incorrect errorCallback.");\r
+    });\r
+\r
+    conversionTable = getTypeConversionExceptions("functionObject", true);\r
+    onconnected = t.step_func(function () {\r
+        for(i = 0; i < conversionTable.length; i++) {\r
+            ondisconnecterror = conversionTable[i][0];\r
+            exceptionName = conversionTable[i][1];\r
+            assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+                function () {\r
+                    device.disconnect(ondisconnectsuccess, ondisconnecterror);\r
+                }, "Given incorrect errorCallback.");\r
+        }\r
+        device.disconnect();\r
+        t.done();\r
+    });\r
+\r
+    onerror = t.step_func(function (e) {\r
+        assert_unreached("connect errorCallback exception:" + e.message);\r
+    });\r
+\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index a30a780e41cb88f426fa8283dedf6e6e20c037bb..2bb21cc47a297b8b4bfbef7c52e6d72a9a95412a 100755 (executable)
@@ -1,88 +1,88 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_disconnect_errorCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_disconnect_errorCallback_invalid_cb
-//==== LABEL Check disconnect() argument errorCallback validation - use simple function
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, ondisconnectsuccess, ondisconnecterror, onerror,
-    device = null, flag = false;
-
-t.step(function () {
-    ondisconnecterror = {
-        onerror: t.step_func(function (error) {
-            assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
-        })
-    };
-
-    ondisconnectsuccess = t.step_func(function (e) {
-        assert_unreached("Method disconnect shouldn't end successfully.");
-    });
-
-    onconnected = t.step_func(function () {
-        assert_throws(TYPE_MISMATCH_EXCEPTION,
-            function () {
-                device.disconnect(ondisconnectsuccess, ondisconnecterror);
-            }, "Given incorrect errorCallback.");
-        device.disconnect();
-        t.done();
-    });
-
-    onerror = t.step_func(function (e) {
-        assert_unreached("connect errorCallback exception:" + e.message);
-    });
-
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_disconnect_errorCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_disconnect_errorCallback_invalid_cb\r
+//==== LABEL Check disconnect() argument errorCallback validation - use simple function\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, ondisconnectsuccess, ondisconnecterror, onerror,\r
+    device = null, flag = false;\r
+\r
+t.step(function () {\r
+    ondisconnecterror = {\r
+        onerror: t.step_func(function (error) {\r
+            assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);\r
+        })\r
+    };\r
+\r
+    ondisconnectsuccess = t.step_func(function (e) {\r
+        assert_unreached("Method disconnect shouldn't end successfully.");\r
+    });\r
+\r
+    onconnected = t.step_func(function () {\r
+        assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+            function () {\r
+                device.disconnect(ondisconnectsuccess, ondisconnecterror);\r
+            }, "Given incorrect errorCallback.");\r
+        device.disconnect();\r
+        t.done();\r
+    });\r
+\r
+    onerror = t.step_func(function (e) {\r
+        assert_unreached("connect errorCallback exception:" + e.message);\r
+    });\r
+\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 2a1de9f62c6dfa13cd45bc38b1bd045272940600..b16c04629d90e681033173b51662a6db318f6566 100755 (executable)
@@ -1,73 +1,73 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_disconnect_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_disconnect_exist
-//==== LABEL Method of disconnect exists in BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P0
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA ME
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, device = null, flag = false;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        check_method_exists(device, "disconnect");
-        device.disconnect();
-        t.done();
-    });
-
-    onerror = t.step_func(function (e) {
-        assert_unreached("connect errorCallback exception:" + e.message);
-    });
-
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_disconnect_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_disconnect_exist\r
+//==== LABEL Method of disconnect exists in BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P0\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA ME\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, device = null, flag = false;\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        check_method_exists(device, "disconnect");\r
+        device.disconnect();\r
+        t.done();\r
+    });\r
+\r
+    onerror = t.step_func(function (e) {\r
+        assert_unreached("connect errorCallback exception:" + e.message);\r
+    });\r
+\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index d8507150f43dc5910f33bf72def724cc90f3a97f..70753f5ca7e105b6247a8c7527d693438daace75 100755 (executable)
@@ -1,86 +1,86 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_disconnect_successCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_disconnect_successCallback_TypeMismatch
-//==== LABEL Check whether disconnect() method called with invalid successCallback argument throws an exception
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, ondisconnectsuccess, ondisconnecterror, onerror,
-    exceptionName, i, conversionTable, device = null, flag = false;
-
-t.step(function () {
-    ondisconnecterror = t.step_func(function (e) {
-        assert_unreached("errorCallback exception:" + e.message);
-    });
-
-    conversionTable = getTypeConversionExceptions("functionObject", true);
-    onconnected = t.step_func(function () {
-        for(i = 0; i < conversionTable.length; i++) {
-            ondisconnectsuccess = conversionTable[i][0];
-            exceptionName = conversionTable[i][1];
-            assert_throws(TYPE_MISMATCH_EXCEPTION,
-                function () {
-                    device.disconnect(ondisconnectsuccess, ondisconnecterror);
-                }, "Given incorrect successCallback.");
-        }
-        device.disconnect();
-        t.done();
-    });
-
-    onerror = t.step_func(function (e) {
-        assert_unreached("connect errorCallback exception:" + e.message);
-    });
-
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_disconnect_successCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_disconnect_successCallback_TypeMismatch\r
+//==== LABEL Check whether disconnect() method called with invalid successCallback argument throws an exception\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, ondisconnectsuccess, ondisconnecterror, onerror,\r
+    exceptionName, i, conversionTable, device = null, flag = false;\r
+\r
+t.step(function () {\r
+    ondisconnecterror = t.step_func(function (e) {\r
+        assert_unreached("errorCallback exception:" + e.message);\r
+    });\r
+\r
+    conversionTable = getTypeConversionExceptions("functionObject", true);\r
+    onconnected = t.step_func(function () {\r
+        for(i = 0; i < conversionTable.length; i++) {\r
+            ondisconnectsuccess = conversionTable[i][0];\r
+            exceptionName = conversionTable[i][1];\r
+            assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+                function () {\r
+                    device.disconnect(ondisconnectsuccess, ondisconnecterror);\r
+                }, "Given incorrect successCallback.");\r
+        }\r
+        device.disconnect();\r
+        t.done();\r
+    });\r
+\r
+    onerror = t.step_func(function (e) {\r
+        assert_unreached("connect errorCallback exception:" + e.message);\r
+    });\r
+\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 7dc31545e8b7527cdcd91fc1deb3ab895956feaa..32d17ad459fb39852916414d384583cfa76a2f40 100755 (executable)
@@ -1,88 +1,88 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_disconnect_successCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_disconnect_successCallback_invalid_cb
-//==== LABEL Check disconnect() argument successCallback validation - use simple function
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, ondisconnectsuccess, ondisconnecterror, onerror,
-    device = null, flag = false;
-
-t.step(function () {
-    ondisconnectsuccess = {
-        onsuccess: t.step_func(function () {
-            assert_unreached("Method disconnect shouldn't end successfully.");
-        })
-    };
-
-    ondisconnecterror = t.step_func(function (e) {
-        assert_unreached("errorCB exception:" + e.message);
-    });
-
-    onconnected = t.step_func(function () {
-        assert_throws(TYPE_MISMATCH_EXCEPTION,
-            function () {
-                device.disconnect(ondisconnectsuccess, ondisconnecterror);
-            }, "Given incorrect successCallback.");
-        device.disconnect();
-        t.done();
-    });
-
-    onerror = t.step_func(function (e) {
-        assert_unreached("connect errorCallback exception:" + e.message);
-    });
-
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_disconnect_successCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_disconnect_successCallback_invalid_cb\r
+//==== LABEL Check disconnect() argument successCallback validation - use simple function\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, ondisconnectsuccess, ondisconnecterror, onerror,\r
+    device = null, flag = false;\r
+\r
+t.step(function () {\r
+    ondisconnectsuccess = {\r
+        onsuccess: t.step_func(function () {\r
+            assert_unreached("Method disconnect shouldn't end successfully.");\r
+        })\r
+    };\r
+\r
+    ondisconnecterror = t.step_func(function (e) {\r
+        assert_unreached("errorCB exception:" + e.message);\r
+    });\r
+\r
+    onconnected = t.step_func(function () {\r
+        assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+            function () {\r
+                device.disconnect(ondisconnectsuccess, ondisconnecterror);\r
+            }, "Given incorrect successCallback.");\r
+        device.disconnect();\r
+        t.done();\r
+    });\r
+\r
+    onerror = t.step_func(function (e) {\r
+        assert_unreached("connect errorCallback exception:" + e.message);\r
+    });\r
+\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 55947d69a7f19dc7c777b4ac4c991b10086f2e76..6d3743c0340bff2f09e4fd50aefd62f57317c0ae 100755 (executable)
@@ -1,81 +1,81 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_disconnect_with_errorCallback</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_disconnect_with_errorCallback
-//==== LABEL Check if disconnect method work properly with BluetoothLEDevice(with optional argument)
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MOA MR
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, ondisconnectsuccess, ondisconnecterror, onerror,
-    retValue = null, device = null, flag = false;
-
-t.step(function () {
-    ondisconnectsuccess = t.step_func(function () {
-        assert_equals(retValue, undefined, "disconnect returns wrong value");
-        t.done();
-    });
-
-    ondisconnecterror = t.step_func(function (e) {
-        assert_unreached("disconnect errorCallback exception:" + e.message);
-    });
-
-    onconnected = t.step_func(function () {
-        retValue = device.disconnect(ondisconnectsuccess, ondisconnecterror);
-    });
-
-    onerror = t.step_func(function (e) {
-        assert_unreached("connect errorCallback exception:" + e.message);
-    });
-
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_disconnect_with_errorCallback</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_disconnect_with_errorCallback\r
+//==== LABEL Check if disconnect method work properly with BluetoothLEDevice(with optional argument)\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MOA MR\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, ondisconnectsuccess, ondisconnecterror, onerror,\r
+    retValue = null, device = null, flag = false;\r
+\r
+t.step(function () {\r
+    ondisconnectsuccess = t.step_func(function () {\r
+        assert_equals(retValue, undefined, "disconnect returns wrong value");\r
+        t.done();\r
+    });\r
+\r
+    ondisconnecterror = t.step_func(function (e) {\r
+        assert_unreached("disconnect errorCallback exception:" + e.message);\r
+    });\r
+\r
+    onconnected = t.step_func(function () {\r
+        retValue = device.disconnect(ondisconnectsuccess, ondisconnecterror);\r
+    });\r
+\r
+    onerror = t.step_func(function (e) {\r
+        assert_unreached("connect errorCallback exception:" + e.message);\r
+    });\r
+\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index f79e6768a7c6c9ab1d7be126f75d473f63443649..e04b16f1b12ac4efd3a2353d920ccc781bb32596 100755 (executable)
@@ -1,58 +1,58 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_extend</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_extend
-//==== LABEL Test whether the object can have new properties added for BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P3
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:BluetoothLEDevice U
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA OBX
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB;
-
-t.step(function () {
-    SuccessCB = t.step_func(function (device) {
-        check_extensibility(device);
-        adapter.stopScan();
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_extend</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_extend\r
+//==== LABEL Test whether the object can have new properties added for BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P3\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:BluetoothLEDevice U\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA OBX\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB;\r
+\r
+t.step(function () {\r
+    SuccessCB = t.step_func(function (device) {\r
+        check_extensibility(device);\r
+        adapter.stopScan();\r
+        t.done();\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index b442f180652bc88544cde14800d3da203a84f1c1..1b4e5a6b86eba60cd02bf8994faa9a0b5a0534c1 100755 (executable)
@@ -1,75 +1,75 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_getService</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_getService
-//==== LABEL Check if getService method work properly with BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getService M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MAST MR
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, service,
-    device = null, flag = false;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-        assert_type(service, "object", "method returned object type");
-        device.disconnect();
-        t.done();
-    });
-
-    onerror = t.step_func(function (e) {
-        assert_unreached("connect errorCallback exception:" + e.message);
-    });
-
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_getService</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_getService\r
+//==== LABEL Check if getService method work properly with BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getService M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MAST MR\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, service,\r
+    device = null, flag = false;\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+        assert_type(service, "object", "method returned object type");\r
+        device.disconnect();\r
+        t.done();\r
+    });\r
+\r
+    onerror = t.step_func(function (e) {\r
+        assert_unreached("connect errorCallback exception:" + e.message);\r
+    });\r
+\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index fb81be44c13ca18356c9f62093377c4198db48c5..95e282751e34ca6b92306af75157112f22decb81 100755 (executable)
@@ -1,75 +1,75 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_getServiceAllUuids</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_getServiceAllUuids
-//==== LABEL Check if getServiceAllUuids method work properly with BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getServiceAllUuids M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MNA MR
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, service,
-    device = null, flag = false;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        service = device.getServiceAllUuids();
-        assert_type(service, "array", "method returned array type");
-        device.disconnect();
-        t.done();
-    });
-
-    onerror = t.step_func(function (e) {
-        assert_unreached("connect errorCallback exception:" + e.message);
-    });
-
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_getServiceAllUuids</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_getServiceAllUuids\r
+//==== LABEL Check if getServiceAllUuids method work properly with BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getServiceAllUuids M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MNA MR\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, service,\r
+    device = null, flag = false;\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        service = device.getServiceAllUuids();\r
+        assert_type(service, "array", "method returned array type");\r
+        device.disconnect();\r
+        t.done();\r
+    });\r
+\r
+    onerror = t.step_func(function (e) {\r
+        assert_unreached("connect errorCallback exception:" + e.message);\r
+    });\r
+\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index c02515d37fd0f2cf79c9d59930271d7142c5b6a3..f6970c02b867d22ba7157730a685a7ec02a9a7ac 100755 (executable)
@@ -1,74 +1,74 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_getServiceAllUuids_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_getServiceAllUuids_exist
-//==== LABEL Method of getServiceAllUuids exists in BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P0
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getServiceAllUuids M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA ME
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected,
-    device = null, flag = false;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        check_method_exists(device, "getServiceAllUuids");
-        device.disconnect();
-        t.done();
-    });
-
-    onerror = t.step_func(function (e) {
-        assert_unreached("connect errorCallback exception:" + e.message);
-    });
-
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_getServiceAllUuids_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_getServiceAllUuids_exist\r
+//==== LABEL Method of getServiceAllUuids exists in BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P0\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getServiceAllUuids M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA ME\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected,\r
+    device = null, flag = false;\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        check_method_exists(device, "getServiceAllUuids");\r
+        device.disconnect();\r
+        t.done();\r
+    });\r
+\r
+    onerror = t.step_func(function (e) {\r
+        assert_unreached("connect errorCallback exception:" + e.message);\r
+    });\r
+\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 97965b018cc5426c84e95fc6c89d6d28e7b1017f..e51448b9e8f3edade809455920586cb710e67745 100755 (executable)
@@ -1,72 +1,72 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_getServiceAllUuids_extra_argument</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_getServiceAllUuids_extra_argument
-//==== LABEL Check if method getServiceAllUuids of BluetoothLEDevice accepts extra argument
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getServiceAllUuids M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MNAEX
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected,
-    device = null, flag = false;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        checkExtraArgument(device, "getServiceAllUuids");
-        device.disconnect();
-        t.done();
-    });
-
-    onerror = t.step_func(function (e) {
-        assert_unreached("connect errorCallback exception:" + e.message);
-    });
-
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_getServiceAllUuids_extra_argument</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_getServiceAllUuids_extra_argument\r
+//==== LABEL Check if method getServiceAllUuids of BluetoothLEDevice accepts extra argument\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getServiceAllUuids M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MNAEX\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected,\r
+    device = null, flag = false;\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        checkExtraArgument(device, "getServiceAllUuids");\r
+        device.disconnect();\r
+        t.done();\r
+    });\r
+\r
+    onerror = t.step_func(function (e) {\r
+        assert_unreached("connect errorCallback exception:" + e.message);\r
+    });\r
+\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 0a7f76dcf681b59b60fdaa6f95696c89aef7a91a..67cf5cae09facf23edcfee26555e82b97cf77fca 100755 (executable)
@@ -1,78 +1,78 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_getService_NotFoundError</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_getService_NotFoundError
-//==== LABEL Check getService method of BluetoothLEDevice interface could be throw NotFoundError
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getService M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, service, id, ids,
-    device = null, flag = false;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        id = device.uuids[0];
-        ids = id + "Tizen";
-        assert_throws(NOT_FOUND_EXCEPTION, function () {
-            device.getService(ids);
-        }, "Not given any argument.");
-        device.disconnect();
-        t.done();
-    });
-
-    onerror = t.step_func(function (e) {
-        assert_unreached("connect errorCallback exception:" + e.message);
-    });
-
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_getService_NotFoundError</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_getService_NotFoundError\r
+//==== LABEL Check getService method of BluetoothLEDevice interface could be throw NotFoundError\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getService M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, service, id, ids,\r
+    device = null, flag = false;\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        id = device.uuids[0];\r
+        ids = id + "Tizen";\r
+        assert_throws(NOT_FOUND_EXCEPTION, function () {\r
+            device.getService(ids);\r
+        }, "Not given any argument.");\r
+        device.disconnect();\r
+        t.done();\r
+    });\r
+\r
+    onerror = t.step_func(function (e) {\r
+        assert_unreached("connect errorCallback exception:" + e.message);\r
+    });\r
+\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index 297db52..f1b2670
-<!DOCTYPE html>
-<!--
-Copyright (c) 2017 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-        Pawel Kaczmarczyk <p.kaczmarczy@partner.samsung.com>>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_getService_combined</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_getService_combined
-//==== LABEL Check if getService method work properly with BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P3
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getService M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MAST MR
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getService M
-//==== TEST_CRITERIA ME
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getService M
-//==== TEST_CRITERIA MMA
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getServiceAllUuids M
-//==== TEST_CRITERIA MNA MR
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getServiceAllUuids M
-//==== TEST_CRITERIA ME
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getService M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getServiceAllUuids M
-//==== TEST_CRITERIA MNAEX
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, service,
-    device = null, flag = false;
-
-t.step(function () {
-     onconnected = t.step_func(function () {
-          //BluetoothLEDevice_getService MAST MR
-          test(function() {
-               service = device.getService(device.uuids[0]);
-               assert_type(service, "object", "method returned object type");
-          }, "getService");
-
-          //getService_exist ME
-          test(function() {
-               check_method_exists(device, "getService");
-          }, "getService_exists");
-
-          //getService_misarg MMA
-          test(function () {
-               assert_throws({name: 'NotFoundError'}, function () {
-                    device.getService();
-               }, "Not given any argument.");
-          }, "getService_misarg");
-
-          //getServiceAllUuids MNA MR
-          test(function() {
-               service = device.getServiceAllUuids();
-               assert_type(service, "array", "method returned array type");
-          }, "getServiceAllUuids");
-
-          //getServiceAllUuids_exist ME
-          test(function() {
-               check_method_exists(device, "getServiceAllUuids");
-          }, "getServiceAllUuids_exist");
-
-          //getService_NotFoundError MC
-          test(function() {
-               id = device.uuids[0];
-               ids = id + "Tizen";
-               assert_throws(NOT_FOUND_EXCEPTION, function () {
-                    device.getService(ids);
-               }, "Not given any argument.");
-          }, "getService_NotFoundError");
-
-          //getServiceAllUuids_extra_argument MNAEX
-          test(function() {
-               checkExtraArgument(device, "getServiceAllUuids");
-          }, "getServiceAllUuids_extra_argument");
-
-          t.done();
-     });
-
-     onerror = t.step_func(function (e) {
-          assert_unreached("connect errorCallback exception:" + e.message);
-     });
-
-     SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2017 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+        Pawel Kaczmarczyk <p.kaczmarczy@partner.samsung.com>>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_getService_combined</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_getService_combined\r
+//==== LABEL Check if getService method work properly with BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P3\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getService M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MAST MR\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getService M\r
+//==== TEST_CRITERIA ME\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getService M\r
+//==== TEST_CRITERIA MMA\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getServiceAllUuids M\r
+//==== TEST_CRITERIA MNA MR\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getServiceAllUuids M\r
+//==== TEST_CRITERIA ME\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getService M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getServiceAllUuids M\r
+//==== TEST_CRITERIA MNAEX\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, service,\r
+    device = null, flag = false;\r
+\r
+t.step(function () {\r
+     onconnected = t.step_func(function () {\r
+          //BluetoothLEDevice_getService MAST MR\r
+          test(function() {\r
+               service = device.getService(device.uuids[0]);\r
+               assert_type(service, "object", "method returned object type");\r
+          }, "getService");\r
+\r
+          //getService_exist ME\r
+          test(function() {\r
+               check_method_exists(device, "getService");\r
+          }, "getService_exists");\r
+\r
+          //getService_misarg MMA\r
+          test(function () {\r
+               assert_throws({name: 'NotFoundError'}, function () {\r
+                    device.getService();\r
+               }, "Not given any argument.");\r
+          }, "getService_misarg");\r
+\r
+          //getServiceAllUuids MNA MR\r
+          test(function() {\r
+               service = device.getServiceAllUuids();\r
+               assert_type(service, "array", "method returned array type");\r
+          }, "getServiceAllUuids");\r
+\r
+          //getServiceAllUuids_exist ME\r
+          test(function() {\r
+               check_method_exists(device, "getServiceAllUuids");\r
+          }, "getServiceAllUuids_exist");\r
+\r
+          //getService_NotFoundError MC\r
+          test(function() {\r
+               id = device.uuids[0];\r
+               ids = id + "Tizen";\r
+               assert_throws(NOT_FOUND_EXCEPTION, function () {\r
+                    device.getService(ids);\r
+               }, "Not given any argument.");\r
+          }, "getService_NotFoundError");\r
+\r
+          //getServiceAllUuids_extra_argument MNAEX\r
+          test(function() {\r
+               checkExtraArgument(device, "getServiceAllUuids");\r
+          }, "getServiceAllUuids_extra_argument");\r
+\r
+          t.done();\r
+     });\r
+\r
+     onerror = t.step_func(function (e) {\r
+          assert_unreached("connect errorCallback exception:" + e.message);\r
+     });\r
+\r
+     SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 79da3a06f51ab6d34b30d8a34662b9d4b7ee8846..287c589a2184e80e7390dee5af73b6022cddd65c 100755 (executable)
@@ -1,74 +1,74 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_getService_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_getService_exist
-//==== LABEL Method of getService exists in BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P0
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getService M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA ME
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected,
-    device = null, flag = false;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        check_method_exists(device, "getService");
-        device.disconnect();
-        t.done();
-    });
-
-    onerror = t.step_func(function (e) {
-        assert_unreached("connect errorCallback exception:" + e.message);
-    });
-
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_getService_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_getService_exist\r
+//==== LABEL Method of getService exists in BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P0\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getService M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA ME\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected,\r
+    device = null, flag = false;\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        check_method_exists(device, "getService");\r
+        device.disconnect();\r
+        t.done();\r
+    });\r
+\r
+    onerror = t.step_func(function (e) {\r
+        assert_unreached("connect errorCallback exception:" + e.message);\r
+    });\r
+\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 48c095a8d88da903cf0b80b01df69408a27a1e52..43f20b0f29cd9a178032e668a4dba937ed42e429 100755 (executable)
@@ -1,76 +1,76 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_getService_misarg</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_getService_misarg
-//==== LABEL Check getService method of BluetoothLEDevice interface with missing all argument
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getService M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MMA
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, service,
-    device = null, flag = false;
-
-t.step(function () {
-    onconnected = t.step_func(function () {
-        assert_throws({name: 'NotFoundError'}, function () {
-            device.getService();
-        }, "Not given any argument.");
-        device.disconnect();
-        t.done();
-    });
-
-    onerror = t.step_func(function (e) {
-        assert_unreached("connect errorCallback exception:" + e.message);
-    });
-
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_getService_misarg</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_getService_misarg\r
+//==== LABEL Check getService method of BluetoothLEDevice interface with missing all argument\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getService M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MMA\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, service,\r
+    device = null, flag = false;\r
+\r
+t.step(function () {\r
+    onconnected = t.step_func(function () {\r
+        assert_throws({name: 'NotFoundError'}, function () {\r
+            device.getService();\r
+        }, "Not given any argument.");\r
+        device.disconnect();\r
+        t.done();\r
+    });\r
+\r
+    onerror = t.step_func(function (e) {\r
+        assert_unreached("connect errorCallback exception:" + e.message);\r
+    });\r
+\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index caccf5eb28ef57a7ceb82cef62a11c7d859d7703..8e561c515a018b4f9fdaec49682fdb52e6456b5d 100755 (executable)
@@ -1,64 +1,64 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_includeName_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_includeName_attribute
-//==== LABEL Check includeName attribute in BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:includeName A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB;
-
-t.step(function () {
-    SuccessCB = {
-        onstarted: t.step_func(function () {
-        }),
-        ondevicefound: t.step_func(function (device) {
-            if(device.address == REMOTE_BLE_DEVICE_ADDRESS){
-                check_readonly(device, "includeName", device.includeName, "string", REMOTE_DEVICE_NAME + "Tizen");
-                t.done();
-            }
-        }),
-        onfinished: t.step_func(function (devices) {
-        })
-    };
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_includeName_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_includeName_attribute\r
+//==== LABEL Check includeName attribute in BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:includeName A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB;\r
+\r
+t.step(function () {\r
+    SuccessCB = {\r
+        onstarted: t.step_func(function () {\r
+        }),\r
+        ondevicefound: t.step_func(function (device) {\r
+            if(device.address == REMOTE_BLE_DEVICE_ADDRESS){\r
+                check_readonly(device, "includeName", device.includeName, "string", REMOTE_DEVICE_NAME + "Tizen");\r
+                t.done();\r
+            }\r
+        }),\r
+        onfinished: t.step_func(function (devices) {\r
+        })\r
+    };\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 453b8781e2a74225c3a6a06ec8b90b721e1c8d7d..cc53a444c66e63884cad372a6fa5427e582eeef8 100755 (executable)
@@ -1,62 +1,62 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_includeTxPowerLevel_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_includeTxPowerLevel_attribute
-//==== LABEL Check includeTxPowerLevel attribute in BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:includeTxPowerLevel A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB;
-
-t.step(function () {
-    SuccessCB = {
-        onstarted: t.step_func(function () {
-        }),
-        ondevicefound: t.step_func(function (device) {
-            if(device.address == REMOTE_BLE_DEVICE_ADDRESS){
-                check_readonly(device, "includeTxPowerLevel", device.includeTxPowerLevel, "unsigned long", 1234);
-                t.done();
-            }
-        }),
-        onfinished: t.step_func(function (devices) {
-        })
-    };
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_includeTxPowerLevel_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_includeTxPowerLevel_attribute\r
+//==== LABEL Check includeTxPowerLevel attribute in BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:includeTxPowerLevel A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB;\r
+\r
+t.step(function () {\r
+    SuccessCB = {\r
+        onstarted: t.step_func(function () {\r
+        }),\r
+        ondevicefound: t.step_func(function (device) {\r
+            if(device.address == REMOTE_BLE_DEVICE_ADDRESS){\r
+                check_readonly(device, "includeTxPowerLevel", device.includeTxPowerLevel, "unsigned long", 1234);\r
+                t.done();\r
+            }\r
+        }),\r
+        onfinished: t.step_func(function (devices) {\r
+        })\r
+    };\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 63727300efed215e09db2b0fea96c2686b67e7b2..de06a4c2ff32dc5f308ca21f8e88ea6663750280 100755 (executable)
@@ -1,67 +1,67 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_manufacturerData_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_manufacturerData_attribute
-//==== LABEL Check manufacturerData attribute in BluetoothLEDevice is readonly
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:manufacturerData A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null, tmp;
-
-t.step(function () {
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            device = bledevice;
-            adapter.stopScan();
-            if (device.manufacturerData == null) {
-                t.done();
-            } else {
-                tmp = device.manufacturerData;
-                device.manufacturerData = new tizen.BluetoothLEManufacturerData("127", "0x0057");
-                assert_equals(device.manufacturerData.id, tmp.id, "ManufacturerData can be modified.");
-                assert_equals(device.manufacturerData.data, tmp.data, "ManufacturerData can be modified.");
-                t.done();
-            }
-        }
-    });
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_manufacturerData_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_manufacturerData_attribute\r
+//==== LABEL Check manufacturerData attribute in BluetoothLEDevice is readonly\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:manufacturerData A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null, tmp;\r
+\r
+t.step(function () {\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            device = bledevice;\r
+            adapter.stopScan();\r
+            if (device.manufacturerData == null) {\r
+                t.done();\r
+            } else {\r
+                tmp = device.manufacturerData;\r
+                device.manufacturerData = new tizen.BluetoothLEManufacturerData("127", "0x0057");\r
+                assert_equals(device.manufacturerData.id, tmp.id, "ManufacturerData can be modified.");\r
+                assert_equals(device.manufacturerData.data, tmp.data, "ManufacturerData can be modified.");\r
+                t.done();\r
+            }\r
+        }\r
+    });\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index c62837e5f65798596721ed0a27012874fe7776c3..db881382a7931a4b51a50578fe0c4ed3e4e05e8d 100755 (executable)
@@ -1,61 +1,61 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_name_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_name_attribute
-//==== LABEL Check name attribute in BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:name A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null;
-
-t.step(function () {
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            device = bledevice;
-            adapter.stopScan();
-            check_readonly(device, "name", device.name, "string", REMOTE_DEVICE_NAME + "Tizen");
-            t.done();
-        }
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_name_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_name_attribute\r
+//==== LABEL Check name attribute in BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:name A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null;\r
+\r
+t.step(function () {\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            device = bledevice;\r
+            adapter.stopScan();\r
+            check_readonly(device, "name", device.name, "string", REMOTE_DEVICE_NAME + "Tizen");\r
+            t.done();\r
+        }\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index eae52e3809dd4fcf0a00f84d0fe9961e71b12ce5..19a1be943accf615ab0f495481722677b84b5b94 100755 (executable)
@@ -1,43 +1,47 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_notexist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_notexist
-//==== LABEL Check if is possible to call BluetoothLEDevice in new expresion
-//==== PRIORITY P3
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice U
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA NIO
-
-test(function () {
-    check_no_interface_object("BluetoothLEDevice");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_notexist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_notexist\r
+//==== LABEL Check if is possible to call BluetoothLEDevice in new expresion\r
+//==== PRIORITY P3\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice U\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA NIO\r
+\r
+test(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        check_no_interface_object("BluetoothLEDevice");\r
+\r
+    }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 24bcfadd935ffa7e7a177004b2b89719bd3061b2..fed2c244dded2034795c8d2e78b1b104cd7e96db 100755 (executable)
@@ -1,83 +1,83 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_removeConnectStateChangeListener</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_removeConnectStateChangeListener
-//==== LABEL Check if removeConnectStateChangeListener method work properly
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:removeConnectStateChangeListener M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MAST MR
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onConnectionStateChange,
-    listenerID, retValue, device = null, flag = false, onconnected, onerror;
-
-t.step(function () {
-    onConnectionStateChange = {
-        onconnected: t.step_func(function (device) {
-            retValue = device.removeConnectStateChangeListener(listenerID);
-            assert_equals(retValue, undefined, "removeConnectStateChangeListener returns wrong value");
-            t.done();
-        }),
-        ondisconnected: t.step_func(function (device) {
-        }),
-    };
-
-    onconnected = t.step_func(function () {
-        device.disconnect();
-    });
-
-    onerror = t.step_func(function (e) {
-        assert_unreached("connect errorCallback exception:" + e.message);
-    });
-
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                listenerID = device.addConnectStateChangeListener(onConnectionStateChange);
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_removeConnectStateChangeListener</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_removeConnectStateChangeListener\r
+//==== LABEL Check if removeConnectStateChangeListener method work properly\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:removeConnectStateChangeListener M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MAST MR\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onConnectionStateChange,\r
+    listenerID, retValue, device = null, flag = false, onconnected, onerror;\r
+\r
+t.step(function () {\r
+    onConnectionStateChange = {\r
+        onconnected: t.step_func(function (device) {\r
+            retValue = device.removeConnectStateChangeListener(listenerID);\r
+            assert_equals(retValue, undefined, "removeConnectStateChangeListener returns wrong value");\r
+            t.done();\r
+        }),\r
+        ondisconnected: t.step_func(function (device) {\r
+        }),\r
+    };\r
+\r
+    onconnected = t.step_func(function () {\r
+        device.disconnect();\r
+    });\r
+\r
+    onerror = t.step_func(function (e) {\r
+        assert_unreached("connect errorCallback exception:" + e.message);\r
+    });\r
+\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                listenerID = device.addConnectStateChangeListener(onConnectionStateChange);\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 859a08076da9e8651411b9c8f5d19910a056a536..afed37e8e52de51d461da338d49357b99d75d6a8 100755 (executable)
@@ -1,82 +1,82 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_removeConnectStateChangeListener_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_removeConnectStateChangeListener_exist
-//==== LABEL Check if removeConnectStateChangeListener method exists
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P0
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:removeConnectStateChangeListener M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA ME
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onConnectionStateChange,
-    listenerID, device = null, flag = false, onconnected, onerror;
-
-t.step(function () {
-    onConnectionStateChange = {
-        onconnected: t.step_func(function (device) {
-        }),
-        ondisconnected: t.step_func(function (device) {
-            check_method_exists(device, "removeConnectStateChangeListener");
-            t.done();
-        }),
-    };
-
-    onconnected = t.step_func(function () {
-        device.disconnect();
-    });
-
-    onerror = t.step_func(function (e) {
-        assert_unreached("connect errorCallback exception:" + e.message);
-    });
-
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                listenerID = device.addConnectStateChangeListener(onConnectionStateChange);
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_removeConnectStateChangeListener_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_removeConnectStateChangeListener_exist\r
+//==== LABEL Check if removeConnectStateChangeListener method exists\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P0\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:removeConnectStateChangeListener M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA ME\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onConnectionStateChange,\r
+    listenerID, device = null, flag = false, onconnected, onerror;\r
+\r
+t.step(function () {\r
+    onConnectionStateChange = {\r
+        onconnected: t.step_func(function (device) {\r
+        }),\r
+        ondisconnected: t.step_func(function (device) {\r
+            check_method_exists(device, "removeConnectStateChangeListener");\r
+            t.done();\r
+        }),\r
+    };\r
+\r
+    onconnected = t.step_func(function () {\r
+        device.disconnect();\r
+    });\r
+\r
+    onerror = t.step_func(function (e) {\r
+        assert_unreached("connect errorCallback exception:" + e.message);\r
+    });\r
+\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                listenerID = device.addConnectStateChangeListener(onConnectionStateChange);\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index 29633a1..cb83265
@@ -1,60 +1,60 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_rssi_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_rssi_attribute
-//==== LABEL Check rssi attribute in BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:rssi A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null;
-
-t.step(function () {
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            device = bledevice;
-            adapter.stopScan();
-            check_readonly(device, "rssi", device.rssi, "long", -1024);
-            t.done();
-        }
-    });
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_rssi_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_rssi_attribute\r
+//==== LABEL Check rssi attribute in BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:rssi A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null;\r
+\r
+t.step(function () {\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            device = bledevice;\r
+            adapter.stopScan();\r
+            check_readonly(device, "rssi", device.rssi, "long", -1024);\r
+            t.done();\r
+        }\r
+    });\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 6fd21e2215e9e6ac4bf54758533c725b8e0b058e..6aaeb1b441c942906b8225d4bf0aba9e4523056b 100755 (executable)
@@ -1,60 +1,60 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_serviceData_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_serviceData_attribute
-//==== LABEL Check serviceData attribute in BluetoothLEDevice is readonly
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:serviceData A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null;
-
-t.step(function () {
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            device = bledevice;
-            adapter.stopScan();
-            check_readonly(device, "serviceData", device.serviceData, "array", 123);
-            t.done();
-        }
-    });
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_serviceData_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_serviceData_attribute\r
+//==== LABEL Check serviceData attribute in BluetoothLEDevice is readonly\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:serviceData A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null;\r
+\r
+t.step(function () {\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            device = bledevice;\r
+            adapter.stopScan();\r
+            check_readonly(device, "serviceData", device.serviceData, "array", 123);\r
+            t.done();\r
+        }\r
+    });\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 0e2064cd74d63c303551e596037aa81f405a3fd2..98fe874d26f57289ed8f4821997582fe237397f4 100755 (executable)
@@ -1,67 +1,67 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_solicitationuuids_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_solicitationuuids_attribute
-//==== LABEL Check solicitationuuids attribute in BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:solicitationuuids A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null, tmpSoUuids = [123];
-
-t.step(function () {
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            device = bledevice;
-            adapter.stopScan();
-            assert_own_property(device, "solicitationuuids", "BluetoothLEDevice does not own solicitationuuids property.");
-            if (device.solicitationuuids != null) {
-                assert_type(device.solicitationuuids, "array", "solicitationuuids should be an array");
-                device.solicitationuuids = tmpSoUuids;
-                assert_not_equals(device.solicitationuuids, tmpSoUuids, "solicitationuuids should not be modified");
-                t.done();
-            } else {
-                t.done();
-            }
-        }
-    });
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_solicitationuuids_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_solicitationuuids_attribute\r
+//==== LABEL Check solicitationuuids attribute in BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:solicitationuuids A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null, tmpSoUuids = [123];\r
+\r
+t.step(function () {\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            device = bledevice;\r
+            adapter.stopScan();\r
+            assert_own_property(device, "solicitationuuids", "BluetoothLEDevice does not own solicitationuuids property.");\r
+            if (device.solicitationuuids != null) {\r
+                assert_type(device.solicitationuuids, "array", "solicitationuuids should be an array");\r
+                device.solicitationuuids = tmpSoUuids;\r
+                assert_not_equals(device.solicitationuuids, tmpSoUuids, "solicitationuuids should not be modified");\r
+                t.done();\r
+            } else {\r
+                t.done();\r
+            }\r
+        }\r
+    });\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 55a773e6062c734c53a2be06f13bf0e05ddc7f7e..4d73700ed9799af92001e0b63283deafb5d3ba35 100755 (executable)
@@ -1,60 +1,60 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_txPowerLevel_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_txPowerLevel_attribute
-//==== LABEL Check txPowerLevel attribute in BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:txpowerlevel A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null;
-
-t.step(function () {
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            device = bledevice;
-            adapter.stopScan();
-            check_readonly(device, "txpowerlevel", device.txpowerlevel, "long", 1234);
-            t.done();
-        }
-    });
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_txPowerLevel_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_txPowerLevel_attribute\r
+//==== LABEL Check txPowerLevel attribute in BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:txpowerlevel A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null;\r
+\r
+t.step(function () {\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            device = bledevice;\r
+            adapter.stopScan();\r
+            check_readonly(device, "txpowerlevel", device.txpowerlevel, "long", 1234);\r
+            t.done();\r
+        }\r
+    });\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 6db767560bb6a398ab925c948fdcf6a20ca2e131..3fade4b363baa6a3b9a5806c8db44f21670a49d1 100755 (executable)
@@ -1,67 +1,67 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_uuids_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_uuids_attribute
-//==== LABEL Check uuids attribute in BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:uuids A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null, tmpUuids = [123];
-
-t.step(function () {
-    SuccessCB = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            device = bledevice;
-            adapter.stopScan();
-            assert_own_property(device, "uuids", "BluetoothLEDevice does not own uuids property.");
-            if (device.uuids != null) {
-                assert_type(device.uuids, "array", "uuids should be an array");
-                device.uuids = tmpUuids;
-                assert_not_equals(device.uuids, tmpUuids, "uuids should not be modified");
-                t.done();
-            } else {
-                t.done();
-            }
-        }
-    });
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_uuids_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_uuids_attribute\r
+//==== LABEL Check uuids attribute in BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:uuids A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null, tmpUuids = [123];\r
+\r
+t.step(function () {\r
+    SuccessCB = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            device = bledevice;\r
+            adapter.stopScan();\r
+            assert_own_property(device, "uuids", "BluetoothLEDevice does not own uuids property.");\r
+            if (device.uuids != null) {\r
+                assert_type(device.uuids, "array", "uuids should be an array");\r
+                device.uuids = tmpUuids;\r
+                assert_not_equals(device.uuids, tmpUuids, "uuids should not be modified");\r
+                t.done();\r
+            } else {\r
+                t.done();\r
+            }\r
+        }\r
+    });\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index eb5eb8aa91d0e2ec214bb13bad2f8b0a03101468..bf3f5aab2dd77c4188b74c77d483ffe69a64b012 100755 (executable)
@@ -1,72 +1,72 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothLEManufacturerData_data_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEManufacturerData_data_attribute
-//==== LABEL Check if BluetoothLEManufacturerData::data attribute exists, has type string and can be modified
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEManufacturerData:data A
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA AE AT ASG
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
-        manufacturerData, device = null;
-
-t.step(function () {
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            device = bledevice;
-            adapter.stopScan();
-            manufacturerData = device.manufacturerData;
-            if (manufacturerData != null) {
-                check_attribute(manufacturerData, "data", manufacturerData.data, "string", manufacturerData.data + "new");
-                t.done();
-            } else {
-                t.done();
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothLEManufacturerData_data_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEManufacturerData_data_attribute\r
+//==== LABEL Check if BluetoothLEManufacturerData::data attribute exists, has type string and can be modified\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEManufacturerData:data A\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA AE AT ASG\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+        manufacturerData, device = null;\r
+\r
+t.step(function () {\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            device = bledevice;\r
+            adapter.stopScan();\r
+            manufacturerData = device.manufacturerData;\r
+            if (manufacturerData != null) {\r
+                check_attribute(manufacturerData, "data", manufacturerData.data, "string", manufacturerData.data + "new");\r
+                t.done();\r
+            } else {\r
+                t.done();\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 5bd2ac603c1f05c6f82e9f3351bff1c5c7d4b356..535c8b9c7f3cd33871af93e855c5db8b5e650e3d 100755 (executable)
@@ -1,72 +1,72 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothLEManufacturerData_extend</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEManufacturerData_extend
-//==== LABEL Check if BluetoothLEManufacturerData is extendable
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEManufacturerData:BluetoothLEManufacturerData U
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA OBX
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
-        manufacturerData, device = null;
-
-t.step(function () {
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            device = bledevice;
-            adapter.stopScan();
-            manufacturerData = device.manufacturerData;
-            if (manufacturerData != null) {
-                check_extensibility(manufacturerData);
-                t.done();
-            } else {
-                t.done();
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothLEManufacturerData_extend</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEManufacturerData_extend\r
+//==== LABEL Check if BluetoothLEManufacturerData is extendable\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEManufacturerData:BluetoothLEManufacturerData U\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA OBX\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+        manufacturerData, device = null;\r
+\r
+t.step(function () {\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            device = bledevice;\r
+            adapter.stopScan();\r
+            manufacturerData = device.manufacturerData;\r
+            if (manufacturerData != null) {\r
+                check_extensibility(manufacturerData);\r
+                t.done();\r
+            } else {\r
+                t.done();\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index d7f5f343fb31388e0c9ead9cd7494d5d5daa8430..3e662a86673979568cf5fba677aeb987577ec516 100755 (executable)
@@ -1,72 +1,72 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothLEManufacturerData_id_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEManufacturerData_id_attribute
-//==== LABEL Check if BluetoothLEManufacturerData::id attribute exists, has type string and can be modified
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEManufacturerData:id A
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA AE AT ASG
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
-        manufacturerData, device = null;
-
-t.step(function () {
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            device = bledevice;
-            adapter.stopScan();
-            manufacturerData = device.manufacturerData;
-            if (manufacturerData != null) {
-                check_attribute(manufacturerData, "id", manufacturerData.id, "string", manufacturerData.id + "new");
-                t.done();
-             } else {
-                t.done();
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothLEManufacturerData_id_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEManufacturerData_id_attribute\r
+//==== LABEL Check if BluetoothLEManufacturerData::id attribute exists, has type string and can be modified\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEManufacturerData:id A\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA AE AT ASG\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+        manufacturerData, device = null;\r
+\r
+t.step(function () {\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            device = bledevice;\r
+            adapter.stopScan();\r
+            manufacturerData = device.manufacturerData;\r
+            if (manufacturerData != null) {\r
+                check_attribute(manufacturerData, "id", manufacturerData.id, "string", manufacturerData.id + "new");\r
+                t.done();\r
+             } else {\r
+                t.done();\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 2f6d5edfb092392f6855fc383f1355c380b5b62a..bbc8ba692e5c01af9c6eabb4b484e08c76126859 100755 (executable)
@@ -1,43 +1,47 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEScanCallback_notexist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEScanCallback_notexist
-//==== LABEL Check if interface BluetoothLEScanCallback exists,it should not
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEScanCallback:BluetoothLEScanCallback U
-//==== SPEC_URL TBD
-//==== PRIORITY P3
-//==== TEST_CRITERIA CBNIO
-
-test(function () {
-    check_no_interface_object("BluetoothLEScanCallback");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEScanCallback_notexist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEScanCallback_notexist\r
+//==== LABEL Check if interface BluetoothLEScanCallback exists,it should not\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEScanCallback:BluetoothLEScanCallback U\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P3\r
+//==== TEST_CRITERIA CBNIO\r
+\r
+test(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        check_no_interface_object("BluetoothLEScanCallback");\r
+\r
+    }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 7f6c79bf0a02a3c3e0b5df67b65373eba9bf821d..7fd3db7aaccd75b2a5435ddd8e6dd54b4764c461 100755 (executable)
@@ -1,86 +1,86 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEScanCallback_ondevicefound</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEScanCallback_ondevicefound
-//==== LABEL Check if BluetoothLEScanCallback ondevicefound is called and if its arguments have proper type
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEScanCallback:ondevicefound M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA CBOA CBT
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanRrrorCallback, service,
-    onconnected, onerror, characteristic, descriptor;
-
-t.step(function () {
-    BbLEScanSuccessCallback = {
-        onstarted: t.step_func(function () {
-        }),
-
-        ondevicefound: t.step_func(function (foundDevice) {
-            assert_type(foundDevice, "object", "foundDevice isn't an object");
-            assert_type(foundDevice.address, "string", "address type check");
-            assert_type(foundDevice.name, "string", "name type check");
-            assert_type(foundDevice.txpowerLevel, "long", "txpowerLevel type check");
-            assert_type(foundDevice.appearance, "long", "appearance type check");
-            assert_type(foundDevice.uuids, "array", "uuids type check");
-            assert_type(foundDevice.solicitationuuids, "array", "solicitationuuids type check");
-            assert_type(foundDevice.serviceData, "object", "serviceData type check");
-            assert_type(foundDevice.manufacturerData, "object", "manufacturerData type check");
-            assert_not_equals(foundDevice.address, null, "address should not be null");
-            assert_not_equals(foundDevice.name, null, "name should not be null");
-            assert_not_equals(foundDevice.txpowerLevel, null, "txpowerLevel should not be null");
-            assert_not_equals(foundDevice.appearance, null, "appearance should not be null");
-            assert_not_equals(foundDevice.uuids[0], null, "uuids[0] should not be null");
-            assert_not_equals(foundDevice.solicitationuuids[0], null, "solicitationuuidss[0] should not be null");
-            assert_not_equals(foundDevice.serviceData, null, "serviceData should not be null");
-            assert_not_equals(foundDevice.manufacturerData, null, "manufacturerData should not be null");
-            adapter.stopScan();
-            t.done();
-        }),
-        
-        onfinished: t.step_func(function (devices) {
-        })
-    };
-
-    BbLEScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.startScan(BbLEScanSuccessCallback, BbLEScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEScanCallback_ondevicefound</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEScanCallback_ondevicefound\r
+//==== LABEL Check if BluetoothLEScanCallback ondevicefound is called and if its arguments have proper type\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEScanCallback:ondevicefound M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA CBOA CBT\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanRrrorCallback, service,\r
+    onconnected, onerror, characteristic, descriptor;\r
+\r
+t.step(function () {\r
+    BbLEScanSuccessCallback = {\r
+        onstarted: t.step_func(function () {\r
+        }),\r
+\r
+        ondevicefound: t.step_func(function (foundDevice) {\r
+            assert_type(foundDevice, "object", "foundDevice isn't an object");\r
+            assert_type(foundDevice.address, "string", "address type check");\r
+            assert_type(foundDevice.name, "string", "name type check");\r
+            assert_type(foundDevice.txpowerLevel, "long", "txpowerLevel type check");\r
+            assert_type(foundDevice.appearance, "long", "appearance type check");\r
+            assert_type(foundDevice.uuids, "array", "uuids type check");\r
+            assert_type(foundDevice.solicitationuuids, "array", "solicitationuuids type check");\r
+            assert_type(foundDevice.serviceData, "object", "serviceData type check");\r
+            assert_type(foundDevice.manufacturerData, "object", "manufacturerData type check");\r
+            assert_not_equals(foundDevice.address, null, "address should not be null");\r
+            assert_not_equals(foundDevice.name, null, "name should not be null");\r
+            assert_not_equals(foundDevice.txpowerLevel, null, "txpowerLevel should not be null");\r
+            assert_not_equals(foundDevice.appearance, null, "appearance should not be null");\r
+            assert_not_equals(foundDevice.uuids[0], null, "uuids[0] should not be null");\r
+            assert_not_equals(foundDevice.solicitationuuids[0], null, "solicitationuuidss[0] should not be null");\r
+            assert_not_equals(foundDevice.serviceData, null, "serviceData should not be null");\r
+            assert_not_equals(foundDevice.manufacturerData, null, "manufacturerData should not be null");\r
+            adapter.stopScan();\r
+            t.done();\r
+        }),\r
+        \r
+        onfinished: t.step_func(function (devices) {\r
+        })\r
+    };\r
+\r
+    BbLEScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.startScan(BbLEScanSuccessCallback, BbLEScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 7d3219141f4d4d896585541ccb8c1cce0476a32a..249665661b55b4b8e31a266e7f2f6d48e8ce6df1 100755 (executable)
@@ -1,85 +1,85 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEScanCallback_onfinished</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEScanCallback_onfinished
-//==== LABEL Check if BluetoothLEScanCallback onfinished is called and if its arguments have proper type
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEScanCallback:onfinished M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA CBOA CBT
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanRrrorCallback, service,
-    onconnected, onerror, characteristic, descriptor;
-
-t.step(function () {
-    BbLEScanSuccessCallback = {
-        onstarted: t.step_func(function () {
-        }),
-
-        ondevicefound: t.step_func(function (foundDevice) {
-        }),
-        
-        onfinished: t.step_func(function (devices) {
-            assert_type(devices[0], "object", "devices[0] isn't an object");
-            assert_type(devices[0].address, "string", "address type check");
-            assert_type(devices[0].name, "string", "name type check");
-            assert_type(devices[0].txpowerLevel, "long", "txpowerLevel type check");
-            assert_type(devices[0].appearance, "long", "appearance type check");
-            assert_type(devices[0].uuids, "array", "uuids type check");
-            assert_type(devices[0].solicitationuuids, "array", "solicitationuuids type check");
-            assert_type(devices[0].serviceData, "object", "serviceData type check");
-            assert_type(devices[0].manufacturerData, "object", "manufacturerData type check");
-            assert_not_equals(devices[0].address, null, "address should not be null");
-            assert_not_equals(devices[0].name, null, "name should not be null");
-            assert_not_equals(devices[0].txpowerLevel, null, "txpowerLevel should not be null");
-            assert_not_equals(devices[0].appearance, null, "appearance should not be null");
-            assert_not_equals(devices[0].uuids[0], null, "uuids[0] should not be null");
-            assert_not_equals(devices[0].solicitationuuids[0], null, "solicitationuuidss[0] should not be null");
-            assert_not_equals(devices[0].serviceData, null, "serviceData should not be null");
-            assert_not_equals(devices[0].manufacturerData, null, "manufacturerData should not be null");
-            t.done();
-        })
-    };
-
-    BbLEScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.startScan(BbLEScanSuccessCallback, BbLEScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEScanCallback_onfinished</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEScanCallback_onfinished\r
+//==== LABEL Check if BluetoothLEScanCallback onfinished is called and if its arguments have proper type\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEScanCallback:onfinished M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA CBOA CBT\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanRrrorCallback, service,\r
+    onconnected, onerror, characteristic, descriptor;\r
+\r
+t.step(function () {\r
+    BbLEScanSuccessCallback = {\r
+        onstarted: t.step_func(function () {\r
+        }),\r
+\r
+        ondevicefound: t.step_func(function (foundDevice) {\r
+        }),\r
+        \r
+        onfinished: t.step_func(function (devices) {\r
+            assert_type(devices[0], "object", "devices[0] isn't an object");\r
+            assert_type(devices[0].address, "string", "address type check");\r
+            assert_type(devices[0].name, "string", "name type check");\r
+            assert_type(devices[0].txpowerLevel, "long", "txpowerLevel type check");\r
+            assert_type(devices[0].appearance, "long", "appearance type check");\r
+            assert_type(devices[0].uuids, "array", "uuids type check");\r
+            assert_type(devices[0].solicitationuuids, "array", "solicitationuuids type check");\r
+            assert_type(devices[0].serviceData, "object", "serviceData type check");\r
+            assert_type(devices[0].manufacturerData, "object", "manufacturerData type check");\r
+            assert_not_equals(devices[0].address, null, "address should not be null");\r
+            assert_not_equals(devices[0].name, null, "name should not be null");\r
+            assert_not_equals(devices[0].txpowerLevel, null, "txpowerLevel should not be null");\r
+            assert_not_equals(devices[0].appearance, null, "appearance should not be null");\r
+            assert_not_equals(devices[0].uuids[0], null, "uuids[0] should not be null");\r
+            assert_not_equals(devices[0].solicitationuuids[0], null, "solicitationuuidss[0] should not be null");\r
+            assert_not_equals(devices[0].serviceData, null, "serviceData should not be null");\r
+            assert_not_equals(devices[0].manufacturerData, null, "manufacturerData should not be null");\r
+            t.done();\r
+        })\r
+    };\r
+\r
+    BbLEScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.startScan(BbLEScanSuccessCallback, BbLEScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 2036877304fbec81bbe6de6e51c585b027f3bfe6..e45d44642a8f45eafa099b01a06ba261465e12a9 100755 (executable)
@@ -1,67 +1,67 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEScanCallback_onsuccess</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEScanCallback_onsuccess
-//==== LABEL Check if BluetoothLEScanCallback onsuccess is called and if its arguments have proper type
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEScanCallback:onsuccess M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA CBOA CBT
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service,
-    onconnected, onerror, characteristic, descriptor;
-
-t.step(function () {
-    bleScanSuccessCallback = t.step_func(function (foundDevice) {
-        assert_type(foundDevice, "object", "foundDevice isn't an object");
-        assert_type(foundDevice.address, "string", "address type check");
-        assert_type(foundDevice.name, "string", "name type check");
-        assert_not_equals(foundDevice.address, null, "address should not be null");
-        adapter.stopScan();
-        t.done();
-    });
-
-    bleScanErrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEScanCallback_onsuccess</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEScanCallback_onsuccess\r
+//==== LABEL Check if BluetoothLEScanCallback onsuccess is called and if its arguments have proper type\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEScanCallback:onsuccess M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA CBOA CBT\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service,\r
+    onconnected, onerror, characteristic, descriptor;\r
+\r
+t.step(function () {\r
+    bleScanSuccessCallback = t.step_func(function (foundDevice) {\r
+        assert_type(foundDevice, "object", "foundDevice isn't an object");\r
+        assert_type(foundDevice.address, "string", "address type check");\r
+        assert_type(foundDevice.name, "string", "name type check");\r
+        assert_not_equals(foundDevice.address, null, "address should not be null");\r
+        adapter.stopScan();\r
+        t.done();\r
+    });\r
+\r
+    bleScanErrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index a9b146474a0f8b81e2ec59548bea1ffbe35ec8c7..a8172c7ca2f0d748fb6d4a60219238ab48130a0f 100755 (executable)
@@ -1,72 +1,72 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothLEServiceData_data_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEServiceData_data_attribute
-//==== LABEL Check if BluetoothLEServiceData::data attribute exists, has type string and can be modified
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEServiceData:data A
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA AE AT ASG
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
-        serviceData, device = null;
-
-t.step(function () {
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            device = bledevice;
-            adapter.stopScan();
-            serviceData = device.serviceData;
-            if (serviceData != null) {
-                check_attribute(serviceData, "data", serviceData.data, "string", serviceData.data + "new");
-                t.done();
-            } else {
-                t.done();
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothLEServiceData_data_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEServiceData_data_attribute\r
+//==== LABEL Check if BluetoothLEServiceData::data attribute exists, has type string and can be modified\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEServiceData:data A\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA AE AT ASG\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+        serviceData, device = null;\r
+\r
+t.step(function () {\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            device = bledevice;\r
+            adapter.stopScan();\r
+            serviceData = device.serviceData;\r
+            if (serviceData != null) {\r
+                check_attribute(serviceData, "data", serviceData.data, "string", serviceData.data + "new");\r
+                t.done();\r
+            } else {\r
+                t.done();\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 6b5864a3f473f717a363d066dbfad0f310622eba..902d6ac23af65e83a78ca980a835e3d76952ef81 100755 (executable)
@@ -1,72 +1,72 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothLEServiceData_extend</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEServiceData_extend
-//==== LABEL Check if BluetoothLEServiceData is extendable
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEServiceData:BluetoothLEServiceData U
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA OBX
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
-        serviceData, device = null;
-
-t.step(function () {
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            device = bledevice;
-            adapter.stopScan();
-            serviceData = device.serviceData;
-            if (serviceData != null) {
-                check_extensibility(serviceData);
-                t.done();
-            } else {
-                t.done();
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothLEServiceData_extend</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEServiceData_extend\r
+//==== LABEL Check if BluetoothLEServiceData is extendable\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEServiceData:BluetoothLEServiceData U\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA OBX\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+        serviceData, device = null;\r
+\r
+t.step(function () {\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            device = bledevice;\r
+            adapter.stopScan();\r
+            serviceData = device.serviceData;\r
+            if (serviceData != null) {\r
+                check_extensibility(serviceData);\r
+                t.done();\r
+            } else {\r
+                t.done();\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 082430cb251c58fb613bf921b714278db2c9f13f..8feca5ad55f8a6ded8bcd40ab526a4fcb8bbdfb4 100755 (executable)
@@ -1,73 +1,73 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothLEServiceData_uuid_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEServiceData_uuid_attribute
-//==== LABEL Check if BluetoothLEServiceData::uuid attribute exists, has type string, can be modified and is nullable
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEServiceData:uuid A
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA AE AT ASG AN
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
-        serviceData, device = null;
-
-t.step(function () {
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            device = bledevice;
-            adapter.stopScan();
-            serviceData = device.serviceData;
-            if (serviceData != null) {
-                check_attribute(serviceData, "uuid", serviceData.uuid, "string", serviceData.uuid + "new");
-                check_not_nullable(serviceData, "uuid");
-                t.done();
-            } else {
-                t.done();
-            }
-        }
-    });
-
-    bleScanRrrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothLEServiceData_uuid_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEServiceData_uuid_attribute\r
+//==== LABEL Check if BluetoothLEServiceData::uuid attribute exists, has type string, can be modified and is nullable\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEServiceData:uuid A\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA AE AT ASG AN\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+        serviceData, device = null;\r
+\r
+t.step(function () {\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            device = bledevice;\r
+            adapter.stopScan();\r
+            serviceData = device.serviceData;\r
+            if (serviceData != null) {\r
+                check_attribute(serviceData, "uuid", serviceData.uuid, "string", serviceData.uuid + "new");\r
+                check_not_nullable(serviceData, "uuid");\r
+                t.done();\r
+            } else {\r
+                t.done();\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanRrrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 210b5b0ba8646f1a1bd5417abd5ab5fffa7380f1..9dea6a26685b9fc08658648662f880a96205237d 100755 (executable)
@@ -26,7 +26,7 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
+Lei, ZhanX <zhanx.lei@intel.com>
 
 -->
 <html>
@@ -46,9 +46,11 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA OBME
 test(function () {
-    var bt = tizen.bluetooth;
-    check_readonly(tizen, "bluetooth", bt, "object", "Tizen");
-}, document.title);
+      if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+var bt = tizen.bluetooth;
+check_readonly(tizen, "bluetooth", bt, "object", "Tizen");
+      }
+    }, document.title);
 
 </script>
 </body>
index d814ba8e0c60905723a8006cb9b362f20b88b669..74691fbe7f1f53066d6b2531b3ff49c76331e1c0 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Witold Choinkowski <w.choinkowsk@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
 
 -->
 <html>
@@ -37,7 +37,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA NIO
 test(function () {
-    check_no_interface_object("BluetoothManagerObject");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_no_interface_object("BluetoothManagerObject");
+    }
 }, document.title);
 
 </script>
index 215794330b80e00b562e2ce2a17320e5849c954f..8b3d35c527d06c917bdd5650f4f5c5e3f24adf0c 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Feng Zhao <feng.zhao@samsung.com>
+Feng Zhao <feng.zhao@samsung.com>
 
 -->
 <html>
@@ -39,7 +39,9 @@ Authors:
 //==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
 
 test(function () {
-    check_const(tizen.bluetooth, 'BASE_UUID', "00000000-0000-1000-8000-00805F9B34FB", "string", 'SRC-NANJING');
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_const(tizen.bluetooth, 'BASE_UUID', "00000000-0000-1000-8000-00805F9B34FB", "string", 'SRC-NANJING');
+    }
 }, document.title);
 
 </script>
index b778a699a8c9cdcc83b0fae52548e7a842383555..51c654e73fe996b69184bd8f0727f4aea758881c 100755 (executable)
@@ -26,7 +26,7 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
+Lei, ZhanX <zhanx.lei@intel.com>
 
 -->
 <html>
@@ -46,9 +46,11 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA AE AT ARO
 test(function () {
-    var major = tizen.bluetooth.deviceMajor;
-    check_readonly(tizen.bluetooth, "deviceMajor", major, "object", "Tizen");
-}, document.title);
+      if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+var major = tizen.bluetooth.deviceMajor;
+check_readonly(tizen.bluetooth, "deviceMajor", major, "object", "Tizen");
+      }
+    }, document.title);
 
 </script>
 </body>
index 9f56915771d43a5711c7dfa467378da8cda3cb11..a9f086211d8599d1111149bb253b066c68df6b27 100755 (executable)
@@ -26,7 +26,7 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
+Lei, ZhanX <zhanx.lei@intel.com>
 
 -->
 <html>
@@ -46,9 +46,11 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA AE AT ARO
 test(function () {
-    var minor = tizen.bluetooth.deviceMinor;
-    check_readonly(tizen.bluetooth, "deviceMinor", minor, "object", "Tizen");
-}, document.title);
+      if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+var minor = tizen.bluetooth.deviceMinor;
+check_readonly(tizen.bluetooth, "deviceMinor", minor, "object", "Tizen");
+      }
+    }, document.title);
 
 </script>
 </body>
index 0e6212cd3c82231d9a339cb62f5f1abb20f959fd..49fdebe315fd1f7875467dd30532ca686e5053e3 100755 (executable)
@@ -26,7 +26,7 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
+Lei, ZhanX <zhanx.lei@intel.com>
 
 -->
 <html>
@@ -46,9 +46,11 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA AE AT ARO
 test(function () {
-    var devService = tizen.bluetooth.deviceService;
-    check_readonly(tizen.bluetooth, "deviceService", devService, "object", "Tizen");
-}, document.title);
+      if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+var devService = tizen.bluetooth.deviceService;
+check_readonly(tizen.bluetooth, "deviceService", devService, "object", "Tizen");
+      }
+    }, document.title);
 
 </script>
 </body>
index ec54e3f86952cc74cf34c2cfd492f9bcd91b644a..47e6a5177c8fb306599f91c84228e65abb2acc75 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -38,7 +38,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA OBX
 test(function () {
-    check_extensibility(tizen.bluetooth);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_extensibility(tizen.bluetooth);
+    }
 }, document.title);
 
 </script>
index ea1c52daf82b37e86a94b2ae20886c09e3a4a22f..37f0c06d6ea87018d5de71d07d74cec5cde1fb16 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -38,12 +38,14 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA MNA MR
 test(function () {
-    var adapter = tizen.bluetooth.getDefaultAdapter();
-    assert_type(adapter, "object", "adapter test");
-    assert_type(adapter.powered, "boolean", "powered attribute test");
-    assert_type(adapter.visible, "boolean", "visible attribute test");
-    assert_type(adapter.address, "string", "address attribute test");
-    assert_type(adapter.name, "string", "name attribute test");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        var adapter = tizen.bluetooth.getDefaultAdapter();
+        assert_type(adapter, "object", "adapter test");
+        assert_type(adapter.powered, "boolean", "powered attribute test");
+        assert_type(adapter.visible, "boolean", "visible attribute test");
+        assert_type(adapter.address, "string", "address attribute test");
+        assert_type(adapter.name, "string", "name attribute test");
+    }
 }, document.title);
 
 </script>
index 477123fd02b5b2adcafa523940ec140a035c9996..efbd8b3c47fc961c2ab4d4a5a14185d96dc0883a 100755 (executable)
@@ -26,7 +26,7 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
+Lei, ZhanX <zhanx.lei@intel.com>
 
 -->
 <html>
@@ -46,9 +46,11 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA ME
 test(function () {
-    assert_true("getDefaultAdapter" in tizen.bluetooth, "Method getDefaultAdapter does not exist in bluetooth adapter.");
-    check_method_exists(tizen.bluetooth, "getDefaultAdapter");
-}, document.title);
+      if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+assert_true("getDefaultAdapter" in tizen.bluetooth, "Method getDefaultAdapter does not exist in bluetooth adapter.");
+check_method_exists(tizen.bluetooth, "getDefaultAdapter");
+      }
+    }, document.title);
 
 </script>
 </body>
index 090a4bc1f924ce216478a4694ff3a325062cf143..eea6f35cbfe2db96b29caf04dabf7ebd43d5d6a3 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -37,7 +37,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA MNAEX
 test(function () {
-    checkExtraArgument(tizen.bluetooth, "getDefaultAdapter");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        checkExtraArgument(tizen.bluetooth, "getDefaultAdapter");
+    }
 }, document.title);
 
 </script>
index 15ca54a8a21a48aef69f27c6a5ee667aa0a72196..9a28d537d5760c05f7c7f3284a2b498deee9821b 100755 (executable)
@@ -1,45 +1,49 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothManager_getLEAdapter</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothManager_getLEAdapter
-//==== LABEL Proper invocation of getLEAdapter method  without arguments
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothManager:getLEAdapter M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MNA MR
-
-test(function () {
-    var adapter = tizen.bluetooth.getLEAdapter();
-    assert_type(adapter, "object", "adapter test");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothManager_getLEAdapter</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothManager_getLEAdapter\r
+//==== LABEL Proper invocation of getLEAdapter method  without arguments\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothManager:getLEAdapter M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MNA MR\r
+\r
+test(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        var adapter = tizen.bluetooth.getLEAdapter();\r
+        assert_type(adapter, "object", "adapter test");\r
+\r
+    }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index e6c13b89fea607b7f44d224c15ee337685e65758..26d204270ea7140c27a7c2f12fe4c2098964642f 100755 (executable)
@@ -1,43 +1,47 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothManager_getLEAdapter_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothManager_getLEAdapter_exist
-//==== LABEL Check if getLEAdapter method exists
-//==== PRIORITY P0
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothManager:getLEAdapter M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA ME
-
-test(function () {
-    check_method_exists(tizen.bluetooth, "getLEAdapter");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothManager_getLEAdapter_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothManager_getLEAdapter_exist\r
+//==== LABEL Check if getLEAdapter method exists\r
+//==== PRIORITY P0\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothManager:getLEAdapter M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA ME\r
+\r
+test(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        check_method_exists(tizen.bluetooth, "getLEAdapter");\r
+\r
+    }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 821488e7b23768a94e087b7d457813553c4976dd..7095cef2c95a3aa7e333706fdd9078bfaae3c530 100755 (executable)
@@ -1,43 +1,47 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothManager_getLEAdapter_extra_argument</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothManager_getLEAdapter_extra_argument
-//==== LABEL Check if method getLEAdapter of BluetoothManager accepts extra argument
-//==== PRIORITY P3
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothManager:getLEAdapter M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MNAEX
-
-test(function () {
-    checkExtraArgument(tizen.bluetooth, "getLEAdapter");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothManager_getLEAdapter_extra_argument</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothManager_getLEAdapter_extra_argument\r
+//==== LABEL Check if method getLEAdapter of BluetoothManager accepts extra argument\r
+//==== PRIORITY P3\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothManager:getLEAdapter M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MNAEX\r
+\r
+test(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        checkExtraArgument(tizen.bluetooth, "getLEAdapter");\r
+\r
+    }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 39a2a1186c6a1e03a9811624cdfd781f4920baeb..53e544709a4f155f1ae584c5fb967faacd6b5ae2 100755 (executable)
@@ -26,7 +26,7 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
+Lei, ZhanX <zhanx.lei@intel.com>
 
 -->
 <html>
@@ -46,10 +46,12 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA OBME
 test(function () {
-    var bt = tizen.bluetooth;
-    assert_true("bluetooth" in tizen, "No bluetooth in tizen");
-    check_readonly(tizen, "bluetooth", bt, "object", "Tizen");
-}, document.title);
+      if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+var bt = tizen.bluetooth;
+assert_true("bluetooth" in tizen, "No bluetooth in tizen");
+check_readonly(tizen, "bluetooth", bt, "object", "Tizen");
+      }
+    }, document.title);
 
 </script>
 </body>
index bd6d6591d41e7ffe8ec22ff889d9a5e5e9d79457..642e5dacd33fa697cedf29876e4d51a826787837 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -38,7 +38,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA NIO
 test(function () {
-    check_no_interface_object("BluetoothManager");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_no_interface_object("BluetoothManager");
+    }
 }, document.title);
 
 </script>
index 4caa39d26e20d1e4377121f643e91f0cc8cc2767..bb695dc73366b8f2ecb815f00c5347427b9232ad 100755 (executable)
@@ -35,29 +35,31 @@ Authors:
 //==== TEST_CRITERIA MR
 
 test(function () {
-    var dataInt8Array = new Int8Array([-21, 31]);
-    var dataUint8Array = new Uint8Array([240, 129]);
-    var dataString = "0x18b1";
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        var dataInt8Array = new Int8Array([-21, 31]);
+        var dataUint8Array = new Uint8Array([240, 129]);
+        var dataString = "0x18b1";
 
-    var ary = tizen.bluetooth.toByteArray(dataInt8Array);
-    var ary2 = tizen.bluetooth.toByteArray(dataUint8Array);
-    var ary3 = tizen.bluetooth.toByteArray(dataString);
+        var ary = tizen.bluetooth.toByteArray(dataInt8Array);
+        var ary2 = tizen.bluetooth.toByteArray(dataUint8Array);
+        var ary3 = tizen.bluetooth.toByteArray(dataString);
 
-    assert_type(ary, "array", "dataInt8Array toByteArray type test");
-    assert_array_equals(ary, Uint8Array.from(dataInt8Array), "toByteArray  [dataInt8Array] output equals test");
-    assert_type(ary2, "array", "dataUint8Array toByteArray type test");
-    assert_array_equals(ary2, Uint8Array.from(dataUint8Array), "toByteArray [dataUint8Array] output equals test");
-    assert_type(ary3, "array", "dataString toByteArray type test");
+        assert_type(ary, "array", "dataInt8Array toByteArray type test");
+        assert_array_equals(ary, Uint8Array.from(dataInt8Array), "toByteArray  [dataInt8Array] output equals test");
+        assert_type(ary2, "array", "dataUint8Array toByteArray type test");
+        assert_array_equals(ary2, Uint8Array.from(dataUint8Array), "toByteArray [dataUint8Array] output equals test");
+        assert_type(ary3, "array", "dataString toByteArray type test");
 
-    const conver = str => {
-        var res = [];
-        for(var i=2; i<str.length; i+=2) {
-            res.push(parseInt(str.substr(i, 2), 16));
+        const conver = str => {
+            var res = [];
+            for (var i = 2; i < str.length; i += 2) {
+                res.push(parseInt(str.substr(i, 2), 16));
+            }
+            return res
         }
-        return res
+        var uint3 = new Uint8Array(conver("0x18b1")); // "0x18b1"
+        assert_array_equals(ary3, Uint8Array.from(uint3), "toByteArray [dataString] output equals test");
     }
-    var uint3 = new Uint8Array(conver("0x18b1")); // "0x18b1"
-    assert_array_equals(ary3, Uint8Array.from(uint3), "toByteArray [dataString] output equals test");
 }, document.title);
 
 </script>
index 7da1d258d0e182cb5b2a314364b80230b7195227..3f7d58976ed523b956450a44044ca21e9c0a7a8a 100755 (executable)
@@ -35,7 +35,9 @@ Authors:
 //==== TEST_CRITERIA ME
 
 test(function () {
-    check_method_exists(tizen.bluetooth, "toByteArray");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_method_exists(tizen.bluetooth, "toByteArray");
+    }
 }, document.title);
 
 </script>
index b5f85fa2d71db14fb1920ebbe2c9d89ecfd69147..6bd3484dcbb389c04d4097003a8db1ab03bfa364 100755 (executable)
@@ -35,10 +35,12 @@ Authors:
 //==== TEST_CRITERIA MMA
 
 test(function () {
-    assert_throws ({name:"TypeMismatchError"},
-        function () {
-            tizen.bluetooth.toByteArray();
-        }, "Method with missing non-optional argument.");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        assert_throws({ name: "TypeMismatchError" },
+            function () {
+                tizen.bluetooth.toByteArray();
+            }, "Method with missing non-optional argument.");
+    }
 }, document.title);
 
 </script>
index 4727642facfeee54bac311ca970fe4d8042481ce..3f011f13d00c02bb9581b4b9139e4e8fcc0a035b 100755 (executable)
@@ -35,11 +35,13 @@ Authors:
 //==== TEST_CRITERIA MR
 
 test(function () {
-    var dataInt8Array = new Int8Array([-21, 31]);
-    var str = tizen.bluetooth.toDOMString(dataInt8Array);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        var dataInt8Array = new Int8Array([-21, 31]);
+        var str = tizen.bluetooth.toDOMString(dataInt8Array);
 
-    assert_type(str, "string", "toDOMString test");
-    assert_equals(str, "0xeb1f", "toDOMString output equals test");
+        assert_type(str, "string", "toDOMString test");
+        assert_equals(str, "0xeb1f", "toDOMString output equals test");
+    }
 }, document.title);
 
 </script>
index 0bfecb12f7d2346b5715d498712b947bb83dc719..21c654c5240bba06ff4b21e4f150a0fd7e6696c3 100755 (executable)
@@ -35,7 +35,9 @@ Authors:
 //==== TEST_CRITERIA ME
 
 test(function () {
-    check_method_exists(tizen.bluetooth, "toDOMString");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_method_exists(tizen.bluetooth, "toDOMString");
+    }
 }, document.title);
 
 </script>
index 0b921a00c6a6a5461f83b12c2f288f182c5e8078..d9be0d010f8c8d9db61993d69db03a1dad6ccd27 100755 (executable)
@@ -35,10 +35,12 @@ Authors:
 //==== TEST_CRITERIA MMA
 
 test(function () {
-    assert_throws ({name:"TypeMismatchError"},
-        function () {
-            tizen.bluetooth.toDOMString();
-        }, "Method with missing non-optional argument.");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        assert_throws({ name: "TypeMismatchError" },
+            function () {
+                tizen.bluetooth.toDOMString();
+            }, "Method with missing non-optional argument.");
+    }
 }, document.title);
 
 </script>
index 7e3e51fe0f1654c8e5987b7b7bfa56b42f913c8c..d009ce1647c3b051a675c37babc752680a53f600 100755 (executable)
@@ -35,32 +35,34 @@ Authors:
 //==== TEST_CRITERIA MR
 
 test(function () {
-    var dataInt8Array = new Int8Array([-21, 31]);
-    var dataUint8Array = new Uint8Array([240, 129]);
-    var dataString = "0x18b1";
-    var byte = tizen.bluetooth.toUint8Array(dataInt8Array);
-    var byte2 = tizen.bluetooth.toUint8Array(dataUint8Array);
-    var byte3 = tizen.bluetooth.toUint8Array(dataString);
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        var dataInt8Array = new Int8Array([-21, 31]);
+        var dataUint8Array = new Uint8Array([240, 129]);
+        var dataString = "0x18b1";
+        var byte = tizen.bluetooth.toUint8Array(dataInt8Array);
+        var byte2 = tizen.bluetooth.toUint8Array(dataUint8Array);
+        var byte3 = tizen.bluetooth.toUint8Array(dataString);
 
-    assert_type(byte, "object", "toUint8Array test");
-    assert_type(byte2, "object", "toUint8Array test");
-    assert_type(byte3, "object", "toUint8Array test");
+        assert_type(byte, "object", "toUint8Array test");
+        assert_type(byte2, "object", "toUint8Array test");
+        assert_type(byte3, "object", "toUint8Array test");
 
-    var uint1 = new Uint8Array([-21, 31]);
-    var uint2 = new Uint8Array([240, 129]);
-    const conver = str => {
-        var res = [];
-        for(var i=2; i<str.length; i+=2) {
-            res.push(parseInt(str.substr(i, 2), 16));
+        var uint1 = new Uint8Array([-21, 31]);
+        var uint2 = new Uint8Array([240, 129]);
+        const conver = str => {
+            var res = [];
+            for (var i = 2; i < str.length; i += 2) {
+                res.push(parseInt(str.substr(i, 2), 16));
+            }
+            return res
         }
-        return res
-    }
-    var uint3 = new Uint8Array(conver("0x18b1"));
+        var uint3 = new Uint8Array(conver("0x18b1"));
 
-    assert_array_equals(byte, uint1, "toUint8Array dataInt8Array output equals test");
-    assert_array_equals(byte2, uint2, "toUint8Array dataUint8Array output equals test");
-    assert_array_equals(byte3, uint3, "toUint8Array dataString output equals test");
+        assert_array_equals(byte, uint1, "toUint8Array dataInt8Array output equals test");
+        assert_array_equals(byte2, uint2, "toUint8Array dataUint8Array output equals test");
+        assert_array_equals(byte3, uint3, "toUint8Array dataString output equals test");
 
+    }
 }, document.title);
 
 </script>
index cb2f1d872230b6122c6dfc893711a1746af4fa64..e43ee0525544f514df5dc577a8ca81107104e50f 100755 (executable)
@@ -35,7 +35,9 @@ Authors:
 //==== TEST_CRITERIA ME
 
 test(function () {
-    check_method_exists(tizen.bluetooth, "toUint8Array");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_method_exists(tizen.bluetooth, "toUint8Array");
+    }
 }, document.title);
 
 </script>
index c693db458564729f466dbf5532afd514f821a3e6..67be10483b1efde4a2e2ed0a2337997d13c6ed88 100755 (executable)
@@ -35,10 +35,12 @@ Authors:
 //==== TEST_CRITERIA MMA
 
 test(function () {
-    assert_throws ({name:"TypeMismatchError"},
-        function () {
-            tizen.bluetooth.toUint8Array();
-        }, "Method with missing non-optional argument.");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        assert_throws({ name: "TypeMismatchError" },
+            function () {
+                tizen.bluetooth.toUint8Array();
+            }, "Method with missing non-optional argument.");
+    }
 }, document.title);
 
 </script>
index e907acf6054884987f60a29b10f3a796c3304014..f6b1f37cb59f3b6b5c3874772a090134a3e16a1e 100755 (executable)
@@ -35,10 +35,12 @@ Authors:
 //==== TEST_CRITERIA MR
 
 test(function () {
-    var uuid = tizen.bluetooth.uuidTo128bit("1234");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        var uuid = tizen.bluetooth.uuidTo128bit("1234");
 
-    assert_type(uuid, "string", "uuidTo128bit test");
-    assert_equals(uuid, "00001234-0000-1000-8000-00805f9b34fb", "uuidTo128bit output equals test");
+        assert_type(uuid, "string", "uuidTo128bit test");
+        assert_equals(uuid, "00001234-0000-1000-8000-00805f9b34fb", "uuidTo128bit output equals test");
+    }
 }, document.title);
 
 </script>
index 6d670b21a7cba07f98ce9a0cfff9b1269d898127..f53a539313f0d7a5a0963506bb360f877f9a783e 100755 (executable)
@@ -35,7 +35,9 @@ Authors:
 //==== TEST_CRITERIA ME
 
 test(function () {
-    check_method_exists(tizen.bluetooth, "uuidTo128bit");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_method_exists(tizen.bluetooth, "uuidTo128bit");
+    }
 }, document.title);
 
 </script>
index 230a4cb92405568b61cb9986077e78974fc315de..9b7a2540c551d6685550cbf73070f698b4b1dade 100755 (executable)
@@ -35,10 +35,12 @@ Authors:
 //==== TEST_CRITERIA MMA
 
 test(function () {
-    assert_throws ({name:"InvalidValuesError"},
-        function () {
-            tizen.bluetooth.uuidTo128bit(123);
-        }, "Method with missing non-optional argument.");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        assert_throws({ name: "InvalidValuesError" },
+            function () {
+                tizen.bluetooth.uuidTo128bit(123);
+            }, "Method with missing non-optional argument.");
+    }
 }, document.title);
 
 </script>
index b083d7b263b5d97f6ddf1bd2499bbe06dbb56822..5bbd7332867a36403efe2db2aa1576a7589f851f 100755 (executable)
@@ -35,10 +35,12 @@ Authors:
 //==== TEST_CRITERIA MR
 
 test(function () {
-    var uuid = tizen.bluetooth.uuidToShortestPossible("1234");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        var uuid = tizen.bluetooth.uuidToShortestPossible("1234");
 
-    assert_type(uuid, "string", "uuid test");
-    assert_equals(uuid, "1234", "uuidToShortestPossible output equals test");
+        assert_type(uuid, "string", "uuid test");
+        assert_equals(uuid, "1234", "uuidToShortestPossible output equals test");
+    }
 }, document.title);
 
 </script>
index a5ea4eb63762cf6a4e371608af869ad9a56fcdd3..ca8042676f90a9651c04bb794bb1b4a200565f0c 100755 (executable)
@@ -35,7 +35,9 @@ Authors:
 //==== TEST_CRITERIA ME
 
 test(function () {
-    check_method_exists(tizen.bluetooth, "uuidToShortestPossible");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_method_exists(tizen.bluetooth, "uuidToShortestPossible");
+    }
 }, document.title);
 
 </script>
index 5bd0c6cf975c1e548c59b03fe2636b5cc84d0ec6..ba36af475ce8d0db20aec6dae31a2aa3675a1580 100755 (executable)
@@ -35,10 +35,12 @@ Authors:
 //==== TEST_CRITERIA MMA
 
 test(function () {
-    assert_throws ({name:"InvalidValuesError"},
-        function () {
-            tizen.bluetooth.uuidToShortestPossible(123);
-        }, "Method with missing non-optional argument.");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        assert_throws({ name: "InvalidValuesError" },
+            function () {
+                tizen.bluetooth.uuidToShortestPossible(123);
+            }, "Method with missing non-optional argument.");
+    }
 }, document.title);
 
 </script>
index 0e9c27f5fd9355e51b1dc4e9cf1176975059419b..5534fcd9a90069d15690f0340d62eec0cae15b1f 100755 (executable)
@@ -35,12 +35,14 @@ Authors:
 //==== TEST_CRITERIA MR
 
 test(function () {
-    var equal = tizen.bluetooth.uuidsEqual("abcdef01-2345-6789-abcd-ef0123456789", "abcdef01");
-    var equal2 = tizen.bluetooth.uuidsEqual("ab5690ef", "ab5690ef-0000-1000-8000-00805F9B34FB");
-
-    assert_type(equal, "boolean", "uuidsEqual test");
-    assert_equals(equal, false, "uuidsEqual output false test");
-    assert_equals(equal2, true, "uuidsEqual output true test");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        var equal = tizen.bluetooth.uuidsEqual("abcdef01-2345-6789-abcd-ef0123456789", "abcdef01");
+        var equal2 = tizen.bluetooth.uuidsEqual("ab5690ef", "ab5690ef-0000-1000-8000-00805F9B34FB");
+
+        assert_type(equal, "boolean", "uuidsEqual test");
+        assert_equals(equal, false, "uuidsEqual output false test");
+        assert_equals(equal2, true, "uuidsEqual output true test");
+    }
 }, document.title);
 
 </script>
index 0ad2bfca30150a9c8d8f88d5416fbd1369d0f762..c0de9bc604de0ff45a3550fd6d1ab3dc23c90440 100755 (executable)
@@ -35,7 +35,9 @@ Authors:
 //==== TEST_CRITERIA ME
 
 test(function () {
-    check_method_exists(tizen.bluetooth, "uuidsEqual");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_method_exists(tizen.bluetooth, "uuidsEqual");
+    }
 }, document.title);
 
 </script>
index 98b6f2d945bd133788bbfbc10a44f963ba15abd3..7c320736653279c130e9e9260e5c305f56164834 100755 (executable)
@@ -35,10 +35,12 @@ Authors:
 //==== TEST_CRITERIA MMA
 
 test(function () {
-    assert_throws ({name:"InvalidValuesError"},
-        function () {
-            tizen.bluetooth.uuidsEqual();
-        }, "Method with missing non-optional argument.");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        assert_throws({ name: "InvalidValuesError" },
+            function () {
+                tizen.bluetooth.uuidsEqual();
+            }, "Method with missing non-optional argument.");
+    }
 }, document.title);
 
 </script>
index 43525e8cb4befa90e073863d647b5a17cf0ae83f..8e4ddb36b434da54005034a38f6432a06ef62779 100755 (executable)
@@ -1,69 +1,73 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothServiceHandler_extend</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothServiceHandler_extend
-//==== LABEL Test whether the object can have new properties added for BluetoothServiceHandler
-//==== PRIORITY P3
-//==== ONLOAD_DELAY 180
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:BluetoothServiceHandler U
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA OBX
-setup({timeout: 180000, explicit_done:true});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), powerOnSuccess,
-    registerRFCOMMServiceByUUIDError, registerRFCOMMServiceByUUIDSuccess;
-t.step(function () {
-
-    registerRFCOMMServiceByUUIDSuccess = t.step_func(function (handler) {
-        setBluetoothHandlerCleanup(handler);
-        check_extensibility(handler);
-
-        t.done();
-    });
-
-    registerRFCOMMServiceByUUIDError = t.step_func(function (e) {
-        assert_unreached("registerRFCOMMServiceByUUIDError exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothServiceHandler_extend</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothServiceHandler_extend\r
+//==== LABEL Test whether the object can have new properties added for BluetoothServiceHandler\r
+//==== PRIORITY P3\r
+//==== ONLOAD_DELAY 180\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:BluetoothServiceHandler U\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA OBX\r
+setup({timeout: 180000, explicit_done:true});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), powerOnSuccess,\r
+    registerRFCOMMServiceByUUIDError, registerRFCOMMServiceByUUIDSuccess;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      registerRFCOMMServiceByUUIDSuccess = t.step_func(function (handler) {\r
+            setBluetoothHandlerCleanup(handler);\r
+            check_extensibility(handler);\r
+\r
+            t.done();\r
+        });\r
+\r
+        registerRFCOMMServiceByUUIDError = t.step_func(function (e) {\r
+            assert_unreached("registerRFCOMMServiceByUUIDError exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 60ce8f4f68a537effe03dc46d8b1c51bc9a2c9f0..75078d69158ba3234a2ef8fa4a193e7733f014a6 100755 (executable)
@@ -1,78 +1,82 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
-  may be used to endorse or promote products derived from this work without
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-
--->
-<html>
-<head>
-<title>BluetoothServiceHandler_isConnected_attribute</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothServiceHandler_isConnected_attribute
-//==== LABEL Check attribute isConnected in BluetoothServiceHandler
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:isConnected A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA AE AT ARO
-setup({timeout: 180000, explicit_done:true});
-
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, chatServiceSuccessCallback,
-    chatServiceErrorCallback, isConnected;
-
-t.step(function () {
-
-    chatServiceSuccessCallback = t.step_func(function (handler) {
-        setBluetoothHandlerCleanup(handler);
-        isConnected = handler.isConnected;
-        check_readonly(handler, "isConnected", isConnected, "boolean", !(isConnected));
-
-        t.done();
-    });
-
-    chatServiceErrorCallback = t.step_func(function (e) {
-        assert_unreached("chatServiceErrorCallback exception " + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCallback, chatServiceErrorCallback);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+  this list of conditions and the following disclaimer in the documentation\r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+  may be used to endorse or promote products derived from this work without\r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothServiceHandler_isConnected_attribute</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothServiceHandler_isConnected_attribute\r
+//==== LABEL Check attribute isConnected in BluetoothServiceHandler\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:isConnected A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA AE AT ARO\r
+setup({timeout: 180000, explicit_done:true});\r
+\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, chatServiceSuccessCallback,\r
+    chatServiceErrorCallback, isConnected;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      chatServiceSuccessCallback = t.step_func(function (handler) {\r
+            setBluetoothHandlerCleanup(handler);\r
+            isConnected = handler.isConnected;\r
+            check_readonly(handler, "isConnected", isConnected, "boolean", !(isConnected));\r
+\r
+            t.done();\r
+        });\r
+\r
+        chatServiceErrorCallback = t.step_func(function (e) {\r
+            assert_unreached("chatServiceErrorCallback exception " + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCallback, chatServiceErrorCallback);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 31a66729cad7529905fc630d44a0a8aa15163c72..43fcaa16c63b43dbdd2c3e4aacb1f75608446382 100755 (executable)
@@ -1,78 +1,82 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
-  may be used to endorse or promote products derived from this work without
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-
--->
-<html>
-<head>
-<title>BluetoothServiceHandler_name_attribute</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothServiceHandler_name_attribute
-//==== LABEL Check attribute name in BluetoothServiceHandler
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:name A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA AE AT ARO
-setup({timeout: 180000, explicit_done:true});
-
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, chatServiceSuccessCallback,
-    chatServiceErrorCallback, handlerName;
-
-t.step(function () {
-
-    chatServiceSuccessCallback = t.step_func(function (handler) {
-        setBluetoothHandlerCleanup(handler);
-        handlerName = handler.name;
-        check_readonly(handler, "name", handlerName, "string", name+"1234");
-
-        t.done();
-    });
-
-    chatServiceErrorCallback = t.step_func(function (e) {
-        assert_unreached("chatServiceErrorCallback exception " + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCallback, chatServiceErrorCallback);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+  this list of conditions and the following disclaimer in the documentation\r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+  may be used to endorse or promote products derived from this work without\r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothServiceHandler_name_attribute</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothServiceHandler_name_attribute\r
+//==== LABEL Check attribute name in BluetoothServiceHandler\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:name A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA AE AT ARO\r
+setup({timeout: 180000, explicit_done:true});\r
+\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, chatServiceSuccessCallback,\r
+    chatServiceErrorCallback, handlerName;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      chatServiceSuccessCallback = t.step_func(function (handler) {\r
+            setBluetoothHandlerCleanup(handler);\r
+            handlerName = handler.name;\r
+            check_readonly(handler, "name", handlerName, "string", name + "1234");\r
+\r
+            t.done();\r
+        });\r
+\r
+        chatServiceErrorCallback = t.step_func(function (e) {\r
+            assert_unreached("chatServiceErrorCallback exception " + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCallback, chatServiceErrorCallback);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 5a987077f0ad10b6c1ff211b8978dbe4085f5da6..274fc7704d7e562176b55e44c814d8d2144fac93 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -38,7 +38,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA NIO
 test(function () {
-    check_no_interface_object("BluetoothServiceHandler");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_no_interface_object("BluetoothServiceHandler");
+    }
 }, document.title);
 
 </script>
index bae85d044e77920ae8a07bbbac0a37cc5580e672..0075f5db517e15a63280ded0eb41a30ff73dbe10 100755 (executable)
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Witold Choinkowski <w.choinkowsk@samsung.com>
-        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
--->
-<html>
-
-<head>
-<title>BluetoothServiceHandler_onconnect_attribute</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<ul id="testdetails" style="display:none;">
-    <li>1. Push "Search" button on the remote device.</li>
-    <li>2. Select this device among found devices after discovering is finished.</li>
-    <li>3. Push "Connect to service" button on the remote device.</li>
-</ul>
-
-<script>
-
-//==== TEST: BluetoothServiceHandler_onconnect_attribute
-//==== LABEL Check whether a service record is registered in the device service record database properly (part 2)
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== STEP Push [Search] button on the remote device after description is appeared..
-//==== EXPECT The test device is found by the remote device.
-//==== STEP Push [Connect to service] button on the remote device after selecting test device among found devices.
-//==== EXPECT onconnect is called.
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:onconnect A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. tct-bt-helper MUST be launched on the remote device and turn on.
-//==== TEST_CRITERIA ASG AE AT ADV
-setup({timeout:180000, explicit_done:true});
-var t = async_test(document.title, {timeout: 180000}), adapter, onError, testMessage, registerSuccessCallback,
-    sendMsg, serviceHandler, data, recvmsg, checkmsg, i, expectedMsgFromClient, sendMsgData, msgToClient;
-t.step(function () {
-
-    add_result_callback(function() {
-        clearBonding(REMOTE_DEVICE_ADDRESS);
-    });
-
-    onError = t.step_func(function (e) {
-        assert_unreached("errorCallback arrived:" + e.message);
-    });
-    testMessage = "registerRFCOMMServiceByUUID";
-
-    registerSuccessCallback = t.step_func(function (handler) {
-        setBluetoothHandlerCleanup(handler);
-        sendMsg = "";
-
-        serviceHandler = handler;
-        assert_type(handler.unregister, "function", "unRegister function type check");
-        assert_type(handler.uuid, "string", "uuid attribute type check");
-        assert_type(handler.name, "string", "name attribute type check");
-        assert_type(handler.isConnected, "boolean", "isConnected attribute type check");
-        assert_true(serviceHandler.isConnected === false, "isConnected attribute value check");
-
-        assert_own_property(handler, "onconnect", "BluetoothServiceHandler does not own onconnect property");
-        assert_equals(handler.onconnect, null, "onconnect in BluetoothServiceHandler has wrong value");
-        serviceHandler.onconnect = function (socket) {
-            assert_true(serviceHandler.isConnected === true, "isConnected attribute value check");
-            assert_type(socket.uuid, "string", "socket uuid attribute type check");
-            assert_type(socket.state, "string", "socket state attribute type check");
-            assert_type(socket.peer, "object", "socket peer attribute type check");
-            assert_type(socket.writeData, "function", "socket writeData function type check");
-            assert_type(socket.readData, "function", "socket readData function type check");
-            assert_type(socket.close, "function", "socket close function type check");
-
-            socket.onmessage = function () {
-                data = socket.readData();
-                recvmsg = "";
-
-                for (i = 0; i < data.length; i++) {
-                    recvmsg += String.fromCharCode(data[i]);
-                }
-
-                checkmsg = expectedMsgFromClient;
-                assert_equals(recvmsg, checkmsg, "Data is not same");
-                sendMsgData(msgToClient);
-            };
-
-            t.done();
-        };
-        assert_type(handler.onconnect, "function", "onconnect in BluetoothServiceHandler has wrong type after attaching function to it");
-        document.getElementById("testdetails").style["display"] = "";
-    });
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerSuccessCallback, onError);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Witold Choinkowski <w.choinkowsk@samsung.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothServiceHandler_onconnect_attribute</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+\r
+<body>\r
+<div id="log"></div>\r
+<ul id="testdetails" style="display:none;">\r
+    <li>1. Push "Search" button on the remote device.</li>\r
+    <li>2. Select this device among found devices after discovering is finished.</li>\r
+    <li>3. Push "Connect to service" button on the remote device.</li>\r
+</ul>\r
+\r
+<script>\r
+\r
+//==== TEST: BluetoothServiceHandler_onconnect_attribute\r
+//==== LABEL Check whether a service record is registered in the device service record database properly (part 2)\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== STEP Push [Search] button on the remote device after description is appeared..\r
+//==== EXPECT The test device is found by the remote device.\r
+//==== STEP Push [Connect to service] button on the remote device after selecting test device among found devices.\r
+//==== EXPECT onconnect is called.\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:onconnect A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. tct-bt-helper MUST be launched on the remote device and turn on.\r
+//==== TEST_CRITERIA ASG AE AT ADV\r
+setup({timeout:180000, explicit_done:true});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, onError, testMessage, registerSuccessCallback,\r
+    sendMsg, serviceHandler, data, recvmsg, checkmsg, i, expectedMsgFromClient, sendMsgData, msgToClient;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      add_result_callback(function () {\r
+            clearBonding(REMOTE_DEVICE_ADDRESS);\r
+        });\r
+\r
+        onError = t.step_func(function (e) {\r
+            assert_unreached("errorCallback arrived:" + e.message);\r
+        });\r
+        testMessage = "registerRFCOMMServiceByUUID";\r
+\r
+        registerSuccessCallback = t.step_func(function (handler) {\r
+            setBluetoothHandlerCleanup(handler);\r
+            sendMsg = "";\r
+\r
+            serviceHandler = handler;\r
+            assert_type(handler.unregister, "function", "unRegister function type check");\r
+            assert_type(handler.uuid, "string", "uuid attribute type check");\r
+            assert_type(handler.name, "string", "name attribute type check");\r
+            assert_type(handler.isConnected, "boolean", "isConnected attribute type check");\r
+            assert_true(serviceHandler.isConnected === false, "isConnected attribute value check");\r
+\r
+            assert_own_property(handler, "onconnect", "BluetoothServiceHandler does not own onconnect property");\r
+            assert_equals(handler.onconnect, null, "onconnect in BluetoothServiceHandler has wrong value");\r
+            serviceHandler.onconnect = function (socket) {\r
+                assert_true(serviceHandler.isConnected === true, "isConnected attribute value check");\r
+                assert_type(socket.uuid, "string", "socket uuid attribute type check");\r
+                assert_type(socket.state, "string", "socket state attribute type check");\r
+                assert_type(socket.peer, "object", "socket peer attribute type check");\r
+                assert_type(socket.writeData, "function", "socket writeData function type check");\r
+                assert_type(socket.readData, "function", "socket readData function type check");\r
+                assert_type(socket.close, "function", "socket close function type check");\r
+\r
+                socket.onmessage = function () {\r
+                    data = socket.readData();\r
+                    recvmsg = "";\r
+\r
+                    for (i = 0; i < data.length; i++) {\r
+                        recvmsg += String.fromCharCode(data[i]);\r
+                    }\r
+\r
+                    checkmsg = expectedMsgFromClient;\r
+                    assert_equals(recvmsg, checkmsg, "Data is not same");\r
+                    sendMsgData(msgToClient);\r
+                };\r
+\r
+                t.done();\r
+            };\r
+            assert_type(handler.onconnect, "function", "onconnect in BluetoothServiceHandler has wrong type after attaching function to it");\r
+            document.getElementById("testdetails").style["display"] = "";\r
+        });\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerSuccessCallback, onError);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 1cd6ab4e61949a92938eadb4eaabe5a8997279ec..bcc6b3da5bc7ccd4866b55f76176feb7b5fa74b3 100755 (executable)
@@ -1,68 +1,72 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head></title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothServiceHandler_unregister
-//==== LABEL Check with non-optional arguments unregister()
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MMINA MR
-setup({timeout: 180000, explicit_done:true});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), registerRFCOMMServiceByUUIDSuccess,
-    registerRFCOMMServiceByUUIDError, powerOnSuccess, retValue = null;
-t.step(function () {
-
-    registerRFCOMMServiceByUUIDSuccess = t.step_func(function (recordHandler) {
-        setBluetoothHandlerCleanup(recordHandler);
-        retValue = recordHandler.unregister();
-
-        assert_equals(retValue, undefined, "unregister returns wrong value");
-        t.done();
-    });
-
-    registerRFCOMMServiceByUUIDError = t.step_func(function (e) {
-        assert_unreached("registerRFCOMMServiceByUUIDError exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head></title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothServiceHandler_unregister\r
+//==== LABEL Check with non-optional arguments unregister()\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MMINA MR\r
+setup({timeout: 180000, explicit_done:true});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), registerRFCOMMServiceByUUIDSuccess,\r
+    registerRFCOMMServiceByUUIDError, powerOnSuccess, retValue = null;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      registerRFCOMMServiceByUUIDSuccess = t.step_func(function (recordHandler) {\r
+            setBluetoothHandlerCleanup(recordHandler);\r
+            retValue = recordHandler.unregister();\r
+\r
+            assert_equals(retValue, undefined, "unregister returns wrong value");\r
+            t.done();\r
+        });\r
+\r
+        registerRFCOMMServiceByUUIDError = t.step_func(function (e) {\r
+            assert_unreached("registerRFCOMMServiceByUUIDError exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index bf50b63c875a8a47d4483b849d01e29a6761d8d9..c5d9752ddd4df2ed0e37a8a3f109c421700fd067 100755 (executable)
@@ -1,82 +1,88 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothServiceHandler_unregister_errorCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothServiceHandler_unregister_errorCallback_TypeMismatch
-//==== LABEL Check whether unregister() method of the BluetoothServiceHandler with invalid errorCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-setup({timeout: 180000, explicit_done:true});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
-    exceptionName, errorCallback, i,
-    conversionTable, successCallback, registerSuccessCB, registerErrorCB, powerOnSuccess;
-t.step(function () {
-    conversionTable = getTypeConversionExceptions("functionObject", true);
-
-    successCallback = t.step_func(function () {
-        assert_unreached("Method unregister shouldn't end successfully.");
-    });
-
-    registerSuccessCB = t.step_func(function (handler) {
-        setBluetoothHandlerCleanup(handler);
-        for(i = 0; i < conversionTable.length; i++) {
-            errorCallback = conversionTable[i][0];
-            exceptionName = conversionTable[i][1];
-
-            assert_throws({name: exceptionName},
-                function () {
-                    handler.unregister(successCallback, errorCallback);
-                }, "Given incorrect errorCallback.");
-        }
-
-        t.done();
-    });
-
-    registerErrorCB = t.step_func(function (e) {
-        assert_unreached("registerErrorCB exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerSuccessCB, registerErrorCB);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothServiceHandler_unregister_errorCallback_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothServiceHandler_unregister_errorCallback_TypeMismatch\r
+//==== LABEL Check whether unregister() method of the BluetoothServiceHandler with invalid errorCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+setup({timeout: 180000, explicit_done:true});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+    exceptionName, errorCallback, i,\r
+    conversionTable, successCallback, registerSuccessCB, registerErrorCB, powerOnSuccess;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+        successCallback = t.step_func(function () {\r
+            assert_unreached("Method unregister shouldn't end successfully.");\r
+        });\r
+\r
+        registerSuccessCB = t.step_func(function (handler) {\r
+            setBluetoothHandlerCleanup(handler);\r
+            for (i = 0; i < conversionTable.length; i++) {\r
+                errorCallback = conversionTable[i][0];\r
+                exceptionName = conversionTable[i][1];\r
+\r
+                assert_throws({ name: exceptionName },\r
+                    function () {\r
+                        handler.unregister(successCallback, errorCallback);\r
+                    }, "Given incorrect errorCallback.");\r
+            }\r
+\r
+            t.done();\r
+        });\r
+\r
+        registerErrorCB = t.step_func(function (e) {\r
+            assert_unreached("registerErrorCB exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerSuccessCB, registerErrorCB);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index ff11084319a7db28ed409cafa8dec71c5fd49988..52ad039999025b0d9aa34992e5064b65a9a46c1a 100755 (executable)
@@ -1,81 +1,85 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothServiceHandler_unregister_errorCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothServiceHandler_unregister_errorCallback_invalid_cb
-//==== LABEL Check unregister() argument errorCallback validation
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-setup({timeout: 180000, explicit_done:true});
-
-var t = async_test(document.title, {timeout: 180000}), adapter, exceptionName = "TypeMismatchError", incorrectCallback,
-    unregisterSuccess, registerSuccessCB, registerErrorCB, powerOnSuccess;
-t.step(function () {
-
-    incorrectCallback = {
-        onerror: t.step_func(function (error) {
-            assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
-        })
-    };
-
-    unregisterSuccess = t.step_func(function () {
-        assert_unreached("Method unregister shouldn't end successfully.");
-    });
-
-    registerSuccessCB = t.step_func(function (handler) {
-        setBluetoothHandlerCleanup(handler);
-        assert_throws({name: exceptionName},
-            function () {
-                handler.unregister(unregisterSuccess, incorrectCallback);
-            }, "Given incorrect errorCallback.");
-
-        t.done();
-    });
-
-    registerErrorCB = t.step_func(function (e) {
-        assert_unreached("registerErrorCB exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerSuccessCB, registerErrorCB);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothServiceHandler_unregister_errorCallback_invalid_cb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothServiceHandler_unregister_errorCallback_invalid_cb\r
+//==== LABEL Check unregister() argument errorCallback validation\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+setup({timeout: 180000, explicit_done:true});\r
+\r
+var t = async_test(document.title, {timeout: 180000}), adapter, exceptionName = "TypeMismatchError", incorrectCallback,\r
+    unregisterSuccess, registerSuccessCB, registerErrorCB, powerOnSuccess;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      incorrectCallback = {\r
+            onerror: t.step_func(function (error) {\r
+                assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);\r
+            })\r
+        };\r
+\r
+        unregisterSuccess = t.step_func(function () {\r
+            assert_unreached("Method unregister shouldn't end successfully.");\r
+        });\r
+\r
+        registerSuccessCB = t.step_func(function (handler) {\r
+            setBluetoothHandlerCleanup(handler);\r
+            assert_throws({ name: exceptionName },\r
+                function () {\r
+                    handler.unregister(unregisterSuccess, incorrectCallback);\r
+                }, "Given incorrect errorCallback.");\r
+\r
+            t.done();\r
+        });\r
+\r
+        registerErrorCB = t.step_func(function (e) {\r
+            assert_unreached("registerErrorCB exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerSuccessCB, registerErrorCB);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 79db101d03cd4ea0a0f5231fd0b97ab2b5a422c6..318b427f86beded13c3da7eab3fd7c211873b565 100755 (executable)
@@ -1,77 +1,81 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
-  may be used to endorse or promote products derived from this work without
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothServiceHandler_unregister_exist</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothServiceHandler_unregister_exist
-//==== LABEL Check if unregister method exists
-//==== PRIORITY P0
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA ME
-setup({timeout:180000, explicit_done:true});
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
-    registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError, powerOnSuccess;
-t.step(function () {
-
-    registerRFCOMMServiceByUUIDSuccess = t.step_func(function (handler) {
-        setBluetoothHandlerCleanup(handler);
-        assert_true("unregister" in handler, "Method unregister does not exist in BluetoothServiceHandler.");
-        check_method_exists(handler, "unregister");
-
-        t.done();
-    });
-
-    registerRFCOMMServiceByUUIDError = t.step_func(function (e) {
-        assert_unreached("registerRFCOMMServiceByUUIDError exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+  this list of conditions and the following disclaimer in the documentation\r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+  may be used to endorse or promote products derived from this work without\r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothServiceHandler_unregister_exist</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothServiceHandler_unregister_exist\r
+//==== LABEL Check if unregister method exists\r
+//==== PRIORITY P0\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA ME\r
+setup({timeout:180000, explicit_done:true});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+    registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError, powerOnSuccess;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      registerRFCOMMServiceByUUIDSuccess = t.step_func(function (handler) {\r
+            setBluetoothHandlerCleanup(handler);\r
+            assert_true("unregister" in handler, "Method unregister does not exist in BluetoothServiceHandler.");\r
+            check_method_exists(handler, "unregister");\r
+\r
+            t.done();\r
+        });\r
+\r
+        registerRFCOMMServiceByUUIDError = t.step_func(function (e) {\r
+            assert_unreached("registerRFCOMMServiceByUUIDError exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 36459170fb8423e094040e86e2ad093d64e111fc..770fc4f5171a006e7c3cc17abef1c58d79cf7580 100755 (executable)
@@ -1,81 +1,87 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothServiceHandler_unregister_successCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothServiceHandler_unregister_successCallback_TypeMismatch
-//==== LABEL Check whether unregister() method called with invalid successCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-setup({timeout:180000, explicit_done:true});
-
-var t = async_test(document.title, {timeout: 180000}), exceptionName, i,
-    adapter = null, conversionTable, errorCallback, registerSuccessCB, registerErrorCB, powerOnSuccess, successCallback;
-t.step(function () {
-    conversionTable = getTypeConversionExceptions("functionObject", true);
-
-    errorCallback = t.step_func(function (e) {
-        assert_unreached("errorCallback exception:" + e.message);
-    });
-
-    registerSuccessCB = t.step_func(function (handler) {
-        setBluetoothHandlerCleanup(handler);
-        for(i = 0; i < conversionTable.length; i++) {
-            successCallback = conversionTable[i][0];
-            exceptionName = conversionTable[i][1];
-
-            assert_throws({name: exceptionName},
-                function () {
-                    handler.unregister(successCallback, errorCallback);
-                }, "Given incorrect successCallback.");
-        }
-
-        t.done();
-    });
-
-    registerErrorCB = t.step_func(function (e) {
-        assert_unreached("registerErrorCB exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerSuccessCB, registerErrorCB);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothServiceHandler_unregister_successCallback_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothServiceHandler_unregister_successCallback_TypeMismatch\r
+//==== LABEL Check whether unregister() method called with invalid successCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+setup({timeout:180000, explicit_done:true});\r
+\r
+var t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+    adapter = null, conversionTable, errorCallback, registerSuccessCB, registerErrorCB, powerOnSuccess, successCallback;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+        errorCallback = t.step_func(function (e) {\r
+            assert_unreached("errorCallback exception:" + e.message);\r
+        });\r
+\r
+        registerSuccessCB = t.step_func(function (handler) {\r
+            setBluetoothHandlerCleanup(handler);\r
+            for (i = 0; i < conversionTable.length; i++) {\r
+                successCallback = conversionTable[i][0];\r
+                exceptionName = conversionTable[i][1];\r
+\r
+                assert_throws({ name: exceptionName },\r
+                    function () {\r
+                        handler.unregister(successCallback, errorCallback);\r
+                    }, "Given incorrect successCallback.");\r
+            }\r
+\r
+            t.done();\r
+        });\r
+\r
+        registerErrorCB = t.step_func(function (e) {\r
+            assert_unreached("registerErrorCB exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerSuccessCB, registerErrorCB);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index b9d99e507225359a3979a8bf73c1802aeaf08c52..de258ba8f826b8ffb8b9aee565185104d124789f 100755 (executable)
@@ -1,81 +1,85 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothServiceHandler_unregister_successCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothServiceHandler_unregister_successCallback_invalid_cb
-//==== LABEL Check if successful callback of unregister() method invoked
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-setup({timeout:180000, explicit_done:true});
-
-var t = async_test(document.title, {timeout: 180000}), adapter, exceptionName = "TypeMismatchError", incorrectCallback,
-    unregisterError, registerSuccessCB, registerErrorCB, powerOnSuccess;
-t.step(function () {
-
-    incorrectCallback = {
-        onsuccess: t.step_func(function () {
-            assert_unreached("Method unregister shouldn't end successfully.");
-        })
-    };
-
-    unregisterError = t.step_func(function (e) {
-        assert_unreached("unregisterError exception:" + e.message);
-    });
-
-    registerSuccessCB = t.step_func(function (handler) {
-        setBluetoothHandlerCleanup(handler);
-        assert_throws({name: exceptionName},
-            function () {
-                handler.unregister(incorrectCallback, unregisterError);
-            }, "Given incorrect successCallback.");
-
-        t.done();
-    });
-
-    registerErrorCB = t.step_func(function (e) {
-        assert_unreached("registerErrorCB exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerSuccessCB, registerErrorCB);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothServiceHandler_unregister_successCallback_invalid_cb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothServiceHandler_unregister_successCallback_invalid_cb\r
+//==== LABEL Check if successful callback of unregister() method invoked\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+setup({timeout:180000, explicit_done:true});\r
+\r
+var t = async_test(document.title, {timeout: 180000}), adapter, exceptionName = "TypeMismatchError", incorrectCallback,\r
+    unregisterError, registerSuccessCB, registerErrorCB, powerOnSuccess;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      incorrectCallback = {\r
+            onsuccess: t.step_func(function () {\r
+                assert_unreached("Method unregister shouldn't end successfully.");\r
+            })\r
+        };\r
+\r
+        unregisterError = t.step_func(function (e) {\r
+            assert_unreached("unregisterError exception:" + e.message);\r
+        });\r
+\r
+        registerSuccessCB = t.step_func(function (handler) {\r
+            setBluetoothHandlerCleanup(handler);\r
+            assert_throws({ name: exceptionName },\r
+                function () {\r
+                    handler.unregister(incorrectCallback, unregisterError);\r
+                }, "Given incorrect successCallback.");\r
+\r
+            t.done();\r
+        });\r
+\r
+        registerErrorCB = t.step_func(function (e) {\r
+            assert_unreached("registerErrorCB exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerSuccessCB, registerErrorCB);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 13aae8010944abc8b1176d1146faa01bb8d444f8..f3e583c6124d47cc3c63b475b185e301887889cc 100755 (executable)
@@ -1,80 +1,86 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification, 
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list 
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice, 
-  this list of conditions and the following disclaimer in the documentation 
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors 
-  may be used to endorse or promote products derived from this work without 
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" 
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, 
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
-
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-
--->
-<html>
-<head>
-<title>BluetoothServiceHandler_unregister_unregisterServiceRecord</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothServiceHandler_unregister_unregisterServiceRecord
-//==== LABEL Check using unregister method which is in BluetoothServiceHandler interface to unregister service record
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MOA
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), unregisterSuccess,
-    unregisterError, chatServiceSuccessCallback, powerOnSuccess, chatServiceErrorCallback;
-t.step(function () {
-    unregisterSuccess = t.step_func(function () {
-        t.done();
-    });
-
-    unregisterError = t.step_func(function (e) {
-        assert_unreached("unregisterError, Exception: " + e.message);
-    });
-
-    chatServiceSuccessCallback = t.step_func(function (recordHandler) {
-        recordHandler.unregister(unregisterSuccess, unregisterError);
-    });
-
-    chatServiceErrorCallback = t.step_func(function (e) {
-        assert_unreached("chatServiceErrorCallback, Exception: " + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCallback, chatServiceErrorCallback);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification, \r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list \r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice, \r
+  this list of conditions and the following disclaimer in the documentation \r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors \r
+  may be used to endorse or promote products derived from this work without \r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" \r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE \r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE \r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, \r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, \r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, \r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY \r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING \r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, \r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  \r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothServiceHandler_unregister_unregisterServiceRecord</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothServiceHandler_unregister_unregisterServiceRecord\r
+//==== LABEL Check using unregister method which is in BluetoothServiceHandler interface to unregister service record\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MOA\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), unregisterSuccess,\r
+    unregisterError, chatServiceSuccessCallback, powerOnSuccess, chatServiceErrorCallback;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+        unregisterSuccess = t.step_func(function () {\r
+            t.done();\r
+        });\r
+\r
+        unregisterError = t.step_func(function (e) {\r
+            assert_unreached("unregisterError, Exception: " + e.message);\r
+        });\r
+\r
+        chatServiceSuccessCallback = t.step_func(function (recordHandler) {\r
+            recordHandler.unregister(unregisterSuccess, unregisterError);\r
+        });\r
+\r
+        chatServiceErrorCallback = t.step_func(function (e) {\r
+            assert_unreached("chatServiceErrorCallback, Exception: " + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCallback, chatServiceErrorCallback);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index a33d8fc535b7a21da5d3f13565c38250458051e6..0f295a66d51fee7b3ef543363a3feca46a9ca17b 100755 (executable)
@@ -1,82 +1,86 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
-  may be used to endorse or promote products derived from this work without
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothServiceHandler_unregister_with_errorCallback</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothServiceHandler_unregister_with_errorCallback
-//==== LABEL Check with optional arguments unregister(valid_successCallback, valid_errorCallback)
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MOA
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), unregisterSuccess,
-    unregisterError, registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError, powerOnSuccess;
-t.step(function () {
-
-    unregisterSuccess = t.step_func(function () {
-        t.done();
-    });
-
-    unregisterError = t.step_func(function (e) {
-        assert_unreached("unregisterError exception:" + e.message);
-    });
-
-    registerRFCOMMServiceByUUIDSuccess = t.step_func(function (recordHandler) {
-        recordHandler.unregister(unregisterSuccess, unregisterError);
-    });
-
-    registerRFCOMMServiceByUUIDError = t.step_func(function (e) {
-        assert_unreached("registerRFCOMMServiceByUUIDError exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+  this list of conditions and the following disclaimer in the documentation\r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+  may be used to endorse or promote products derived from this work without\r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothServiceHandler_unregister_with_errorCallback</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothServiceHandler_unregister_with_errorCallback\r
+//==== LABEL Check with optional arguments unregister(valid_successCallback, valid_errorCallback)\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MOA\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), unregisterSuccess,\r
+    unregisterError, registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError, powerOnSuccess;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      unregisterSuccess = t.step_func(function () {\r
+            t.done();\r
+        });\r
+\r
+        unregisterError = t.step_func(function (e) {\r
+            assert_unreached("unregisterError exception:" + e.message);\r
+        });\r
+\r
+        registerRFCOMMServiceByUUIDSuccess = t.step_func(function (recordHandler) {\r
+            recordHandler.unregister(unregisterSuccess, unregisterError);\r
+        });\r
+\r
+        registerRFCOMMServiceByUUIDError = t.step_func(function (e) {\r
+            assert_unreached("registerRFCOMMServiceByUUIDError exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index e8e9c02fbc200e6254e646bc9d5a262419c5efc8..bd5a064ebb5cb9c007f84429309b9b8f483af761 100755 (executable)
@@ -1,69 +1,73 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothServiceHandler_unregister_with_successCallback</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothServiceHandler_unregister_with_successCallback
-//==== LABEL Check with optional arguments unregister(valid_successCallback)
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MOA
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), unregisterSuccess,
-    registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError, powerOnSuccess;
-t.step(function () {
-
-    unregisterSuccess = t.step_func(function () {
-        t.done();
-    });
-
-    registerRFCOMMServiceByUUIDSuccess = t.step_func(function (recordHandler) {
-        recordHandler.unregister(unregisterSuccess);
-    });
-
-    registerRFCOMMServiceByUUIDError = t.step_func(function (e) {
-        assert_unreached("registerRFCOMMServiceByUUIDError exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothServiceHandler_unregister_with_successCallback</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothServiceHandler_unregister_with_successCallback\r
+//==== LABEL Check with optional arguments unregister(valid_successCallback)\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MOA\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), unregisterSuccess,\r
+    registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError, powerOnSuccess;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      unregisterSuccess = t.step_func(function () {\r
+            t.done();\r
+        });\r
+\r
+        registerRFCOMMServiceByUUIDSuccess = t.step_func(function (recordHandler) {\r
+            recordHandler.unregister(unregisterSuccess);\r
+        });\r
+\r
+        registerRFCOMMServiceByUUIDError = t.step_func(function (e) {\r
+            assert_unreached("registerRFCOMMServiceByUUIDError exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index a25377b695f45ffe081a9f0fd462c0018d1627a3..27c6d4fce826e48c3f2462c0d2e9a6e592b8baab 100755 (executable)
@@ -1,76 +1,80 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
-  may be used to endorse or promote products derived from this work without
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-
--->
-<html>
-<head>
-<title>BluetoothServiceHandler_uuid_attribute</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothServiceHandler_uuid_attribute
-//==== LABEL Check attribute uuid in BluetoothServiceHandler
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:uuid A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA AE AT ARO
-setup({timeout:180000, explicit_done:true});
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, chatServiceSuccessCallback,
-    chatServiceErrorCallback, uuid;
-t.step(function () {
-
-    chatServiceSuccessCallback = t.step_func(function (handler) {
-        setBluetoothHandlerCleanup(handler);
-        uuid = handler.uuid;
-        check_readonly(handler, "uuid", uuid, "string", "1234");
-
-        t.done();
-    });
-
-    chatServiceErrorCallback = t.step_func(function (e) {
-        assert_unreached("chatServiceErrorCallback exception " + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCallback, chatServiceErrorCallback);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+  this list of conditions and the following disclaimer in the documentation\r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+  may be used to endorse or promote products derived from this work without\r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothServiceHandler_uuid_attribute</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothServiceHandler_uuid_attribute\r
+//==== LABEL Check attribute uuid in BluetoothServiceHandler\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:uuid A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA AE AT ARO\r
+setup({timeout:180000, explicit_done:true});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, chatServiceSuccessCallback,\r
+    chatServiceErrorCallback, uuid;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      chatServiceSuccessCallback = t.step_func(function (handler) {\r
+            setBluetoothHandlerCleanup(handler);\r
+            uuid = handler.uuid;\r
+            check_readonly(handler, "uuid", uuid, "string", "1234");\r
+\r
+            t.done();\r
+        });\r
+\r
+        chatServiceErrorCallback = t.step_func(function (e) {\r
+            assert_unreached("chatServiceErrorCallback exception " + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCallback, chatServiceErrorCallback);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 7c57107b9df0594b0944e5b84bd17374686eda2a..ceaef53817e3597b89de17c644a94e4c2ad14eb6 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -38,7 +38,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CBNIO
 test(function () {
-    check_no_interface_object("BluetoothServiceSuccessCallback");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_no_interface_object("BluetoothServiceSuccessCallback");
+    }
 }, document.title);
 
 </script>
index 658c4a63468dd2c635874be0d66da7931e6bc142..f9785da4adf534e9be42a44cb78a8798234b434e 100755 (executable)
@@ -1,72 +1,76 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothServiceSuccessCallback_onsuccess</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothServiceSuccessCallback_onsuccess
-//==== LABEL Check if BluetoothServiceSuccessCallback callback is called and if its arguments have proper type
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceSuccessCallback:onsuccess M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA CBT CBOA
-setup({timeout:180000, explicit_done:true});
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
-    chatServiceSuccessCB, chatServiceErrorCB, powerOnSuccess;
-
-t.step(function () {
-
-    chatServiceSuccessCB = t.step_func(function (handler) {
-        setBluetoothHandlerCleanup(handler);
-        assert_true("uuid" in handler, "No uuid in socket");
-        assert_true("name" in handler, "No name in socket");
-        assert_true("isConnected" in handler, "No isConnected in socket");
-        assert_true("onconnect" in handler, "No onconnect in socket");
-        assert_type(handler.unregister, "function", "Method unregister does not exist.");
-
-        t.done();
-    });
-
-    chatServiceErrorCB = t.step_func(function (e) {
-        assert_unreached("chatServiceErrorCB exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCB, chatServiceErrorCB);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothServiceSuccessCallback_onsuccess</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothServiceSuccessCallback_onsuccess\r
+//==== LABEL Check if BluetoothServiceSuccessCallback callback is called and if its arguments have proper type\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceSuccessCallback:onsuccess M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA CBT CBOA\r
+setup({timeout:180000, explicit_done:true});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+    chatServiceSuccessCB, chatServiceErrorCB, powerOnSuccess;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      chatServiceSuccessCB = t.step_func(function (handler) {\r
+            setBluetoothHandlerCleanup(handler);\r
+            assert_true("uuid" in handler, "No uuid in socket");\r
+            assert_true("name" in handler, "No name in socket");\r
+            assert_true("isConnected" in handler, "No isConnected in socket");\r
+            assert_true("onconnect" in handler, "No onconnect in socket");\r
+            assert_type(handler.unregister, "function", "Method unregister does not exist.");\r
+\r
+            t.done();\r
+        });\r
+\r
+        chatServiceErrorCB = t.step_func(function (e) {\r
+            assert_unreached("chatServiceErrorCB exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCB, chatServiceErrorCB);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 12fbf3fd88c633ac2dc70594b01dd84ad1b778d3..309ddbe9939a80d83bb6decb493f532014aa021a 100755 (executable)
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Witold Choinkowski <w.choinkowsk@samsung.com>
-        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothSocket</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothSocket
-//==== LABEL Check BluetoothSocket attributes and functions
-//==== EXECUTION_TYPE manual
-//==== PRIORITY P3
-//==== STEP several tests executed from base test
-//==== EXPECT all subtests should be successful
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:close M
-//==== TEST_CRITERIA ME
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:close M
-//==== TEST_CRITERIA MNAEX
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:BluetoothSocket U
-//==== TEST_CRITERIA OBX
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:onclose A
-//==== TEST_CRITERIA AE ADV
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:onmessage A
-//==== TEST_CRITERIA AE ADV
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:peer A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:readData M
-//==== TEST_CRITERIA ME
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:readData M
-//==== TEST_CRITERIA MNAEX
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:state A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocketSuccessCallback:onsuccess M
-//==== TEST_CRITERIA CBT CBOA
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:uuid A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:writeData M
-//==== TEST_CRITERIA ME
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:writeData M
-//==== TEST_CRITERIA MMA
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:writeData M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:close M
-//==== TEST_CRITERIA MNA MNAST
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.
-
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, onSocketConnect, onSocketError,
-    gotDeviceInfo, gotDeviceError, onBondingSuccess, onBondingError, powerOnSuccess,
-    peerCP, fakePeer, skState, skUuid, param, i;
-t.step(function () {
-
-    add_result_callback(function() {
-        clearBonding(REMOTE_DEVICE_ADDRESS);
-    });
-
-    onSocketConnect = t.step_func(function (socket) {
-        //BluetoothSocket_close_exist ME
-        test(function () {
-            assert_true("close" in socket, "close in onSocketConnect");
-            check_method_exists(socket, "close");
-        }, "BluetoothSocket_close_exist");
-
-        //BluetoothSocket_extend OBX
-        test(function () {
-            check_extensibility(socket);
-        }, "BluetoothSocket_extend");
-
-        //BluetoothSocket_onclose_property_exists AE ADV
-        test(function () {
-            assert_true("onclose" in socket, "onclose in onSocketConnect");
-            assert_equals(socket.onclose, null, "onclose in BluetoothSocket has wrong default value");
-        }, "BluetoothSocket_onclose_property_exists");
-
-        //BluetoothSocket_onmessage_property_exists AE ADV
-        test(function () {
-            assert_true("onmessage" in socket, "onmessage in onSocketConnect");
-            assert_equals(socket.onmessage, null, "onmessage in BluetoothSocket has wrong default value");
-        }, "BluetoothSocket_onmessage_property_exists");
-
-        //BluetoothSocket_peer_attribute AE AT ARO
-        test(function () {
-            assert_own_property(socket, "peer", "socket does not own peer property.");
-            assert_own_property(socket.peer, "name", "socket.peer does not own name property.");
-            assert_own_property(socket.peer, "address", "socket.peer does not own address property.");
-            assert_own_property(socket.peer, "deviceClass", "socket.peer does not own deviceClass property.");
-            assert_own_property(socket.peer, "isBonded", "socket.peer does not own isBonded property.");
-            assert_own_property(socket.peer, "isTrusted", "socket.peer does not own isTrusted property.");
-            assert_own_property(socket.peer, "isConnected", "socket.peer does not own isConnected property.");
-            assert_own_property(socket.peer, "uuids", "socket.peer does not own uuids property.");
-
-            assert_type(socket.peer, "object", "Type of deviceClass is different.");
-
-            //peer is obtained by getter so I can not directly test the override
-            peerCP = socket.peer;
-            fakePeer = {
-                name:"fakeName",
-                address:"00:02:18:2F:78:32",
-                deviceClass:{},
-                isBonded:true,
-                isTrusted:true,
-                isConnected:true,
-                uuids:[],
-
-                connectToServiceByUUID:function (){}
-            };
-            socket.peer = fakePeer;
-            assert_equals(socket.peer.name, peerCP.name, "peer can be modified.");
-            assert_equals(socket.peer.address, peerCP.address, "peer can be modified.");
-            assert_equals(socket.peer.isBonded, peerCP.isBonded, "peer can be modified.");
-            assert_equals(socket.peer.isTrusted, peerCP.isTrusted, "peer can be modified.");
-            assert_equals(socket.peer.isConnected, peerCP.isConnected, "peer can be modified.");
-            assert_array_equals(socket.peer.uuids, peerCP.uuids, "deviceClass can be modified.");
-        }, "BluetoothSocket_peer_attribute");
-
-        //BluetoothSocket_readData_exist ME
-        test(function () {
-            assert_true("readData" in socket, "readData in onSocketConnect");
-            check_method_exists(socket, "readData");
-        }, "BluetoothSocket_readData_exist");
-
-        //BluetoothSocket_readData_extra_argument MNAEX
-        test(function () {
-            checkExtraArgument(socket, "readData");
-        }, "BluetoothSocket_readData_extra_argument");
-
-        //BluetoothSocket_state_attribute AE AT ARO
-        test(function () {
-            skState = socket.state;
-            check_readonly(socket, "state", skState, "string", "1234");
-        }, "BluetoothSocket_state_attribute");
-
-        //BluetoothSocketSuccessCallback_onsuccess CBT CBOA
-        test(function () {
-            assert_true("uuid" in socket, "No uuid in socket");
-            assert_true("state" in socket, "No state in socket");
-            assert_true("peer" in socket, "No peer in socket");
-            assert_true("onmessage" in socket, "No onmessage in socket");
-            assert_true("onclose" in socket, "No onclose in socket");
-            assert_type(socket.writeData, "function", "Method writeData does not exist.");
-            assert_type(socket.readData, "function", "Method readData does not exist.");
-            assert_type(socket.close, "function", "Method close does not exist.");
-        }, "BluetoothSocketSuccessCallback_onsuccess");
-
-        //BluetoothSocket_uuid_attribute AE AT ARO
-        test(function () {
-            skUuid = socket.uuid;
-            check_readonly(socket, "uuid", skUuid, "string", "1234");
-        }, "BluetoothSocket_uuid_attribute");
-
-        //BluetoothSocket_writeData_exist ME
-        test(function () {
-            assert_true("writeData" in socket, "connectToServiceByUUID does not exist.");
-            check_method_exists(socket, "writeData");
-        }, "BluetoothSocket_writeData_exist");
-
-        //BluetoothSocket_writeData_missarg MMA
-        /*test(function () {
-            assert_throws ({name:"TypeMismatchError"},
-            function () {
-                socket.writeData();
-            }, "Method with non optional argument.");
-        }, "BluetoothSocket_writeData_missarg");
-
-        //BluetoothSocket_writeData_TypeMismatch MC
-        test(function () {
-            param = [1, "aaa", {}, function () {}, true];
-            for (i = 0; i < param.length; i++) {
-                assert_throws(TYPE_MISMATCH_EXCEPTION,
-                function () {
-                    socket.writeData(param[i]);
-                }, "Method type mismatch");
-            }
-        }, "BluetoothSocket_writeData_TypeMismatch");*/
-
-        //BluetoothSocket_close_extra_argument MNAEX
-        test(function () {
-            checkExtraArgument(socket, "close");
-        }, "BluetoothSocket_close_extra_argument");
-
-        //BluetoothSocketState_close_enum MNA MNAST
-        test(function () {
-            socket.close();
-            assert_equals(socket.state, "CLOSED", "BluetoothSocket.state enum is no equal to 'CLOSED'");
-        }, "BluetoothSocketState_close_enum");
-
-        t.done();
-    });
-
-    onSocketError = t.step_func(function (e) {
-        assert_unreached("onSocketError exception:" + e.message);
-    });
-
-    gotDeviceInfo = t.step_func(function (device) {
-        device.connectToServiceByUUID(CHAT_SERVICE_UUID, onSocketConnect, onSocketError);
-    });
-
-    gotDeviceError = t.step_func(function (e) {
-        assert_unreached("gotDeviceError exception:" + e.message);
-    });
-
-    onBondingSuccess = t.step_func(function () {
-        adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);
-    });
-
-    onBondingError = t.step_func(function (e) {
-        assert_unreached("onBondingError exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Witold Choinkowski <w.choinkowsk@samsung.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothSocket</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothSocket\r
+//==== LABEL Check BluetoothSocket attributes and functions\r
+//==== EXECUTION_TYPE manual\r
+//==== PRIORITY P3\r
+//==== STEP several tests executed from base test\r
+//==== EXPECT all subtests should be successful\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:close M\r
+//==== TEST_CRITERIA ME\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:close M\r
+//==== TEST_CRITERIA MNAEX\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:BluetoothSocket U\r
+//==== TEST_CRITERIA OBX\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:onclose A\r
+//==== TEST_CRITERIA AE ADV\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:onmessage A\r
+//==== TEST_CRITERIA AE ADV\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:peer A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:readData M\r
+//==== TEST_CRITERIA ME\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:readData M\r
+//==== TEST_CRITERIA MNAEX\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:state A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocketSuccessCallback:onsuccess M\r
+//==== TEST_CRITERIA CBT CBOA\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:uuid A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:writeData M\r
+//==== TEST_CRITERIA ME\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:writeData M\r
+//==== TEST_CRITERIA MMA\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:writeData M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:close M\r
+//==== TEST_CRITERIA MNA MNAST\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.\r
+\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, onSocketConnect, onSocketError,\r
+    gotDeviceInfo, gotDeviceError, onBondingSuccess, onBondingError, powerOnSuccess,\r
+    peerCP, fakePeer, skState, skUuid, param, i;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      add_result_callback(function () {\r
+            clearBonding(REMOTE_DEVICE_ADDRESS);\r
+        });\r
+\r
+        onSocketConnect = t.step_func(function (socket) {\r
+            //BluetoothSocket_close_exist ME\r
+            test(function () {\r
+                assert_true("close" in socket, "close in onSocketConnect");\r
+                check_method_exists(socket, "close");\r
+            }, "BluetoothSocket_close_exist");\r
+\r
+            //BluetoothSocket_extend OBX\r
+            test(function () {\r
+                check_extensibility(socket);\r
+            }, "BluetoothSocket_extend");\r
+\r
+            //BluetoothSocket_onclose_property_exists AE ADV\r
+            test(function () {\r
+                assert_true("onclose" in socket, "onclose in onSocketConnect");\r
+                assert_equals(socket.onclose, null, "onclose in BluetoothSocket has wrong default value");\r
+            }, "BluetoothSocket_onclose_property_exists");\r
+\r
+            //BluetoothSocket_onmessage_property_exists AE ADV\r
+            test(function () {\r
+                assert_true("onmessage" in socket, "onmessage in onSocketConnect");\r
+                assert_equals(socket.onmessage, null, "onmessage in BluetoothSocket has wrong default value");\r
+            }, "BluetoothSocket_onmessage_property_exists");\r
+\r
+            //BluetoothSocket_peer_attribute AE AT ARO\r
+            test(function () {\r
+                assert_own_property(socket, "peer", "socket does not own peer property.");\r
+                assert_own_property(socket.peer, "name", "socket.peer does not own name property.");\r
+                assert_own_property(socket.peer, "address", "socket.peer does not own address property.");\r
+                assert_own_property(socket.peer, "deviceClass", "socket.peer does not own deviceClass property.");\r
+                assert_own_property(socket.peer, "isBonded", "socket.peer does not own isBonded property.");\r
+                assert_own_property(socket.peer, "isTrusted", "socket.peer does not own isTrusted property.");\r
+                assert_own_property(socket.peer, "isConnected", "socket.peer does not own isConnected property.");\r
+                assert_own_property(socket.peer, "uuids", "socket.peer does not own uuids property.");\r
+\r
+                assert_type(socket.peer, "object", "Type of deviceClass is different.");\r
+\r
+                //peer is obtained by getter so I can not directly test the override\r
+                peerCP = socket.peer;\r
+                fakePeer = {\r
+                    name: "fakeName",\r
+                    address: "00:02:18:2F:78:32",\r
+                    deviceClass: {},\r
+                    isBonded: true,\r
+                    isTrusted: true,\r
+                    isConnected: true,\r
+                    uuids: [],\r
+\r
+                    connectToServiceByUUID: function () { }\r
+                };\r
+                socket.peer = fakePeer;\r
+                assert_equals(socket.peer.name, peerCP.name, "peer can be modified.");\r
+                assert_equals(socket.peer.address, peerCP.address, "peer can be modified.");\r
+                assert_equals(socket.peer.isBonded, peerCP.isBonded, "peer can be modified.");\r
+                assert_equals(socket.peer.isTrusted, peerCP.isTrusted, "peer can be modified.");\r
+                assert_equals(socket.peer.isConnected, peerCP.isConnected, "peer can be modified.");\r
+                assert_array_equals(socket.peer.uuids, peerCP.uuids, "deviceClass can be modified.");\r
+            }, "BluetoothSocket_peer_attribute");\r
+\r
+            //BluetoothSocket_readData_exist ME\r
+            test(function () {\r
+                assert_true("readData" in socket, "readData in onSocketConnect");\r
+                check_method_exists(socket, "readData");\r
+            }, "BluetoothSocket_readData_exist");\r
+\r
+            //BluetoothSocket_readData_extra_argument MNAEX\r
+            test(function () {\r
+                checkExtraArgument(socket, "readData");\r
+            }, "BluetoothSocket_readData_extra_argument");\r
+\r
+            //BluetoothSocket_state_attribute AE AT ARO\r
+            test(function () {\r
+                skState = socket.state;\r
+                check_readonly(socket, "state", skState, "string", "1234");\r
+            }, "BluetoothSocket_state_attribute");\r
+\r
+            //BluetoothSocketSuccessCallback_onsuccess CBT CBOA\r
+            test(function () {\r
+                assert_true("uuid" in socket, "No uuid in socket");\r
+                assert_true("state" in socket, "No state in socket");\r
+                assert_true("peer" in socket, "No peer in socket");\r
+                assert_true("onmessage" in socket, "No onmessage in socket");\r
+                assert_true("onclose" in socket, "No onclose in socket");\r
+                assert_type(socket.writeData, "function", "Method writeData does not exist.");\r
+                assert_type(socket.readData, "function", "Method readData does not exist.");\r
+                assert_type(socket.close, "function", "Method close does not exist.");\r
+            }, "BluetoothSocketSuccessCallback_onsuccess");\r
+\r
+            //BluetoothSocket_uuid_attribute AE AT ARO\r
+            test(function () {\r
+                skUuid = socket.uuid;\r
+                check_readonly(socket, "uuid", skUuid, "string", "1234");\r
+            }, "BluetoothSocket_uuid_attribute");\r
+\r
+            //BluetoothSocket_writeData_exist ME\r
+            test(function () {\r
+                assert_true("writeData" in socket, "connectToServiceByUUID does not exist.");\r
+                check_method_exists(socket, "writeData");\r
+            }, "BluetoothSocket_writeData_exist");\r
+\r
+            //BluetoothSocket_writeData_missarg MMA\r
+            /*test(function () {\r
+                assert_throws ({name:"TypeMismatchError"},\r
+                function () {\r
+                    socket.writeData();\r
+                }, "Method with non optional argument.");\r
+            }, "BluetoothSocket_writeData_missarg");\r
+    \r
+            //BluetoothSocket_writeData_TypeMismatch MC\r
+            test(function () {\r
+                param = [1, "aaa", {}, function () {}, true];\r
+                for (i = 0; i < param.length; i++) {\r
+                    assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+                    function () {\r
+                        socket.writeData(param[i]);\r
+                    }, "Method type mismatch");\r
+                }\r
+            }, "BluetoothSocket_writeData_TypeMismatch");*/\r
+\r
+            //BluetoothSocket_close_extra_argument MNAEX\r
+            test(function () {\r
+                checkExtraArgument(socket, "close");\r
+            }, "BluetoothSocket_close_extra_argument");\r
+\r
+            //BluetoothSocketState_close_enum MNA MNAST\r
+            test(function () {\r
+                socket.close();\r
+                assert_equals(socket.state, "CLOSED", "BluetoothSocket.state enum is no equal to 'CLOSED'");\r
+            }, "BluetoothSocketState_close_enum");\r
+\r
+            t.done();\r
+        });\r
+\r
+        onSocketError = t.step_func(function (e) {\r
+            assert_unreached("onSocketError exception:" + e.message);\r
+        });\r
+\r
+        gotDeviceInfo = t.step_func(function (device) {\r
+            device.connectToServiceByUUID(CHAT_SERVICE_UUID, onSocketConnect, onSocketError);\r
+        });\r
+\r
+        gotDeviceError = t.step_func(function (e) {\r
+            assert_unreached("gotDeviceError exception:" + e.message);\r
+        });\r
+\r
+        onBondingSuccess = t.step_func(function () {\r
+            adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);\r
+        });\r
+\r
+        onBondingError = t.step_func(function (e) {\r
+            assert_unreached("onBondingError exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 4065bce17bcafdc2c455cff00d64833e0217b555..c89fceeda3eb26d9a9782a44f27c50985104abbc 100755 (executable)
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
-  may be used to endorse or promote products derived from this work without
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothSocketState_open_enum</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothSocketState_open_enum
-//==== LABEL Check enum OPEN in socket
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:state A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.
-//==== TEST_CRITERIA ADV
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, onBondingSuccess, onBondingError,
-    gotDeviceInfo, gotDeviceError, onSocketConnect, onSocketError;
-
-t.step(function () {
-
-    add_result_callback(function() {
-        clearBonding(REMOTE_DEVICE_ADDRESS);
-    });
-
-    onSocketConnect = t.step_func(function (socket) {
-        assert_equals(socket.state, "OPEN", "BluetoothSocket.state enum is no equal to 'OPEN'");
-        socket.close();
-        t.done();
-    });
-
-    onSocketError = t.step_func(function (e) {
-        assert_unreached("onSocketError exception:" + e.message);
-    });
-
-    gotDeviceInfo = t.step_func(function (device) {
-        device.connectToServiceByUUID(CHAT_SERVICE_UUID, onSocketConnect, onSocketError);
-    });
-
-    gotDeviceError = t.step_func(function (e) {
-        assert_unreached("gotDeviceError exception:" + e.message);
-    });
-
-    onBondingSuccess = t.step_func(function (device) {
-        adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);
-    });
-
-    onBondingError = t.step_func(function (e) {
-        assert_unreached("onBondingError exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+  this list of conditions and the following disclaimer in the documentation\r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+  may be used to endorse or promote products derived from this work without\r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothSocketState_open_enum</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothSocketState_open_enum\r
+//==== LABEL Check enum OPEN in socket\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:state A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.\r
+//==== TEST_CRITERIA ADV\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, onBondingSuccess, onBondingError,\r
+    gotDeviceInfo, gotDeviceError, onSocketConnect, onSocketError;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      add_result_callback(function () {\r
+            clearBonding(REMOTE_DEVICE_ADDRESS);\r
+        });\r
+\r
+        onSocketConnect = t.step_func(function (socket) {\r
+            assert_equals(socket.state, "OPEN", "BluetoothSocket.state enum is no equal to 'OPEN'");\r
+            socket.close();\r
+            t.done();\r
+        });\r
+\r
+        onSocketError = t.step_func(function (e) {\r
+            assert_unreached("onSocketError exception:" + e.message);\r
+        });\r
+\r
+        gotDeviceInfo = t.step_func(function (device) {\r
+            device.connectToServiceByUUID(CHAT_SERVICE_UUID, onSocketConnect, onSocketError);\r
+        });\r
+\r
+        gotDeviceError = t.step_func(function (e) {\r
+            assert_unreached("gotDeviceError exception:" + e.message);\r
+        });\r
+\r
+        onBondingSuccess = t.step_func(function (device) {\r
+            adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);\r
+        });\r
+\r
+        onBondingError = t.step_func(function (e) {\r
+            assert_unreached("onBondingError exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index f80a5da668c054164d19990d965644a53e161f92..7b176da82e00e0fd201d5d7d10aa6be48a13b0cb 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -38,7 +38,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA CBNIO
 test(function () {
-    check_no_interface_object("BluetoothSocketSuccessCallback");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_no_interface_object("BluetoothSocketSuccessCallback");
+    }
 }, document.title);
 
 </script>
index d52036f446e87fd938f6168521446b761c9b7013..b33b5a0244df68fe01dd435ac0ab3dc545c19242 100755 (executable)
@@ -1,95 +1,99 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothSocket_close</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothSocket_close
-//==== LABEL Proper close invocation without arguments - should work
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:close M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.
-//==== TEST_CRITERIA MNA MNAST MR
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}), onSocketConnect, onSocketConnectedError,
-    gotDeviceInfo, gotDeviceError, onBondingSuccess, onBondingError, powerOnSuccess, retValue = null;
-t.step(function () {
-
-    add_result_callback(function() {
-        clearBonding(REMOTE_DEVICE_ADDRESS);
-    });
-
-    onSocketConnect = t.step_func(function (socket) {
-        retValue = socket.close();
-        socket.onclose = t.step_func(function () {
-            assert_equals(retValue, undefined, "close returns wrong value");
-            t.done();
-        });
-    });
-
-    onSocketConnectedError = t.step_func(function (e) {
-        assert_unreached("onSocketConnectedError exception:" + e.message);
-    });
-
-    gotDeviceInfo  = t.step_func(function (device) {
-        if (device !== null && device.uuids.indexOf(CHAT_SERVICE_UUID) !== -1) {
-            device.connectToServiceByUUID(CHAT_SERVICE_UUID, onSocketConnect, onSocketConnectedError);
-        } else {
-            assert_unreached("Exception. reason:  device.uuids.indexOf(CHAT_SERVICE_UUID) = " +
-                device.uuids.indexOf(CHAT_SERVICE_UUID) + " device = " + device );
-        }
-    });
-
-    gotDeviceError = t.step_func(function (e) {
-        assert_unreached("gotDeviceError exception:" + e.message);
-    });
-
-    onBondingSuccess = t.step_func(function () {
-        adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);
-    });
-
-    onBondingError = t.step_func(function (e) {
-        assert_unreached("onBondingError exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothSocket_close</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothSocket_close\r
+//==== LABEL Proper close invocation without arguments - should work\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:close M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.\r
+//==== TEST_CRITERIA MNA MNAST MR\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), onSocketConnect, onSocketConnectedError,\r
+    gotDeviceInfo, gotDeviceError, onBondingSuccess, onBondingError, powerOnSuccess, retValue = null;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      add_result_callback(function () {\r
+            clearBonding(REMOTE_DEVICE_ADDRESS);\r
+        });\r
+\r
+        onSocketConnect = t.step_func(function (socket) {\r
+            retValue = socket.close();\r
+            socket.onclose = t.step_func(function () {\r
+                assert_equals(retValue, undefined, "close returns wrong value");\r
+                t.done();\r
+            });\r
+        });\r
+\r
+        onSocketConnectedError = t.step_func(function (e) {\r
+            assert_unreached("onSocketConnectedError exception:" + e.message);\r
+        });\r
+\r
+        gotDeviceInfo = t.step_func(function (device) {\r
+            if (device !== null && device.uuids.indexOf(CHAT_SERVICE_UUID) !== -1) {\r
+                device.connectToServiceByUUID(CHAT_SERVICE_UUID, onSocketConnect, onSocketConnectedError);\r
+            } else {\r
+                assert_unreached("Exception. reason:  device.uuids.indexOf(CHAT_SERVICE_UUID) = " +\r
+                    device.uuids.indexOf(CHAT_SERVICE_UUID) + " device = " + device);\r
+            }\r
+        });\r
+\r
+        gotDeviceError = t.step_func(function (e) {\r
+            assert_unreached("gotDeviceError exception:" + e.message);\r
+        });\r
+\r
+        onBondingSuccess = t.step_func(function () {\r
+            adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);\r
+        });\r
+\r
+        onBondingError = t.step_func(function (e) {\r
+            assert_unreached("onBondingError exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 5cfcc5a76805fb7687a00a56eb23037976de0bc1..0af6a4c48edb892449a14364d195ce63b7a518e7 100755 (executable)
@@ -18,7 +18,7 @@ limitations under the License.
 
 
 Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
 
 -->
 <html>
@@ -38,7 +38,9 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA NIO
 test(function () {
-    check_no_interface_object("BluetoothSocket");
+    if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+        check_no_interface_object("BluetoothSocket");
+    }
 }, document.title);
 
 </script>
index 41ea9f5c05b8a3dbcd1868ea770a209766e404b5..d1f09411c6d8effd6e2eae2f659a0d5c7e1c5b99 100755 (executable)
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
-  may be used to endorse or promote products derived from this work without
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothSocket_onclose_callback</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-
-<ul id="testdetails" style="display:none;">
-    <li>Push "unregister service" button on the remote device"</li>
-</ul>
-
-<script>
-//==== TEST: BluetoothSocket_onclose_callback
-//==== LABEL Check if onClose callback function invoked
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== STEP When you find description in below, please unregister the service at the remote device.
-//==== EXPECT Pass.
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:onclose A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.
-//==== TEST_CRITERIA ASG AT
-
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, onBondingSuccess, onBondingError,
-    gotDeviceInfo, gotDeviceError, onSocketConnect, onSocketError;
-
-t.step(function () {
-
-    add_result_callback(function() {
-        clearBonding(REMOTE_DEVICE_ADDRESS);
-    });
-
-    onSocketConnect = t.step_func(function (socket) {
-        socket.onmessage = t.step_func(function () {
-        });
-        socket.onclose = t.step_func(function () {
-            t.done();
-        });
-        assert_type(socket.onclose, "function", "onclose in BluetoothSocket has wrong type after attaching function to it");
-        document.getElementById("testdetails").style["display"] = "";
-    });
-
-    onSocketError = t.step_func(function (e) {
-        assert_unreached("onSocketError exception:" + e.message);
-    });
-
-    gotDeviceInfo = t.step_func(function (device) {
-        if (device !== null && device.uuids.indexOf(CHAT_SERVICE_UUID) !== -1) {
-            device.connectToServiceByUUID(CHAT_SERVICE_UUID, onSocketConnect, onSocketError);
-        } else {
-            assert_unreached("device has no service");
-        }
-    });
-
-    gotDeviceError = t.step_func(function (e) {
-        assert_unreached("gotDeviceError exception:" + e.message);
-    });
-
-    onBondingSuccess = t.step_func(function (device) {
-        adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);
-    });
-
-    onBondingError = t.step_func(function (e) {
-        assert_unreached("onBondingError exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+  this list of conditions and the following disclaimer in the documentation\r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+  may be used to endorse or promote products derived from this work without\r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothSocket_onclose_callback</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+\r
+<ul id="testdetails" style="display:none;">\r
+    <li>Push "unregister service" button on the remote device"</li>\r
+</ul>\r
+\r
+<script>\r
+//==== TEST: BluetoothSocket_onclose_callback\r
+//==== LABEL Check if onClose callback function invoked\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== STEP When you find description in below, please unregister the service at the remote device.\r
+//==== EXPECT Pass.\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:onclose A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.\r
+//==== TEST_CRITERIA ASG AT\r
+\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, onBondingSuccess, onBondingError,\r
+    gotDeviceInfo, gotDeviceError, onSocketConnect, onSocketError;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      add_result_callback(function () {\r
+            clearBonding(REMOTE_DEVICE_ADDRESS);\r
+        });\r
+\r
+        onSocketConnect = t.step_func(function (socket) {\r
+            socket.onmessage = t.step_func(function () {\r
+            });\r
+            socket.onclose = t.step_func(function () {\r
+                t.done();\r
+            });\r
+            assert_type(socket.onclose, "function", "onclose in BluetoothSocket has wrong type after attaching function to it");\r
+            document.getElementById("testdetails").style["display"] = "";\r
+        });\r
+\r
+        onSocketError = t.step_func(function (e) {\r
+            assert_unreached("onSocketError exception:" + e.message);\r
+        });\r
+\r
+        gotDeviceInfo = t.step_func(function (device) {\r
+            if (device !== null && device.uuids.indexOf(CHAT_SERVICE_UUID) !== -1) {\r
+                device.connectToServiceByUUID(CHAT_SERVICE_UUID, onSocketConnect, onSocketError);\r
+            } else {\r
+                assert_unreached("device has no service");\r
+            }\r
+        });\r
+\r
+        gotDeviceError = t.step_func(function (e) {\r
+            assert_unreached("gotDeviceError exception:" + e.message);\r
+        });\r
+\r
+        onBondingSuccess = t.step_func(function (device) {\r
+            adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);\r
+        });\r
+\r
+        onBondingError = t.step_func(function (e) {\r
+            assert_unreached("onBondingError exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 5b92eecf403bc012947a74277af91f53c1bb37a5..27391a999030d8881030c2bcf9fa58aef8b47d8c 100755 (executable)
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
-  may be used to endorse or promote products derived from this work without
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothSocket_onmessage_callback</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothSocket_onmessage_callback
-//==== LABEL Check if onMessage callback function invoked
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:onmessage A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.
-//==== TEST_CRITERIA AT ASG
-
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, onBondingSuccess, onBondingError,
-    gotDeviceInfo, gotDeviceError, onSocketConnect, onSocketError;
-
-t.step(function () {
-
-    add_result_callback(function() {
-        clearBonding(REMOTE_DEVICE_ADDRESS);
-    });
-
-    onSocketConnect = t.step_func(function (socket) {
-        socket.onmessage = t.step_func(function () {
-            socket.close();
-            t.done();
-        });
-        assert_type(socket.onmessage, "function", "onmessage in BluetoothSocket has wrong type after attaching function to it");
-        socket.onclose = t.step_func(function () {
-        });
-    });
-
-    onSocketError = t.step_func(function (e) {
-        assert_unreached("onSocketError exception:" + e.message);
-    });
-
-    gotDeviceInfo = t.step_func(function (device) {
-        if (device !== null && device.uuids.indexOf(CHAT_SERVICE_UUID) !== -1) {
-            device.connectToServiceByUUID(CHAT_SERVICE_UUID, onSocketConnect, onSocketError);
-        } else {
-            assert_unreached("device has no service");
-        }
-    });
-
-    gotDeviceError = t.step_func(function (e) {
-        assert_unreached("gotDeviceError exception:" + e.message);
-    });
-
-    onBondingSuccess = t.step_func(function (device) {
-        adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);
-    });
-
-    onBondingError = t.step_func(function (e) {
-        assert_unreached("onBondingError exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+  this list of conditions and the following disclaimer in the documentation\r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+  may be used to endorse or promote products derived from this work without\r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothSocket_onmessage_callback</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothSocket_onmessage_callback\r
+//==== LABEL Check if onMessage callback function invoked\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:onmessage A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.\r
+//==== TEST_CRITERIA AT ASG\r
+\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, onBondingSuccess, onBondingError,\r
+    gotDeviceInfo, gotDeviceError, onSocketConnect, onSocketError;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      add_result_callback(function () {\r
+            clearBonding(REMOTE_DEVICE_ADDRESS);\r
+        });\r
+\r
+        onSocketConnect = t.step_func(function (socket) {\r
+            socket.onmessage = t.step_func(function () {\r
+                socket.close();\r
+                t.done();\r
+            });\r
+            assert_type(socket.onmessage, "function", "onmessage in BluetoothSocket has wrong type after attaching function to it");\r
+            socket.onclose = t.step_func(function () {\r
+            });\r
+        });\r
+\r
+        onSocketError = t.step_func(function (e) {\r
+            assert_unreached("onSocketError exception:" + e.message);\r
+        });\r
+\r
+        gotDeviceInfo = t.step_func(function (device) {\r
+            if (device !== null && device.uuids.indexOf(CHAT_SERVICE_UUID) !== -1) {\r
+                device.connectToServiceByUUID(CHAT_SERVICE_UUID, onSocketConnect, onSocketError);\r
+            } else {\r
+                assert_unreached("device has no service");\r
+            }\r
+        });\r
+\r
+        gotDeviceError = t.step_func(function (e) {\r
+            assert_unreached("gotDeviceError exception:" + e.message);\r
+        });\r
+\r
+        onBondingSuccess = t.step_func(function (device) {\r
+            adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);\r
+        });\r
+\r
+        onBondingError = t.step_func(function (e) {\r
+            assert_unreached("onBondingError exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 270f33c90ed4a27adab9294c8c09f73d5b6466bf..73c76647df486d05399364fb78a929b8506df11e 100755 (executable)
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
-  may be used to endorse or promote products derived from this work without
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-        Lukasz Bardeli <l.bardeli@samsung.com>
-        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothSocket_readData</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothSocket_readData
-//==== LABEL Check if readData method correct, after sending nothing
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:readData M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.
-//==== TEST_CRITERIA MNA MR
-
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}), onSocketConnect, retValue = null,
-    onSocketConnectedError, gotDeviceInfo, gotDeviceError, onBondingSuccess, onBondingError, powerOnSuccess;
-t.step(function () {
-
-    add_result_callback(function() {
-        clearBonding(REMOTE_DEVICE_ADDRESS);
-    });
-
-    onSocketConnect = t.step_func(function (socket) {
-        socket.onmessage = t.step_func(function () {
-            retValue = socket.readData();
-            assert_type(retValue, "array", "readData of socket returns wrong type");
-            assert_array_equals(retValue, [84, 101, 115, 116], "readData of socket returns wrong value");
-            socket.close();
-
-            t.done();
-        });
-    });
-
-    onSocketConnectedError = t.step_func(function (e) {
-        assert_unreached("onSocketConnectedError exception:" + e.message);
-    });
-
-    gotDeviceInfo  = t.step_func(function (device) {
-        if (device !== null && device.uuids.indexOf(CHAT_SERVICE_UUID) !== -1) {
-            device.connectToServiceByUUID(CHAT_SERVICE_UUID, onSocketConnect, onSocketConnectedError);
-        } else {
-            assert_unreached("Exception. reason:  device.uuids.indexOf(CHAT_SERVICE_UUID) = " +
-                device.uuids.indexOf(CHAT_SERVICE_UUID) + " device = " + device );
-        }
-    });
-
-    gotDeviceError = t.step_func(function (e) {
-        assert_unreached("gotDeviceError exception:" + e.message);
-    });
-
-    onBondingSuccess = t.step_func(function () {
-        adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);
-    });
-
-    onBondingError = t.step_func(function (e) {
-        assert_unreached("onBondingError exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+  this list of conditions and the following disclaimer in the documentation\r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+  may be used to endorse or promote products derived from this work without\r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothSocket_readData</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothSocket_readData\r
+//==== LABEL Check if readData method correct, after sending nothing\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:readData M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.\r
+//==== TEST_CRITERIA MNA MR\r
+\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), onSocketConnect, retValue = null,\r
+    onSocketConnectedError, gotDeviceInfo, gotDeviceError, onBondingSuccess, onBondingError, powerOnSuccess;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      add_result_callback(function () {\r
+            clearBonding(REMOTE_DEVICE_ADDRESS);\r
+        });\r
+\r
+        onSocketConnect = t.step_func(function (socket) {\r
+            socket.onmessage = t.step_func(function () {\r
+                retValue = socket.readData();\r
+                assert_type(retValue, "array", "readData of socket returns wrong type");\r
+                assert_array_equals(retValue, [84, 101, 115, 116], "readData of socket returns wrong value");\r
+                socket.close();\r
+\r
+                t.done();\r
+            });\r
+        });\r
+\r
+        onSocketConnectedError = t.step_func(function (e) {\r
+            assert_unreached("onSocketConnectedError exception:" + e.message);\r
+        });\r
+\r
+        gotDeviceInfo = t.step_func(function (device) {\r
+            if (device !== null && device.uuids.indexOf(CHAT_SERVICE_UUID) !== -1) {\r
+                device.connectToServiceByUUID(CHAT_SERVICE_UUID, onSocketConnect, onSocketConnectedError);\r
+            } else {\r
+                assert_unreached("Exception. reason:  device.uuids.indexOf(CHAT_SERVICE_UUID) = " +\r
+                    device.uuids.indexOf(CHAT_SERVICE_UUID) + " device = " + device);\r
+            }\r
+        });\r
+\r
+        gotDeviceError = t.step_func(function (e) {\r
+            assert_unreached("gotDeviceError exception:" + e.message);\r
+        });\r
+\r
+        onBondingSuccess = t.step_func(function () {\r
+            adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);\r
+        });\r
+\r
+        onBondingError = t.step_func(function (e) {\r
+            assert_unreached("onBondingError exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index a4d53ac08a54eb0b445e4cdc2a838221a9efecf2..87f66bf0b5ead052f0c3b82034b1617634c428ef 100755 (executable)
@@ -1,94 +1,98 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
-  of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
-  may be used to endorse or promote products derived from this work without
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
-        Lei, ZhanX <zhanx.lei@intel.com>
-        Lukasz Bardeli <l.bardeli@samsung.com>
-        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
--->
-<html>
-<head>
-<title>BluetoothSocket_writeData</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothSocket_writeData
-//==== LABEL Check if writeData method work successfully
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:writeData M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.
-//==== TEST_CRITERIA MMINA MR
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}), onSocketConnect, onSocketError, onBondingSuccess,
-    onBondingError, powerOnSuccess, textmsg = "Test", sendtextmsg = [], byteData, i;
-t.step(function () {
-
-    add_result_callback(function() {
-        clearBonding(REMOTE_DEVICE_ADDRESS);
-    });
-
-    onSocketConnect = t.step_func(function (socket) {
-
-        for (i = 0; i  < textmsg.length; i ++) {
-            sendtextmsg[i] = textmsg.charCodeAt(i);
-        }
-        byteData = socket.writeData (sendtextmsg);
-        assert_equals(byteData, textmsg.length, "socket writeData is byteData: " + byteData + " should be " + textmsg.length);
-        socket.close();
-        t.done();
-    });
-
-    onSocketError = t.step_func(function (e) {
-        assert_unreached("onSocketError exception:" + e.message);
-    });
-
-    onBondingSuccess = t.step_func(function (device) {
-        device.connectToServiceByUUID(CHAT_SERVICE_UUID, onSocketConnect, onSocketError);
-    });
-
-    onBondingError = t.step_func(function (e) {
-        assert_unreached("onBondingError exception:" + e.message);
-    });
-
-    powerOnSuccess = t.step_func(function () {
-        adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+  of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+  this list of conditions and the following disclaimer in the documentation\r
+  and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+  may be used to endorse or promote products derived from this work without\r
+  specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothSocket_writeData</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothSocket_writeData\r
+//==== LABEL Check if writeData method work successfully\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:writeData M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.\r
+//==== TEST_CRITERIA MMINA MR\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), onSocketConnect, onSocketError, onBondingSuccess,\r
+    onBondingError, powerOnSuccess, textmsg = "Test", sendtextmsg = [], byteData, i;\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      add_result_callback(function () {\r
+            clearBonding(REMOTE_DEVICE_ADDRESS);\r
+        });\r
+\r
+        onSocketConnect = t.step_func(function (socket) {\r
+\r
+            for (i = 0; i < textmsg.length; i++) {\r
+                sendtextmsg[i] = textmsg.charCodeAt(i);\r
+            }\r
+            byteData = socket.writeData(sendtextmsg);\r
+            assert_equals(byteData, textmsg.length, "socket writeData is byteData: " + byteData + " should be " + textmsg.length);\r
+            socket.close();\r
+            t.done();\r
+        });\r
+\r
+        onSocketError = t.step_func(function (e) {\r
+            assert_unreached("onSocketError exception:" + e.message);\r
+        });\r
+\r
+        onBondingSuccess = t.step_func(function (device) {\r
+            device.connectToServiceByUUID(CHAT_SERVICE_UUID, onSocketConnect, onSocketError);\r
+        });\r
+\r
+        onBondingError = t.step_func(function (e) {\r
+            assert_unreached("onBondingError exception:" + e.message);\r
+        });\r
+\r
+        powerOnSuccess = t.step_func(function () {\r
+            adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        setPowered(t, adapter, powerOnSuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index a62dd5ca090384a01da3ee99e39ef0a6afbdcc12..c0a80f03c8f551f3ca6ec6198871c13689913aa3 100755 (executable)
@@ -1,71 +1,75 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-        Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>Bluetooth_discoverDevices_successCallback_invalidcb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: Bluetooth_discoverDevices_successCallback_invalidcb
-//==== LABEL Check BluetoothDiscoverDevicesSuccessCallback() callback with invalid callback
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTL
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
-    exceptionName, incorrectListeners, i,
-    stopDiscoverySuccess, discoverDevicesErrorCB, invalidCallback;
-
-t.step(function () {
-
-    discoverDevicesErrorCB = t.step_func(function (e) {
-        assert_unreached("discoverDevicesErrorCB exception:" + e.message);
-    });
-
-    stopDiscoverySuccess = t.step_func(function () {
-        incorrectListeners = getListenerConversionExceptions(["onstarted", "ondevicefound", "ondevicedisappeared", "onfinished"]);
-        for(i = 0; i < incorrectListeners.length; i++) {
-            invalidCallback  = incorrectListeners[i][0];
-            exceptionName = incorrectListeners[i][1];
-            assert_throws({name: exceptionName},
-                function () {
-                    adapter.discoverDevices(invalidCallback, discoverDevicesErrorCB);
-                }, exceptionName + " should be thrown - given incorrect successCallback.");
-        }
-        t.done();
-    });
-
-    adapter = tizen.bluetooth.getDefaultAdapter();
-    stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Bluetooth_discoverDevices_successCallback_invalidcb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Bluetooth_discoverDevices_successCallback_invalidcb\r
+//==== LABEL Check BluetoothDiscoverDevicesSuccessCallback() callback with invalid callback\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTL\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+    exceptionName, incorrectListeners, i,\r
+    stopDiscoverySuccess, discoverDevicesErrorCB, invalidCallback;\r
+\r
+t.step(function () {\r
+    if (BT_SUPPORT) { // network.bluetooth support\r
+      discoverDevicesErrorCB = t.step_func(function (e) {\r
+            assert_unreached("discoverDevicesErrorCB exception:" + e.message);\r
+        });\r
+\r
+        stopDiscoverySuccess = t.step_func(function () {\r
+            incorrectListeners = getListenerConversionExceptions(["onstarted", "ondevicefound", "ondevicedisappeared", "onfinished"]);\r
+            for (i = 0; i < incorrectListeners.length; i++) {\r
+                invalidCallback = incorrectListeners[i][0];\r
+                exceptionName = incorrectListeners[i][1];\r
+                assert_throws({ name: exceptionName },\r
+                    function () {\r
+                        adapter.discoverDevices(invalidCallback, discoverDevicesErrorCB);\r
+                    }, exceptionName + " should be thrown - given incorrect successCallback.");\r
+            }\r
+            t.done();\r
+        });\r
+\r
+        adapter = tizen.bluetooth.getDefaultAdapter();\r
+        stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+    } else {\r
+        t.done();\r
+    }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
index 7eb7a611d07005f4e132aa812eef33937ca35c2e..71fe8d9ac9ee43d8aa4db610e4a8a6954eda115c 100755 (executable)
@@ -1,43 +1,47 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>ReadValueSuccessCallback_notexist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: ReadValueSuccessCallback_notexist
-//==== LABEL Check if interface ReadValueSuccessCallback exists,it should not
-//==== SPEC Tizen Web API:TBD:Bluetooth:ReadValueSuccessCallback:ReadValueSuccessCallback U
-//==== SPEC_URL TBD
-//==== PRIORITY P3
-//==== TEST_CRITERIA CBNIO
-
-test(function () {
-    check_no_interface_object("ReadValueSuccessCallback");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>ReadValueSuccessCallback_notexist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: ReadValueSuccessCallback_notexist\r
+//==== LABEL Check if interface ReadValueSuccessCallback exists,it should not\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:ReadValueSuccessCallback:ReadValueSuccessCallback U\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P3\r
+//==== TEST_CRITERIA CBNIO\r
+\r
+test(function () {\r
+    if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+        check_no_interface_object("ReadValueSuccessCallback");\r
+\r
+    }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index c907497457d95d6aa3ec82c26cc089931f366082..898595d7a8fd3fa9f13040104a6b33598977bd44 100755 (executable)
@@ -1,96 +1,96 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>ReadValueSuccessCallback_onread</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: ReadValueSuccessCallback_onread
-//==== LABEL Check if ReadValueSuccessCallback onread is called and if its arguments have proper type
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:ReadValueSuccessCallback:onread M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA CBOA CBT
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service,
-    onconnected, onerror, characteristic, descriptor, ReadValueSuccessCallback, ReadValueErrorCallback, retVal = null,
-    WriteValueSuccessCallback, WriteValueErrorCallback, data = new Array(1, 2, 3, 4, 5, 6), device = null, flag = false;
-
-t.step(function () {
-    ReadValueSuccessCallback = t.step_func(function (value) {
-        assert_type(value, "array", "foundDevice isn't an array");
-        device.disconnect();
-        t.done();
-    });
-
-    ReadValueErrorCallback = t.step_func(function (error) {
-        assert_unreached("readValue() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    onconnected = t.step_func(function () {
-        service = device.getService(device.uuids[0]);
-       var descFlag = false;
-        for (i = 0; i < service.characteristics.length; i++) {
-            characteristic = service.characteristics[i];
-            if (descFlag == false && characteristic != undefined) {
-                characteristic.readValue(ReadValueSuccessCallback, ReadValueErrorCallback);
-                descFlag = true;
-            }
-        }
-    });
-
-    onerror = t.step_func(function (error) {
-        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    bleScanSuccessCallback = t.step_func(function (bledevice) {
-        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-            adapter.stopScan();
-            device = bledevice;
-            if (flag == false) {
-                device.connect(onconnected, onerror);
-                flag = true;
-            }
-        }
-    });
-
-    bleScanErrorCallback = t.step_func(function (error) {
-        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    adapter = tizen.bluetooth.getLEAdapter();
-    adapter.stopScan();
-    adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>ReadValueSuccessCallback_onread</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: ReadValueSuccessCallback_onread\r
+//==== LABEL Check if ReadValueSuccessCallback onread is called and if its arguments have proper type\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:ReadValueSuccessCallback:onread M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA CBOA CBT\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service,\r
+    onconnected, onerror, characteristic, descriptor, ReadValueSuccessCallback, ReadValueErrorCallback, retVal = null,\r
+    WriteValueSuccessCallback, WriteValueErrorCallback, data = new Array(1, 2, 3, 4, 5, 6), device = null, flag = false;\r
+\r
+t.step(function () {\r
+    ReadValueSuccessCallback = t.step_func(function (value) {\r
+        assert_type(value, "array", "foundDevice isn't an array");\r
+        device.disconnect();\r
+        t.done();\r
+    });\r
+\r
+    ReadValueErrorCallback = t.step_func(function (error) {\r
+        assert_unreached("readValue() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    onconnected = t.step_func(function () {\r
+        service = device.getService(device.uuids[0]);\r
+       var descFlag = false;\r
+        for (i = 0; i < service.characteristics.length; i++) {\r
+            characteristic = service.characteristics[i];\r
+            if (descFlag == false && characteristic != undefined) {\r
+                characteristic.readValue(ReadValueSuccessCallback, ReadValueErrorCallback);\r
+                descFlag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    onerror = t.step_func(function (error) {\r
+        assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+        if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+            adapter.stopScan();\r
+            device = bledevice;\r
+            if (flag == false) {\r
+                device.connect(onconnected, onerror);\r
+                flag = true;\r
+            }\r
+        }\r
+    });\r
+\r
+    bleScanErrorCallback = t.step_func(function (error) {\r
+        assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    adapter = tizen.bluetooth.getLEAdapter();\r
+    adapter.stopScan();\r
+    adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
 </html>
\ No newline at end of file
index 40e77148b3898b3f9df06618d3eb9129c4b8204b..20fcfe78be18a02a8ccb6e36d0b6e258c486b7f4 100755 (executable)
-/*
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-
- */
-
-
-MIN_BYTE = -128;
-MAX_BYTE = 127;
-MIN_OCTET = 0;
-MAX_OCTET = 255;
-MIN_SHORT = -32768;
-MAX_SHORT = 32767;
-MIN_UNSIGNED_SHORT = 0;
-MAX_UNSIGNED_SHORT = 65535;
-MIN_LONG = -2147483648;
-MAX_LONG = 2147483647;
-MIN_UNSIGNED_LONG = 0;
-MAX_UNSIGNED_LONG = 4294967295;
-MIN_LONG_LONG = -9223372036854775808;
-MAX_LONG_LONG = 9223372036854775807;
-MIN_UNSIGNED_LONG_LONG = 0;
-MAX_UNSIGNED_LONG_LONG = 18446744073709551615;
-
-TYPE_MISMATCH_EXCEPTION = {name: 'TypeMismatchError'};
-NOT_FOUND_EXCEPTION = {name: 'NotFoundError'};
-INVALID_VALUES_EXCEPTION = {name: 'InvalidValuesError'};
-IO_EXCEPTION = {name: 'IOError'};
-SECURITY_EXCEPTION = {name: 'SecurityError'};
-
-
-(function () {
-   var head_src = document.head.innerHTML;
-   if (head_src.search(/\/testharness.js\W/) === -1) {
-       document.write('<script language="javascript" src="../resources/testharness.js"></script>\n');
-   }
-   if (head_src.search(/\/testharnessreport.js\W/) === -1) {
-       document.write('<script language="javascript" src="../resources/testharnessreport.js"></script>\n');
-   }
-})();
-
-var _registered_types = {};
-
-function _resolve_registered_type(type) {
-    while (type in _registered_types) {
-        type = _registered_types[type];
-    }
-    return type;
-}
-
-/**
- * Method checks extra argument for none argument method.
- * The only check is that method will not throw an exception.
- * Example usage:
- * checkExtraArgument(tizen.notification, "removeAll");
- *
- * @param object object
- * @param methodName string - name of the method
- */
-function checkExtraArgument(object, methodName) {
-    var extraArgument = [
-        null,
-        undefined,
-        "Tizen",
-        1,
-        false,
-        ["one", "two"],
-        {argument: 1},
-        function () {}
-    ], i;
-
-    for (i = 0; i < extraArgument.length; i++) {
-        object[methodName](extraArgument[i]);
-    }
-}
-
-/**
- * Method to validate conversion.
- * Example usage:
- *   conversionTable = getTypeConversionExceptions("functionObject", true);
- *   for(i = 0; i < conversionTable.length; i++) {
- *       errorCallback = conversionTable[i][0];
- *       exceptionName = conversionTable[i][1];
- *
- *       assert_throws({name : exceptionName},
- *       function () {
- *           tizen.systemsetting.setProperty("HOME_SCREEN",
- *               propertyValue, successCallback, errorCallback);
- *       }, exceptionName + " should be thrown - given incorrect errorCallback.");
- *   }
- *
- * @param conversionType
- * @param isOptional
- * @returns table of tables which contain value (index 0) and exceptionName (index 1)
- *
- */
-function getTypeConversionExceptions(conversionType, isOptional, isNullable) {
-    var exceptionName = "TypeMismatchError",
-        conversionTable;
-    switch (conversionType) {
-        case "enum":
-            if(isNullable == true) {
-                conversionTable = [
-                    [undefined, exceptionName],
-                    [0, exceptionName],
-                    [true, exceptionName],
-                    ["dummyInvalidEnumValue", exceptionName],
-                    [{ }, exceptionName]
-                ];
-            } else {
-                conversionTable = [
-                    [undefined, exceptionName],
-                    [null, exceptionName],
-                    [0, exceptionName],
-                    [true, exceptionName],
-                    ["dummyInvalidEnumValue", exceptionName],
-                    [{ }, exceptionName]
-                ];
-            }
-            break;
-        case "double":
-            conversionTable = [
-                [undefined, exceptionName],
-                [NaN, exceptionName],
-                [Number.POSITIVE_INFINITY, exceptionName],
-                [Number.NEGATIVE_INFINITY, exceptionName],
-                ["TIZEN", exceptionName],
-                [{ name : "TIZEN" }, exceptionName],
-                [function () { }, exceptionName]
-            ];
-            break;
-        case "object":
-            conversionTable = [
-                [true, exceptionName],
-                [false, exceptionName],
-                [NaN, exceptionName],
-                [0, exceptionName],
-                ["", exceptionName],
-                ["TIZEN", exceptionName],
-                [undefined, exceptionName]
-            ];
-            if (!isOptional) {
-                conversionTable.push([null, exceptionName]);
-            }
-            break;
-        case "functionObject":
-            conversionTable = [
-                [true, exceptionName],
-                [false, exceptionName],
-                [NaN, exceptionName],
-                [0, exceptionName],
-                ["", exceptionName],
-                ["TIZEN", exceptionName],
-                [[], exceptionName],
-                [{ }, exceptionName],
-                [undefined, exceptionName]
-            ];
-            if (!isOptional) {
-                conversionTable.push([null, exceptionName]);
-            }
-            break;
-        case "array":
-            conversionTable = [
-                [true, exceptionName],
-                [false, exceptionName],
-                [NaN, exceptionName],
-                [0, exceptionName],
-                ["", exceptionName],
-                ["TIZEN", exceptionName],
-                [{ }, exceptionName],
-                [function () { }, exceptionName],
-                [undefined, exceptionName]
-            ];
-            if (!isOptional) {
-                conversionTable.push([null, exceptionName]);
-            }
-            break;
-        case "dictionary":
-            conversionTable = [
-                [true, exceptionName],
-                [false, exceptionName],
-                [NaN, exceptionName],
-                [0, exceptionName],
-                ["", exceptionName],
-                ["TIZEN", exceptionName],
-                [undefined, exceptionName]
-            ];
-            break;
-      /* Add by SRC_Xian  strat  */
-
-        case "boolean":
-            conversionTable = [
-                [NaN, exceptionName],
-                [0, exceptionName],
-                ["", exceptionName],
-                ["TIZEN", exceptionName],
-                [undefined, exceptionName]
-            ];
-
-      /*  Add by SRC_Xian  end  */
-
-            if (!isOptional) {
-                conversionTable.push([null, exceptionName]);
-            }
-            break;
-        default:
-            assert_unreached("Fix your test. Wrong conversionType '" + conversionType + "'.");
-    };
-
-    return conversionTable;
-}
-
-
-function assert_type(obj, type, description) {
-    var org_type = type, prop_name, prop_type, prop_value;
-
-    type = _resolve_registered_type(type);
-
-    if (typeof (type) === 'string') {
-        type = type.toLowerCase();
-        switch (type) {
-            case 'object':
-            case 'string':
-            case 'number':
-            case 'function':
-            case 'boolean':
-            case 'undefined':
-            case 'xml':
-                assert_equals(typeof (obj), type, description);
-                break;
-            case 'null':
-                assert_true(obj === null, description);
-                break;
-            case 'array':
-                assert_true(Array.isArray(obj), description);
-                break;
-            case 'date':
-                assert_true(obj instanceof Date, description);
-                break;
-            case 'byte':
-                assert_equals(typeof (obj), 'number', description);
-                assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
-                assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
-                assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
-                break;
-            case 'octet':
-                assert_equals(typeof (obj), 'number', description);
-                assert_greater_than_equal(obj, MIN_OCTET, description + " - value too low.");
-                assert_less_than_equal(obj, MAX_OCTET, description + " - value too high.");
-                assert_equals(obj % 1, 0, description + " - value is not an integer.");
-                break;
-            case 'short':
-                assert_equals(typeof (obj), 'number', description);
-                assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
-                assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
-                assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
-                break;
-            case 'unsigned short':
-                assert_equals(typeof (obj), 'number', description);
-                assert_greater_than_equal(obj, MIN_UNSIGNED_SHORT, description + " - value too low.");
-                assert_less_than_equal(obj, MAX_UNSIGNED_SHORT, description + " - value too high.");
-                assert_equals(obj % 1, 0, description + " - value is not an integer.");
-                break;
-            case 'long':
-                assert_equals(typeof (obj), 'number', description);
-                assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
-                assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
-                assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
-                break;
-            case 'unsigned long':
-                assert_equals(typeof (obj), 'number', description);
-                assert_greater_than_equal(obj, MIN_UNSIGNED_LONG, description + " - value too low.");
-                assert_less_than_equal(obj, MAX_UNSIGNED_LONG, description + " - value too high.");
-                assert_equals(obj % 1, 0, description + " - value is not an integer.");
-                break;
-            case 'long long':
-                assert_equals(typeof (obj), 'number', description);
-                assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
-                assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
-                assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
-                break;
-            case 'unsigned long long':
-                assert_equals(typeof (obj), 'number', description);
-                assert_greater_than_equal(obj, MIN_UNSIGNED_LONG_LONG, description + " - value too low.");
-                assert_less_than_equal(obj, MAX_UNSIGNED_LONG_LONG, description + " - value too high.");
-                assert_equals(obj % 1, 0, description + " - value is not an integer.");
-                break;
-            case 'double':
-                assert_equals(typeof (obj), 'number', description);
-                break;
-            default:
-                assert_unreached('Fix your test. Wrong type \'' + org_type + '\'');
-        }
-    } else if (typeof (type) === 'function') {
-        assert_true(obj instanceof type, description);
-    } else if (typeof (type) === 'object') {
-        for (prop_name in type) {
-            prop_type = type[prop_name];
-            if (prop_type === 'function') {
-                assert_inherits(obj, prop_name);
-                assert_equals(typeof obj[prop_name], prop_type, 'Object should have method ' + prop_name);
-            } else {
-                assert_own_property(obj, prop_name);
-            }
-        }
-    } else {
-        assert_unreached('Fix your test. Wrong type ' + org_type);
-    }
-}
-
-function register_type(alias, type_spec) {
-    _registered_types[alias] = type_spec;
-}
-
-/**
- * Method to check if attribute is const.
- * Example usage:
- * check_const(tizen.bluetooth.deviceMinor, 'TOY_DOLL', 0x03, 'number', 0x29B);
- *
- * @param obj  object to test which  has const attribute
- * @param attributeName attribute name.
- * @param expectedValue expected value of provided attribute name
- * @param expectedType expected type of provided attribute name
- * @param valueToAssign value to assign in order to check if attribute value can be modified
- */
-function check_const(obj, attributeName, expectedValue, expectedType, valueToAssign) {
-    var tmp;
-    if (expectedValue === valueToAssign) {
-        assert_unreached("Fix your test. The same values given for "  + attributeName +
-            " in 'value' and 'valueToSet' arguments.");
-    }
-    if (typeof (attributeName) === "string") {
-        assert_true(attributeName in obj, "Name " + attributeName + " doesn't exist in provided object.");
-        assert_equals(obj[attributeName], expectedValue, "Value of " + attributeName + " is diffrent.");
-        if (typeof (expectedType) !== "undefined") {
-            if (expectedValue === null) {
-                assert_type(obj[attributeName], "object", "Type of " + attributeName + " is different.");
-            } else {
-                assert_type(obj[attributeName], expectedType, "Type of " + attributeName + " is different.");
-            }
-        } else {
-            assert_unreached("Fix your test. Wrong type " + expectedType);
-        }
-        tmp = obj[attributeName];
-        obj[attributeName] = valueToAssign;
-        assert_equals(obj[attributeName], tmp, attributeName + " can be modified.");
-    } else {
-        assert_unreached("Fix your test. Wrong type of name " + typeof (attributeName));
-    }
-}
-
-/**
- * Method to check if attribute is readonly.
- * Example usage:
- * check_readonly(statusNotification, "postedTime", null, 'object', new Date());
- *
- * @param obj  object to test which  has readonly attribute
- * @param attributeName attribute name.
- * @param expectedValue expected value of provided attribute name
- * @param expectedType expected type of provided attribute name
- * @param valueToAssign value to assign in order to check if attribute value can be modified
- */
-function check_readonly(obj, attributeName, expectedValue, expectedType, valueToAssign) {
-    check_const(obj, attributeName, expectedValue, expectedType, valueToAssign);
-}
-
-/**
- * Method to check if attribute can be set to null.
- * Example usage:
- * check_not_nullable(syncInfo, "mode");
- *
- * @param obj object to test which has not nullable attribute
- * @param attributeName attribute name.
- */
-function check_not_nullable(obj, attributeName)
-{   var old_value = obj[attributeName];
-    obj[attributeName] = null;
-    assert_not_equals(obj[attributeName], null, "Attribute " + attributeName + " can be set to null.");
-    obj[attributeName] = old_value;
-}
-
-/**
- * Method to check NoInterfaceObject
- * Example usage:
- * check_no_interface_object("BluetoothAdapter")
- *
- * @param interfaceName interface name
- */
-function check_no_interface_object(interfaceName) {
-    assert_throws({name: "TypeError"}, function () {
-        tizen[interfaceName]();
-    },"Wrong call as a function");
-    assert_throws({name: "TypeError"}, function () {
-        new tizen[interfaceName]();
-    },"Wrong call as a new function");
-    assert_throws({name: "TypeError"}, function () {
-        ({}) instanceof tizen[interfaceName];
-    },"instanceof exception");
-    assert_equals(tizen[interfaceName], undefined, interfaceName + " is not undefined.");
-}
-
-
-/**
- * Method to check Constructors
- * Example usage:
- * check_constructor("BluetoothAdapter")
- *
- * @param constructorName constructor name
- */
-
-function check_constructor(constructorName) {
-    assert_true(constructorName in tizen, "No " + constructorName + " in tizen.");
-    assert_false({} instanceof tizen[constructorName],"Custom object is not instance of " + constructorName);
-    assert_throws({
-        name: "TypeError"
-    }, function () {
-        tizen[constructorName]();
-    }, "Constructor called as function.");
-}
-
-/**
- * Method to check if given method can be overridden in a given object - (TEMPORARY REMOVED).
- * That method also checks if given method exists in a given object.
- * Example usage:
- * check_method_exists(tizen.notification, "get");
- *
- * @param obj object with method
- * @param methodName name of the method to check.
- */
-function check_method_exists(obj, methodName) {
-    assert_type(obj[methodName], 'function', "Method does not exist.");
-}
-
-/**
- * Method to check extensibility of given object.
- * Method checks if new attribute and method can be added.
- * Example usage:
- * check_extensibility(tizen.notification);
- *
- * @param obj object to check
- */
-function check_extensibility(obj) {
-    var dummyAttribute = "dummyAttributeValue", dummyMethodResult = "dummyMethodResultValue";
-    obj.newDummyMethod = function() {
-        return dummyMethodResult;
-    }
-    assert_equals(obj.newDummyMethod(), dummyMethodResult, "Incorrect result from added method.");
-
-    obj.newDummyAttribute = dummyAttribute;
-    assert_equals(obj.newDummyAttribute, dummyAttribute, "Incorrect result from added attribute.");
-}
-
-/**
- * Method to check if attribute can be modify.
- * Example usage:
- * check_attr(downloadRequest, "fileName", default_val, "string", "file_name.html");
- *
- * @param obj  object to test which has not readonly attribute
- * @param attributeName attribute name.
- * @param expectedValue expected value of provided attribute name
- * @param expectedType expected type of provided attribute name
- * @param valueToAssign value to assign in order to check if attribute value can be modified
- */
-function check_attribute(obj, attributeName, expectedValue, expectedType, valueToAssign) {
-    if (expectedValue === valueToAssign) {
-        assert_unreached("Fix your test. The same values given for "  + attributeName +
-            " in 'value' and 'valueToSet' arguments.");
-    }
-    if (typeof (attributeName) === "string") {
-        assert_true(attributeName in obj, "Name " + attributeName + " doesn't exist in provided object.");
-        assert_equals(obj[attributeName], expectedValue, "Value of " + attributeName + " is diffrent.");
-        if (typeof (expectedType) !== "undefined") {
-            if (expectedValue === null) {
-                assert_type(obj[attributeName], "object", "Type of " + attributeName + " is different.");
-            } else {
-                assert_type(obj[attributeName], expectedType, "Type of " + attributeName + " is different.");
-            }
-        } else {
-            assert_unreached("Fix your test. Wrong type " + expectedType);
-        }
-        obj[attributeName] = valueToAssign;
-        assert_equals(obj[attributeName], valueToAssign, attributeName + " can be modified.");
-    } else {
-        assert_unreached("Fix your test. Wrong type of name " + typeof (attributeName));
-    }
-}
-
-/**
- * Method to check if whole array can be overwritten with an invalid value.
- * Sample usage:
- * check_invalid_array_assignments(message, "to", false);
- *
- * @param obj object which has the array as its property
- * @param array name of the array to check
- * @param isNullable indicates if the array can be null
- */
-function check_invalid_array_assignments(obj, array, isNullable) {
-    var args = [undefined, true, false, NaN, 0, "TIZEN", {}, function () {}],
-        val = obj[array], i;
-
-    if (!isNullable) {
-        obj[array] = null;
-        assert_not_equals(obj[array], null, "Non-nullable array was set to null");
-        assert_type(obj[array], "array", "Non-nullable array type changed after assigning null");
-        assert_equals(obj[array].toString(), val.toString(), "Non-nullable array contents changed after assigning null");
-    }
-
-    for (i = 0 ; i < args.length ; i++) {
-        obj[array] = args[i];
-        assert_type(obj[array], "array", "Array type changed after assigning an invalid value");
-        assert_equals(obj[array].toString(), val.toString(), "Array contents changed after assigning an invalid value");
-    }
-}
-
-/**
- * Method to check if an object can be overwritten with an invalid value.
- * Sample usage:
- * check_invalid_object_assignments(message, "body", false);
- *
- * @param parentObj object which has the 'obj' object as its property
- * @param obj name of the object to check
- * @param isNullable indicates if the object can be null
- */
-function check_invalid_obj_assignments(parentObj, obj, isNullable) {
-    var args = [undefined, true, false, NaN, 0, "TIZEN", function () {}],
-        val = parentObj[obj], i;
-
-    if (!isNullable) {
-        parentObj[obj] = null;
-        assert_equals(parentObj[obj], val, "Non-nullable obj was modified after assigning null");
-    }
-
-    for (i = 0 ; i < args.length ; i++) {
-        parentObj[obj] = args[i];
-        assert_equals(parentObj[obj], val, "The object was set to " + args[i]);
-    }
-}
-
-/**
- * Method to validate conversion for listeners.
- * Example usage:
- * incorrectListeners = getListenerConversionExceptions(["oninstalled", "onupdated", "onuninstalled"]);
- * for(i = 0; i < incorrectListeners.length; i++) {
- *     packageInformationEventCallback  = incorrectListeners[i][0];
- *     exceptionName = incorrectListeners[i][1];
- *     assert_throws({name : exceptionName},
- *        function () {
- *             tizen.package.setPackageInfoEventListener(packageInformationEventCallback);
- *         }, exceptionName + " should be thrown - given incorrect successCallback.");
- * }
- *
- *
- * @param callbackNames Array with names
- * @returns {Array} table of tables which contain incorrect listener (index 0) and exceptionName (index 1)
- *
- */
-function getListenerConversionExceptions(callbackNames) {
-    var result = [], conversionTable, i, j, listenerName;
-    conversionTable = getTypeConversionExceptions("functionObject", false);
-
-    for (i = 0; i < callbackNames.length; i++) {
-        for (j = 0; j < conversionTable.length; j++) {
-            listenerName = {};
-            listenerName[callbackNames[i]] = conversionTable[j][0];
-            result.push([listenerName, conversionTable[j][1]]);
-        }
-    }
-
-    return result;
-}
+/*\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+\r
+ */\r
+\r
+\r
+MIN_BYTE = -128;\r
+MAX_BYTE = 127;\r
+MIN_OCTET = 0;\r
+MAX_OCTET = 255;\r
+MIN_SHORT = -32768;\r
+MAX_SHORT = 32767;\r
+MIN_UNSIGNED_SHORT = 0;\r
+MAX_UNSIGNED_SHORT = 65535;\r
+MIN_LONG = -2147483648;\r
+MAX_LONG = 2147483647;\r
+MIN_UNSIGNED_LONG = 0;\r
+MAX_UNSIGNED_LONG = 4294967295;\r
+MIN_LONG_LONG = -9223372036854775808;\r
+MAX_LONG_LONG = 9223372036854775807;\r
+MIN_UNSIGNED_LONG_LONG = 0;\r
+MAX_UNSIGNED_LONG_LONG = 18446744073709551615;\r
+\r
+TYPE_MISMATCH_EXCEPTION = {name: 'TypeMismatchError'};\r
+NOT_FOUND_EXCEPTION = {name: 'NotFoundError'};\r
+INVALID_VALUES_EXCEPTION = {name: 'InvalidValuesError'};\r
+IO_EXCEPTION = {name: 'IOError'};\r
+SECURITY_EXCEPTION = {name: 'SecurityError'};\r
+BT_SUPPORT = webapis.featureconfig.getFeatureConfigBool("com.samsung/featureconf/bluetooth.support");\r
+LE_SUPPORT = webapis.featureconfig.getFeatureConfigBool("com.samsung/featureconf/bluetooth_le_supported");\r
+LE_GATT_SUPPORT = webapis.featureconfig.getFeatureConfigBool("com.samsung/featureconf/bluetooth_le_gatt_client_supported");\r
+\r
+(function () {\r
+   var head_src = document.head.innerHTML;\r
+   if (head_src.search(/\/testharness.js\W/) === -1) {\r
+       document.write('<script language="javascript" src="../resources/testharness.js"></script>\n');\r
+   }\r
+   if (head_src.search(/\/testharnessreport.js\W/) === -1) {\r
+       document.write('<script language="javascript" src="../resources/testharnessreport.js"></script>\n');\r
+   }\r
+})();\r
+\r
+var _registered_types = {};\r
+\r
+function _resolve_registered_type(type) {\r
+    while (type in _registered_types) {\r
+        type = _registered_types[type];\r
+    }\r
+    return type;\r
+}\r
+\r
+/**\r
+ * Method checks extra argument for none argument method.\r
+ * The only check is that method will not throw an exception.\r
+ * Example usage:\r
+ * checkExtraArgument(tizen.notification, "removeAll");\r
+ *\r
+ * @param object object\r
+ * @param methodName string - name of the method\r
+ */\r
+function checkExtraArgument(object, methodName) {\r
+    var extraArgument = [\r
+        null,\r
+        undefined,\r
+        "Tizen",\r
+        1,\r
+        false,\r
+        ["one", "two"],\r
+        {argument: 1},\r
+        function () {}\r
+    ], i;\r
+\r
+    for (i = 0; i < extraArgument.length; i++) {\r
+        object[methodName](extraArgument[i]);\r
+    }\r
+}\r
+\r
+/**\r
+ * Method to validate conversion.\r
+ * Example usage:\r
+ *   conversionTable = getTypeConversionExceptions("functionObject", true);\r
+ *   for(i = 0; i < conversionTable.length; i++) {\r
+ *       errorCallback = conversionTable[i][0];\r
+ *       exceptionName = conversionTable[i][1];\r
+ *\r
+ *       assert_throws({name : exceptionName},\r
+ *       function () {\r
+ *           tizen.systemsetting.setProperty("HOME_SCREEN",\r
+ *               propertyValue, successCallback, errorCallback);\r
+ *       }, exceptionName + " should be thrown - given incorrect errorCallback.");\r
+ *   }\r
+ *\r
+ * @param conversionType\r
+ * @param isOptional\r
+ * @returns table of tables which contain value (index 0) and exceptionName (index 1)\r
+ *\r
+ */\r
+function getTypeConversionExceptions(conversionType, isOptional, isNullable) {\r
+    var exceptionName = "TypeMismatchError",\r
+        conversionTable;\r
+    switch (conversionType) {\r
+        case "enum":\r
+            if(isNullable == true) {\r
+                conversionTable = [\r
+                    [undefined, exceptionName],\r
+                    [0, exceptionName],\r
+                    [true, exceptionName],\r
+                    ["dummyInvalidEnumValue", exceptionName],\r
+                    [{ }, exceptionName]\r
+                ];\r
+            } else {\r
+                conversionTable = [\r
+                    [undefined, exceptionName],\r
+                    [null, exceptionName],\r
+                    [0, exceptionName],\r
+                    [true, exceptionName],\r
+                    ["dummyInvalidEnumValue", exceptionName],\r
+                    [{ }, exceptionName]\r
+                ];\r
+            }\r
+            break;\r
+        case "double":\r
+            conversionTable = [\r
+                [undefined, exceptionName],\r
+                [NaN, exceptionName],\r
+                [Number.POSITIVE_INFINITY, exceptionName],\r
+                [Number.NEGATIVE_INFINITY, exceptionName],\r
+                ["TIZEN", exceptionName],\r
+                [{ name : "TIZEN" }, exceptionName],\r
+                [function () { }, exceptionName]\r
+            ];\r
+            break;\r
+        case "object":\r
+            conversionTable = [\r
+                [true, exceptionName],\r
+                [false, exceptionName],\r
+                [NaN, exceptionName],\r
+                [0, exceptionName],\r
+                ["", exceptionName],\r
+                ["TIZEN", exceptionName],\r
+                [undefined, exceptionName]\r
+            ];\r
+            if (!isOptional) {\r
+                conversionTable.push([null, exceptionName]);\r
+            }\r
+            break;\r
+        case "functionObject":\r
+            conversionTable = [\r
+                [true, exceptionName],\r
+                [false, exceptionName],\r
+                [NaN, exceptionName],\r
+                [0, exceptionName],\r
+                ["", exceptionName],\r
+                ["TIZEN", exceptionName],\r
+                [[], exceptionName],\r
+                [{ }, exceptionName],\r
+                [undefined, exceptionName]\r
+            ];\r
+            if (!isOptional) {\r
+                conversionTable.push([null, exceptionName]);\r
+            }\r
+            break;\r
+        case "array":\r
+            conversionTable = [\r
+                [true, exceptionName],\r
+                [false, exceptionName],\r
+                [NaN, exceptionName],\r
+                [0, exceptionName],\r
+                ["", exceptionName],\r
+                ["TIZEN", exceptionName],\r
+                [{ }, exceptionName],\r
+                [function () { }, exceptionName],\r
+                [undefined, exceptionName]\r
+            ];\r
+            if (!isOptional) {\r
+                conversionTable.push([null, exceptionName]);\r
+            }\r
+            break;\r
+        case "dictionary":\r
+            conversionTable = [\r
+                [true, exceptionName],\r
+                [false, exceptionName],\r
+                [NaN, exceptionName],\r
+                [0, exceptionName],\r
+                ["", exceptionName],\r
+                ["TIZEN", exceptionName],\r
+                [undefined, exceptionName]\r
+            ];\r
+            break;\r
+      /* Add by SRC_Xian  strat  */\r
+\r
+        case "boolean":\r
+            conversionTable = [\r
+                [NaN, exceptionName],\r
+                [0, exceptionName],\r
+                ["", exceptionName],\r
+                ["TIZEN", exceptionName],\r
+                [undefined, exceptionName]\r
+            ];\r
+\r
+      /*  Add by SRC_Xian  end  */\r
+\r
+            if (!isOptional) {\r
+                conversionTable.push([null, exceptionName]);\r
+            }\r
+            break;\r
+        default:\r
+            assert_unreached("Fix your test. Wrong conversionType '" + conversionType + "'.");\r
+    };\r
+\r
+    return conversionTable;\r
+}\r
+\r
+\r
+function assert_type(obj, type, description) {\r
+    var org_type = type, prop_name, prop_type, prop_value;\r
+\r
+    type = _resolve_registered_type(type);\r
+\r
+    if (typeof (type) === 'string') {\r
+        type = type.toLowerCase();\r
+        switch (type) {\r
+            case 'object':\r
+            case 'string':\r
+            case 'number':\r
+            case 'function':\r
+            case 'boolean':\r
+            case 'undefined':\r
+            case 'xml':\r
+                assert_equals(typeof (obj), type, description);\r
+                break;\r
+            case 'null':\r
+                assert_true(obj === null, description);\r
+                break;\r
+            case 'array':\r
+                assert_true(Array.isArray(obj), description);\r
+                break;\r
+            case 'date':\r
+                assert_true(obj instanceof Date, description);\r
+                break;\r
+            case 'byte':\r
+                assert_equals(typeof (obj), 'number', description);\r
+                assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");\r
+                assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");\r
+                assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");\r
+                break;\r
+            case 'octet':\r
+                assert_equals(typeof (obj), 'number', description);\r
+                assert_greater_than_equal(obj, MIN_OCTET, description + " - value too low.");\r
+                assert_less_than_equal(obj, MAX_OCTET, description + " - value too high.");\r
+                assert_equals(obj % 1, 0, description + " - value is not an integer.");\r
+                break;\r
+            case 'short':\r
+                assert_equals(typeof (obj), 'number', description);\r
+                assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");\r
+                assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");\r
+                assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");\r
+                break;\r
+            case 'unsigned short':\r
+                assert_equals(typeof (obj), 'number', description);\r
+                assert_greater_than_equal(obj, MIN_UNSIGNED_SHORT, description + " - value too low.");\r
+                assert_less_than_equal(obj, MAX_UNSIGNED_SHORT, description + " - value too high.");\r
+                assert_equals(obj % 1, 0, description + " - value is not an integer.");\r
+                break;\r
+            case 'long':\r
+                assert_equals(typeof (obj), 'number', description);\r
+                assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");\r
+                assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");\r
+                assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");\r
+                break;\r
+            case 'unsigned long':\r
+                assert_equals(typeof (obj), 'number', description);\r
+                assert_greater_than_equal(obj, MIN_UNSIGNED_LONG, description + " - value too low.");\r
+                assert_less_than_equal(obj, MAX_UNSIGNED_LONG, description + " - value too high.");\r
+                assert_equals(obj % 1, 0, description + " - value is not an integer.");\r
+                break;\r
+            case 'long long':\r
+                assert_equals(typeof (obj), 'number', description);\r
+                assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");\r
+                assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");\r
+                assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");\r
+                break;\r
+            case 'unsigned long long':\r
+                assert_equals(typeof (obj), 'number', description);\r
+                assert_greater_than_equal(obj, MIN_UNSIGNED_LONG_LONG, description + " - value too low.");\r
+                assert_less_than_equal(obj, MAX_UNSIGNED_LONG_LONG, description + " - value too high.");\r
+                assert_equals(obj % 1, 0, description + " - value is not an integer.");\r
+                break;\r
+            case 'double':\r
+                assert_equals(typeof (obj), 'number', description);\r
+                break;\r
+            default:\r
+                assert_unreached('Fix your test. Wrong type \'' + org_type + '\'');\r
+        }\r
+    } else if (typeof (type) === 'function') {\r
+        assert_true(obj instanceof type, description);\r
+    } else if (typeof (type) === 'object') {\r
+        for (prop_name in type) {\r
+            prop_type = type[prop_name];\r
+            if (prop_type === 'function') {\r
+                assert_inherits(obj, prop_name);\r
+                assert_equals(typeof obj[prop_name], prop_type, 'Object should have method ' + prop_name);\r
+            } else {\r
+                assert_own_property(obj, prop_name);\r
+            }\r
+        }\r
+    } else {\r
+        assert_unreached('Fix your test. Wrong type ' + org_type);\r
+    }\r
+}\r
+\r
+function register_type(alias, type_spec) {\r
+    _registered_types[alias] = type_spec;\r
+}\r
+\r
+/**\r
+ * Method to check if attribute is const.\r
+ * Example usage:\r
+ * check_const(tizen.bluetooth.deviceMinor, 'TOY_DOLL', 0x03, 'number', 0x29B);\r
+ *\r
+ * @param obj  object to test which  has const attribute\r
+ * @param attributeName attribute name.\r
+ * @param expectedValue expected value of provided attribute name\r
+ * @param expectedType expected type of provided attribute name\r
+ * @param valueToAssign value to assign in order to check if attribute value can be modified\r
+ */\r
+function check_const(obj, attributeName, expectedValue, expectedType, valueToAssign) {\r
+    var tmp;\r
+    if (expectedValue === valueToAssign) {\r
+        assert_unreached("Fix your test. The same values given for "  + attributeName +\r
+            " in 'value' and 'valueToSet' arguments.");\r
+    }\r
+    if (typeof (attributeName) === "string") {\r
+        assert_true(attributeName in obj, "Name " + attributeName + " doesn't exist in provided object.");\r
+        assert_equals(obj[attributeName], expectedValue, "Value of " + attributeName + " is diffrent.");\r
+        if (typeof (expectedType) !== "undefined") {\r
+            if (expectedValue === null) {\r
+                assert_type(obj[attributeName], "object", "Type of " + attributeName + " is different.");\r
+            } else {\r
+                assert_type(obj[attributeName], expectedType, "Type of " + attributeName + " is different.");\r
+            }\r
+        } else {\r
+            assert_unreached("Fix your test. Wrong type " + expectedType);\r
+        }\r
+        tmp = obj[attributeName];\r
+        obj[attributeName] = valueToAssign;\r
+        assert_equals(obj[attributeName], tmp, attributeName + " can be modified.");\r
+    } else {\r
+        assert_unreached("Fix your test. Wrong type of name " + typeof (attributeName));\r
+    }\r
+}\r
+\r
+/**\r
+ * Method to check if attribute is readonly.\r
+ * Example usage:\r
+ * check_readonly(statusNotification, "postedTime", null, 'object', new Date());\r
+ *\r
+ * @param obj  object to test which  has readonly attribute\r
+ * @param attributeName attribute name.\r
+ * @param expectedValue expected value of provided attribute name\r
+ * @param expectedType expected type of provided attribute name\r
+ * @param valueToAssign value to assign in order to check if attribute value can be modified\r
+ */\r
+function check_readonly(obj, attributeName, expectedValue, expectedType, valueToAssign) {\r
+    check_const(obj, attributeName, expectedValue, expectedType, valueToAssign);\r
+}\r
+\r
+/**\r
+ * Method to check if attribute can be set to null.\r
+ * Example usage:\r
+ * check_not_nullable(syncInfo, "mode");\r
+ *\r
+ * @param obj object to test which has not nullable attribute\r
+ * @param attributeName attribute name.\r
+ */\r
+function check_not_nullable(obj, attributeName)\r
+{   var old_value = obj[attributeName];\r
+    obj[attributeName] = null;\r
+    assert_not_equals(obj[attributeName], null, "Attribute " + attributeName + " can be set to null.");\r
+    obj[attributeName] = old_value;\r
+}\r
+\r
+/**\r
+ * Method to check NoInterfaceObject\r
+ * Example usage:\r
+ * check_no_interface_object("BluetoothAdapter")\r
+ *\r
+ * @param interfaceName interface name\r
+ */\r
+function check_no_interface_object(interfaceName) {\r
+    assert_throws({name: "TypeError"}, function () {\r
+        tizen[interfaceName]();\r
+    },"Wrong call as a function");\r
+    assert_throws({name: "TypeError"}, function () {\r
+        new tizen[interfaceName]();\r
+    },"Wrong call as a new function");\r
+    assert_throws({name: "TypeError"}, function () {\r
+        ({}) instanceof tizen[interfaceName];\r
+    },"instanceof exception");\r
+    assert_equals(tizen[interfaceName], undefined, interfaceName + " is not undefined.");\r
+}\r
+\r
+\r
+/**\r
+ * Method to check Constructors\r
+ * Example usage:\r
+ * check_constructor("BluetoothAdapter")\r
+ *\r
+ * @param constructorName constructor name\r
+ */\r
+\r
+function check_constructor(constructorName) {\r
+    assert_true(constructorName in tizen, "No " + constructorName + " in tizen.");\r
+    assert_false({} instanceof tizen[constructorName],"Custom object is not instance of " + constructorName);\r
+    assert_throws({\r
+        name: "TypeError"\r
+    }, function () {\r
+        tizen[constructorName]();\r
+    }, "Constructor called as function.");\r
+}\r
+\r
+/**\r
+ * Method to check if given method can be overridden in a given object - (TEMPORARY REMOVED).\r
+ * That method also checks if given method exists in a given object.\r
+ * Example usage:\r
+ * check_method_exists(tizen.notification, "get");\r
+ *\r
+ * @param obj object with method\r
+ * @param methodName name of the method to check.\r
+ */\r
+function check_method_exists(obj, methodName) {\r
+    assert_type(obj[methodName], 'function', "Method does not exist.");\r
+}\r
+\r
+/**\r
+ * Method to check extensibility of given object.\r
+ * Method checks if new attribute and method can be added.\r
+ * Example usage:\r
+ * check_extensibility(tizen.notification);\r
+ *\r
+ * @param obj object to check\r
+ */\r
+function check_extensibility(obj) {\r
+    var dummyAttribute = "dummyAttributeValue", dummyMethodResult = "dummyMethodResultValue";\r
+    obj.newDummyMethod = function() {\r
+        return dummyMethodResult;\r
+    }\r
+    assert_equals(obj.newDummyMethod(), dummyMethodResult, "Incorrect result from added method.");\r
+\r
+    obj.newDummyAttribute = dummyAttribute;\r
+    assert_equals(obj.newDummyAttribute, dummyAttribute, "Incorrect result from added attribute.");\r
+}\r
+\r
+/**\r
+ * Method to check if attribute can be modify.\r
+ * Example usage:\r
+ * check_attr(downloadRequest, "fileName", default_val, "string", "file_name.html");\r
+ *\r
+ * @param obj  object to test which has not readonly attribute\r
+ * @param attributeName attribute name.\r
+ * @param expectedValue expected value of provided attribute name\r
+ * @param expectedType expected type of provided attribute name\r
+ * @param valueToAssign value to assign in order to check if attribute value can be modified\r
+ */\r
+function check_attribute(obj, attributeName, expectedValue, expectedType, valueToAssign) {\r
+    if (expectedValue === valueToAssign) {\r
+        assert_unreached("Fix your test. The same values given for "  + attributeName +\r
+            " in 'value' and 'valueToSet' arguments.");\r
+    }\r
+    if (typeof (attributeName) === "string") {\r
+        assert_true(attributeName in obj, "Name " + attributeName + " doesn't exist in provided object.");\r
+        assert_equals(obj[attributeName], expectedValue, "Value of " + attributeName + " is diffrent.");\r
+        if (typeof (expectedType) !== "undefined") {\r
+            if (expectedValue === null) {\r
+                assert_type(obj[attributeName], "object", "Type of " + attributeName + " is different.");\r
+            } else {\r
+                assert_type(obj[attributeName], expectedType, "Type of " + attributeName + " is different.");\r
+            }\r
+        } else {\r
+            assert_unreached("Fix your test. Wrong type " + expectedType);\r
+        }\r
+        obj[attributeName] = valueToAssign;\r
+        assert_equals(obj[attributeName], valueToAssign, attributeName + " can be modified.");\r
+    } else {\r
+        assert_unreached("Fix your test. Wrong type of name " + typeof (attributeName));\r
+    }\r
+}\r
+\r
+/**\r
+ * Method to check if whole array can be overwritten with an invalid value.\r
+ * Sample usage:\r
+ * check_invalid_array_assignments(message, "to", false);\r
+ *\r
+ * @param obj object which has the array as its property\r
+ * @param array name of the array to check\r
+ * @param isNullable indicates if the array can be null\r
+ */\r
+function check_invalid_array_assignments(obj, array, isNullable) {\r
+    var args = [undefined, true, false, NaN, 0, "TIZEN", {}, function () {}],\r
+        val = obj[array], i;\r
+\r
+    if (!isNullable) {\r
+        obj[array] = null;\r
+        assert_not_equals(obj[array], null, "Non-nullable array was set to null");\r
+        assert_type(obj[array], "array", "Non-nullable array type changed after assigning null");\r
+        assert_equals(obj[array].toString(), val.toString(), "Non-nullable array contents changed after assigning null");\r
+    }\r
+\r
+    for (i = 0 ; i < args.length ; i++) {\r
+        obj[array] = args[i];\r
+        assert_type(obj[array], "array", "Array type changed after assigning an invalid value");\r
+        assert_equals(obj[array].toString(), val.toString(), "Array contents changed after assigning an invalid value");\r
+    }\r
+}\r
+\r
+/**\r
+ * Method to check if an object can be overwritten with an invalid value.\r
+ * Sample usage:\r
+ * check_invalid_object_assignments(message, "body", false);\r
+ *\r
+ * @param parentObj object which has the 'obj' object as its property\r
+ * @param obj name of the object to check\r
+ * @param isNullable indicates if the object can be null\r
+ */\r
+function check_invalid_obj_assignments(parentObj, obj, isNullable) {\r
+    var args = [undefined, true, false, NaN, 0, "TIZEN", function () {}],\r
+        val = parentObj[obj], i;\r
+\r
+    if (!isNullable) {\r
+        parentObj[obj] = null;\r
+        assert_equals(parentObj[obj], val, "Non-nullable obj was modified after assigning null");\r
+    }\r
+\r
+    for (i = 0 ; i < args.length ; i++) {\r
+        parentObj[obj] = args[i];\r
+        assert_equals(parentObj[obj], val, "The object was set to " + args[i]);\r
+    }\r
+}\r
+\r
+/**\r
+ * Method to validate conversion for listeners.\r
+ * Example usage:\r
+ * incorrectListeners = getListenerConversionExceptions(["oninstalled", "onupdated", "onuninstalled"]);\r
+ * for(i = 0; i < incorrectListeners.length; i++) {\r
+ *     packageInformationEventCallback  = incorrectListeners[i][0];\r
+ *     exceptionName = incorrectListeners[i][1];\r
+ *     assert_throws({name : exceptionName},\r
+ *        function () {\r
+ *             tizen.package.setPackageInfoEventListener(packageInformationEventCallback);\r
+ *         }, exceptionName + " should be thrown - given incorrect successCallback.");\r
+ * }\r
+ *\r
+ *\r
+ * @param callbackNames Array with names\r
+ * @returns {Array} table of tables which contain incorrect listener (index 0) and exceptionName (index 1)\r
+ *\r
+ */\r
+function getListenerConversionExceptions(callbackNames) {\r
+    var result = [], conversionTable, i, j, listenerName;\r
+    conversionTable = getTypeConversionExceptions("functionObject", false);\r
+\r
+    for (i = 0; i < callbackNames.length; i++) {\r
+        for (j = 0; j < conversionTable.length; j++) {\r
+            listenerName = {};\r
+            listenerName[callbackNames[i]] = conversionTable[j][0];\r
+            result.push([listenerName, conversionTable[j][1]]);\r
+        }\r
+    }\r
+\r
+    return result;\r
+}\r
index 26f1c7073f10f625fefbd162befbf18c3f6446bf..41263829a273ea5ee0ff4a36ce931c8354f7fcac 100755 (executable)
@@ -8152,7 +8152,7 @@ The bluetooth of the remote/test device MUST be turned on and discoverable from
     <set name="Bluetooth01_tv" type="js">
       <capabilities>
         <capability name="http://tizen.org/feature/profile"><value>TV</value></capability>
-        <capability name="http://tizen.org/feature/network.bluetooth"/>
+        <!-- <capability name="http://tizen.org/feature/network.bluetooth"/> -->
       </capabilities>
       <testcase purpose="Check if is possible to call BluetoothAdapterChangeCallback in new expresion" type="compliance" status="approved" component="Tizen Device APIs/Communication/Bluetooth" execution_type="auto" priority="P3" id="BluetoothAdapterChangeCallback_notexist">
         <description>
@@ -9645,7 +9645,7 @@ The bluetooth of the remote/test device MUST be turned on and discoverable from
     <set name="Bluetooth02_tv" type="js">
       <capabilities>
         <capability name="http://tizen.org/feature/profile"><value>TV</value></capability>
-        <capability name="http://tizen.org/feature/network.bluetooth"/>
+        <!-- <capability name="http://tizen.org/feature/network.bluetooth"/> -->
       </capabilities>
       <testcase component="Tizen Device APIs/Communication/Bluetooth" execution_type="auto" id="BluetoothManager_toByteArray_exist" priority="P0" purpose="Check if toByteArray method exists">
         <description>
@@ -11614,8 +11614,8 @@ The bluetooth of the remote/test device MUST be turned on and discoverable from
     <set name="Bluetooth04_BLE_tv" type="js">
       <capabilities>
         <capability name="http://tizen.org/feature/profile"><value>TV</value></capability>
-        <capability name="http://tizen.org/feature/network.bluetooth"/>
-        <capability name="http://tizen.org/feature/network.bluetooth.le"/>
+        <!-- <capability name="http://tizen.org/feature/network.bluetooth"/>
+        <capability name="http://tizen.org/feature/network.bluetooth.le"/> -->
       </capabilities>
       <testcase purpose="Check if BluetoothLEDevice/Manufacturer/ServiceData attribues exist and have proper traits" onload_delay="180" priority = "P3" component="TizenAPI/Communication/Bluetooth" execution_type="manual" id="BluetoothLEAttributes">
         <description>
@@ -16246,11 +16246,11 @@ The bluetooth of the remote/test device MUST be turned on and discoverable from
       </testcase>
     </set>
     <set name="Bluetooth_BLE_GATT" type="js">
-      <capabilities>
+      <!-- <capabilities>
         <capability name="http://tizen.org/feature/network.bluetooth"/>
         <capability name="http://tizen.org/feature/network.bluetooth.le"/>
         <capability name="http://tizen.org/feature/network.bluetooth.le.gatt.client"/>
-      </capabilities>
+      </capabilities> -->
       <testcase purpose="Check uuid attribute in BluetoothGATTService is readonly" onload_delay="180" type="compliance" status="approved" priority = "P1" component="TizenAPI/Communication/Bluetooth" execution_type="manual" id="BluetoothGATTService_serviceUuid_attribute">
         <description>
           <pre_condition>The bluetooth of the BLE remote/test device MUST support BLE and be turned on and discoverable from other devices.</pre_condition>
index 3ac05c2e39493c1b2f639e6b183206a7d3836c65..c5912051a9f8f91f7aea42f8a60d70575779c236 100755 (executable)
@@ -3767,7 +3767,7 @@ The bluetooth of the remote/test device MUST be turned on and discoverable from
     <set name="Bluetooth01_tv" type="js">
       <capabilities>
         <capability name="http://tizen.org/feature/profile"><value>TV</value></capability>
-        <capability name="http://tizen.org/feature/network.bluetooth"/>
+        <!-- <capability name="http://tizen.org/feature/network.bluetooth"/> -->
       </capabilities>
       <testcase component="Tizen Device APIs/Communication/Bluetooth" execution_type="auto" id="BluetoothAdapterChangeCallback_notexist" priority="P3" purpose="Check if is possible to call BluetoothAdapterChangeCallback in new expresion">
         <description>
@@ -4418,7 +4418,7 @@ The bluetooth of the remote/test device MUST be turned on and discoverable from
     <set name="Bluetooth02_tv" type="js">
       <capabilities>
         <capability name="http://tizen.org/feature/profile"><value>TV</value></capability>
-        <capability name="http://tizen.org/feature/network.bluetooth"/>
+        <!-- <capability name="http://tizen.org/feature/network.bluetooth"/> -->
       </capabilities>
        <testcase component="Tizen Device APIs/Communication/Bluetooth" execution_type="auto" id="BluetoothManager_toByteArray_exist" priority="P0" purpose="Check if toByteArray method exists">
         <description>
@@ -5247,8 +5247,8 @@ The bluetooth of the remote/test device MUST be turned on and discoverable from
     <set name="Bluetooth04_BLE_tv" type="js">
       <capabilities>
         <capability name="http://tizen.org/feature/profile"><value>TV</value></capability>
-        <capability name="http://tizen.org/feature/network.bluetooth"/>
-        <capability name="http://tizen.org/feature/network.bluetooth.le"/>
+        <!-- <capability name="http://tizen.org/feature/network.bluetooth"/>
+        <capability name="http://tizen.org/feature/network.bluetooth.le"/> -->
       </capabilities>
       <testcase purpose="Check if BluetoothLEDevice/Manufacturer/ServiceData attribues exist and have proper traits" onload_delay="180" priority = "P3" component="TizenAPI/Communication/Bluetooth" execution_type="manual" id="BluetoothLEAttributes">
         <description>
@@ -7232,11 +7232,11 @@ The bluetooth of the remote/test device MUST be turned on and discoverable from
       </testcase>
     </set>
     <set name="Bluetooth_BLE_GATT" type="js">
-      <capabilities>
+      <!-- <capabilities>
         <capability name="http://tizen.org/feature/network.bluetooth"/>
         <capability name="http://tizen.org/feature/network.bluetooth.le"/>
         <capability name="http://tizen.org/feature/network.bluetooth.le.gatt.client"/>
-      </capabilities>
+      </capabilities> -->
       <testcase purpose="Check uuid attribute in BluetoothGATTService is readonly" onload_delay="180" priority="P1" component="TizenAPI/Communication/Bluetooth" execution_type="manual" id="BluetoothGATTService_serviceUuid_attribute">
         <description>
           <pre_condition>The bluetooth of the BLE remote/test device MUST support BLE and be turned on and discoverable from other devices.</pre_condition>