<head>
<title>ByteArraySuccessCallback_notexist</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
test(function () {
check_no_interface_object("ByteArraySuccessCallback");
-}, "ByteArraySuccessCallback_notexist");
+}, document.title);
</script>
</body>
<head>
<title>NDEFMessageReadCallback_notexist</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
test(function () {
check_no_interface_object("NDEFMessageReadCallback");
-}, "NDEFMessageReadCallback_notexist");
+}, document.title);
</script>
</body>
<title>NDEFMessage_constructor</title>
<meta charset="utf-8">
<script type="text/javascript" src="support/nfc_common.js"></script>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
<script>
//==== TEST: NDEFMessage_constructor
-//==== LABEL check if NDEFMessage constructor works without arguments
+//==== LABEL Check if NDEFMessage constructor works without arguments
//==== SPEC Tizen Web API:Communication:NFC:NDEFMessage:constructor C
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/nfc.html
//==== TEST_CRITERIA CONSTRM
assert_own_property(message, "records", "message does not own records property.");
assert_array_equals(message.records, [], "message.records");
-}, "NDEFMessage_constructor");
+}, document.title);
</script>
</body>
<title>NDEFMessage_constructor_rawData</title>
<meta charset="utf-8">
<script type="text/javascript" src="support/nfc_common.js"></script>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
<script>
//==== TEST: NDEFMessage_constructor_rawData
-//==== LABEL check if NDEFMessage constructor works with rawData
+//==== LABEL Check if NDEFMessage constructor works with rawData
//==== SPEC Tizen Web API:Communication:NFC:NDEFMessage:constructor C
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/nfc.html
//==== TEST_CRITERIA CONSTRM
assert_array_equals(message.records[0].id, record.id, "reconstructed record.id");
assert_array_equals(message.records[0].payload, record.payload, "reconstructed record.payload");
-}, "NDEFMessage_constructor_rawData");
+}, document.title);
</script>
</body>
<div id="log"></div>
<script type="text/javascript">
//==== TEST: NDEFMessage_constructor_records
-//==== LABEL check NDEFMessage constructor with records array
+//==== LABEL Check NDEFMessage constructor with NDEF records array
//==== SPEC Tizen Web API:Communication:NFC:NDEFMessage:constructor C
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/nfc.html
//==== TEST_CRITERIA CONSTRM CONSTRA
"type of first record is wrong");
assert_equals(message.records[0].text, "Hi!",
"content of first record is wrong");
-}, "NDEFMessage_constructor_records");
+}, document.title);
</script>
</body>
<head>
<title>NDEFMessage_exist</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
test(function () {
check_constructor("NDEFMessage");
-}, "NDEFMessage_exist");
+}, document.title);
</script>
</body>
<head>
<title>NDEFMessage_extend</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
test(function () {
message = new tizen.NDEFMessage();
check_extensibility(message);
-}, "NDEFMessage_extend");
+}, document.title);
</script>
</body>
<head>
<title>NDEFMessage_recordCount_attribute</title>
<script type="text/javascript" src="support/nfc_common.js"></script>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
<div id="log"></div>
<script type="text/javascript">
//==== TEST: NDEFMessage_recordCount_attribute
-//==== LABEL Check if attribute recordCount of NDEFMessage exists, has type Number and is readonly
+//==== LABEL Check if attribute NDEFMessage::recordCount exists, has type Number and is readonly
//==== SPEC Tizen Web API:Communication:NFC:NDEFMessage:recordCount A
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/nfc.html
//==== TEST_CRITERIA AE AT ARO
message.recordCount = null;
assert_equals(message.recordCount, message.records.length,
"recordCount and record.length differ after assigning null");
-}, "NDEFMessage_recordCount_attribute");
+}, document.title);
</script>
</body>
<head>
<title>NDEFMessage_records_attribute</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
check_not_nullable(message, "records");
-}, "NDEFMessage_records_attribute");
+}, document.title);
</script>
</body>
<title>NDEFMessage_toByte</title>
<meta charset="utf-8">
<script type="text/javascript" src="support/nfc_common.js"></script>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
<script>
//==== TEST: NDEFMessage_toByte
-//==== LABEL check whether NDEFMessage:toByte() returns correct byte array of the NDEF message
+//==== LABEL Check whether NDEFMessage:toByte() returns correct byte array of the NDEF message
//==== SPEC Tizen Web API:Communication:NFC:NDEFMessage:toByte M
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/nfc.html
//==== TEST_CRITERIA MNA MR
test(function () {
var raw = [145, 1, 6, 85, 0, 121, 46, 99, 111, 109,
- 81, 1, 6, 85, 0, 120, 46, 99, 111, 109],
+ 81, 1, 6, 85, 0, 120, 46, 99, 111, 109],
message, result;
message = new tizen.NDEFMessage(raw);
assert_type(result, "array", "toByte() should return array");
assert_array_equals(result, raw, "returned by toByte()");
-}, "NDEFMessage_toByte");
+}, document.title);
</script>
</body>
<title>NDEFMessage_toByte_TypeMismatch</title>
<meta charset="utf-8">
<script type="text/javascript" src="support/nfc_common.js"></script>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
<script>
//==== TEST: NDEFMessage_toByte_TypeMismatch
-//==== LABEL check whether NDEFMessage:toByte() throws exception when NDEFMessage.records contains invalid object
+//==== LABEL Check whether NDEFMessage:toByte() throws exception when NDEFMessage.records contains invalid object
//==== SPEC Tizen Web API:Communication:NFC:NDEFMessage:toByte M
//==== PRIORITY P2
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/nfc.html
message.records = ["not-a-record"];
- assert_throws({name: TYPE_MISMATCH_ERR}, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
result = message.toByte();
});
-}, "NDEFMessage_toByte_TypeMismatch");
+}, document.title);
</script>
</body>
<title>NDEFMessage_toByte_empty</title>
<meta charset="utf-8">
<script type="text/javascript" src="support/nfc_common.js"></script>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
<script>
//==== TEST: NDEFMessage_toByte_empty
-//==== LABEL check whether NDEFMessage::toByte() returns empty array for empty NDEF message
+//==== LABEL Check whether NDEFMessage::toByte() returns empty array for empty NDEF message
//==== SPEC Tizen Web API:Communication:NFC:NDEFMessage:toByte M
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/nfc.html
//==== TEST_CRITERIA MNA MR
assert_type(result, "array", "toByte() should return array");
assert_array_equals(result, raw, "returned by toByte()");
-}, "NDEFMessage_toByte_empty");
+}, document.title);
</script>
</body>
<head>
<title>NDEFMessage_toByte_exists</title>
<script type="text/javascript" src="support/nfc_common.js"></script>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
<div id="log"></div>
<script type="text/javascript">
//==== TEST: NDEFMessage_toByte_exists
-//==== LABEL Test method NDEFMessage.toByte exists
+//==== LABEL Check if method NDEFMessage::toByte() exists
//==== SPEC Tizen Web API:Communication:NFC:NDEFMessage:toByte M
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/nfc.html
//==== TEST_CRITERIA ME
check_method_exists(message, "toByte");
-}, "NDEFMessage_toByte_exists");
+}, document.title);
</script>
</body>
<head>
<title>NDEFMessage_toByte_extra_argument</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
test(function () {
message = new tizen.NDEFMessage();
checkExtraArgument(message, "toByte");
-}, "NDEFMessage_toByte_extra_argument");
+}, document.title);
</script>
</body>
<head>
<title>NDEFRecordMedia_constructor</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
assert_equals(record.mimeType, "text/plain", "record.mimeType");
assert_array_equals(record.payload, bytes, "record.payload");
-}, "NDEFRecordMedia_constructor");
+}, document.title);
</script>
</body>
<head>
<title>NDEFRecordMedia_exist</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
test(function () {
check_constructor("NDEFRecordMedia");
-}, "NDEFRecordMedia_exist");
+}, document.title);
</script>
</body>
<head>
<title>NDEFRecordMedia_extend</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
test(function () {
record = new tizen.NDEFRecordMedia("text/plain", bytes);
check_extensibility(record);
-}, "NDEFRecordMedia_extend");
+}, document.title);
</script>
</body>
<head>
<title>NDEFRecordMedia_id_attribute</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
assert_array_equals(record.id, id_bytes, "record.id after assignment");
check_invalid_array_assignments(record, "id", false);
-}, "NDEFRecordMedia_id_attribute");
+}, document.title);
</script>
</body>
<head>
<title>NDEFRecordMedia_mimeType_attribute</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
record.mimeType = null;
assert_equals(record.mimeType, "text/plain", "record.mimeType should ignore null");
-}, "NDEFRecordMedia_mimeType_attribute");
+}, document.title);
</script>
</body>
<head>
<title>NDEFRecordMedia_payload_attribute</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
assert_array_equals(record.payload, bytes, "record.payload after assignment");
check_invalid_array_assignments(record, "payload", false);
-}, "NDEFRecordMedia_payload_attribute");
+}, document.title);
</script>
</body>
<head>
<title>NDEFRecordMedia_tnf_attribute</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
record.tnf = null;
assert_not_equals(record.tnf, null, "record.tnf should not accept null");
-}, "NDEFRecordMedia_tnf_attribute");
+}, document.title);
</script>
</body>
<head>
<title>NDEFRecordMedia_type_attribute</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
assert_array_equals(record.type, type_bytes, "record.type after assignment");
check_invalid_array_assignments(record, "type", false);
-}, "NDEFRecordMedia_type_attribute");
+}, document.title);
</script>
</body>
<head>
<title>NDEFRecordText_constructor</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
assert_own_property(record, "text", "NDEFRecordText.text");
assert_own_property(record, "languageCode", "NDEFRecordText.languageCode");
assert_own_property(record, "encoding", "NDEFRecordText.encoding");
-}, "NDEFRecordText_constructor");
+}, document.title);
</script>
</body>
<head>
<title>NDEFRecordText_constructor_encoding_UTF16</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
assert_own_property(record, "languageCode", "NDEFRecordText.languageCode");
assert_own_property(record, "encoding", "NDEFRecordText.encoding");
assert_equals(record.encoding, "UTF16", "record.encoding");
-}, "NDEFRecordText_constructor_encoding_UTF16");
+}, document.title);
</script>
</body>
<head>
<title>NDEFRecordText_constructor_encoding_UTF8</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
assert_own_property(record, "languageCode", "NDEFRecordText.languageCode");
assert_own_property(record, "encoding", "NDEFRecordText.encoding");
assert_equals(record.encoding, "UTF8", "record.encoding");
-}, "NDEFRecordText_constructor_encoding_UTF8");
+}, document.title);
</script>
</body>
<head>
<title>NDEFRecordText_encoding_attribute</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
record.encoding = "";
assert_not_equals(record.encoding, null, "record.encoding should not accept '' (empty)");
-}, "NDEFRecordText_encoding_attribute");
+}, document.title);
</script>
</body>
<head>
<title>NDEFRecordText_exist</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
test(function () {
check_constructor("NDEFRecordText");
-}, "NDEFRecordText_exist");
+}, document.title);
</script>
</body>
<head>
<title>NDEFRecordText_extend</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
test(function () {
record = new tizen.NDEFRecordText("Hello World!", "en-GB");
check_extensibility(record);
-}, "NDEFRecordText_extend");
+}, document.title);
</script>
</body>
<head>
<title>NDEFRecordText_id_attribute</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
assert_array_equals(record.id, id_bytes, "record.id after assignment");
check_invalid_array_assignments(record, "id", false);
-}, "NDEFRecordText_id_attribute");
+}, document.title);
</script>
</body>
<head>
<title>NDEFRecordText_languageCode_attribute</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
record.languageCode = null;
assert_equals(record.languageCode, "en-GB", "record.languageCode should ignore null");
-}, "NDEFRecordText_languageCode_attribute");
+}, document.title);
</script>
</body>
<head>
<title>NDEFRecordText_payload_attribute</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
assert_array_equals(record.payload, payload_bytes, "record.payload after assignment");
check_invalid_array_assignments(record, "payload", false);
-}, "NDEFRecordText_payload_attribute");
+}, document.title);
</script>
</body>
<head>
<title>NDEFRecordText_text_attribute</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
record.text = null;
assert_equals(record.text, text, "record.text should ignore null");
-}, "NDEFRecordText_text_attribute");
+}, document.title);
</script>
</body>
<head>
<title>NDEFRecordText_tnf_attribute</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
record.tnf = null;
assert_equals(record.tnf, tizen.nfc.NFC_RECORD_TNF_WELL_KNOWN, "record.tnf should ignore null");
-}, "NDEFRecordText_tnf_attribute");
+}, document.title);
</script>
</body>
<head>
<title>NDEFRecordText_type_attribute</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
assert_array_equals(record.type, [84], "record.type after assignment");
check_invalid_array_assignments(record, "type", false);
-}, "NDEFRecordText_type_attribute");
+}, document.title);
</script>
</body>
<head>
<title>NDEFRecordURI_constructor</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
assert_own_property(record, "uri", "NDEFRecordURI.uri");
assert_equals(record.uri, "https://www.tizen.org/", "record.uri");
-}, "NDEFRecordURI_constructor");
+}, document.title);
</script>
</body>
<head>
<title>NDEFRecordURI_exist</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
test(function () {
check_constructor("NDEFRecordURI");
-}, "NDEFRecordURI_exist");
+}, document.title);
</script>
</body>
<head>
<title>NDEFRecordURI_extend</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
test(function () {
record = new tizen.NDEFRecordURI("https://www.tizen.org/");
check_extensibility(record);
-}, "NDEFRecordURI_extend");
+}, document.title);
</script>
</body>
<head>
<title>NDEFRecordURI_id_attribute</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
assert_array_equals(record.id, id_bytes, "record.id after assignment");
check_invalid_array_assignments(record, "id", false);
-}, "NDEFRecordURI_id_attribute");
+}, document.title);
</script>
</body>
<head>
<title>NDEFRecordURI_payload_attribute</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
assert_array_equals(record.payload, payload_bytes, "record.payload after assignment");
check_invalid_array_assignments(record, "payload", false);
-}, "NDEFRecordURI_payload_attribute");
+}, document.title);
</script>
</body>
<head>
<title>NDEFRecordURI_tnf_attribute</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
record.tnf = null;
assert_equals(record.tnf, tizen.nfc.NFC_RECORD_TNF_WELL_KNOWN, "record.tnf should ignore null");
-}, "NDEFRecordURI_tnf_attribute");
+}, document.title);
</script>
</body>
<head>
<title>NDEFRecordURI_type_attribute</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
assert_array_equals(record.type, type_bytes, "record.type after assignment");
check_invalid_array_assignments(record, "type", false);
-}, "NDEFRecordURI_type_attribute");
+}, document.title);
</script>
</body>
<head>
<title>NDEFRecordURI_uri_attribute</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
record.uri = null;
assert_not_equals(record.uri, null, "record.uri should not accept null");
-}, "NDEFRecordURI_uri_attribute");
+}, document.title);
</script>
</body>
<head>
<title>NDEFRecord_constructor</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
assert_own_property(record, "type", "NDEFRecord.type");
assert_own_property(record, "id", "NDEFRecord.id");
assert_own_property(record, "payload", "NDEFRecord.payload");
-}, "NDEFRecord_constructor");
+}, document.title);
</script>
</body>
<head>
<title>NDEFRecord_constructor_raw_data</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
assert_array_equals(record2.type, [202], "record2.type should be set up from bytes");
assert_array_equals(record2.payload, [240, 241], "record2.payload should be set up from bytes");
-}, "NDEFRecord_constructor_raw_data");
+}, document.title);
</script>
</body>
<div id="log"></div>
<script type="text/javascript">
//==== TEST: NDEFRecord_constructor_tnf
-//==== LABEL check NDEFRecord.Constructor with all parameters
+//==== LABEL Check NDEFRecord constructor with all parameters
//==== PRIORITY P2
//==== SPEC Tizen Web API:Communication:NFC:NDEFRecord:constructor C
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/nfc.html
assert_array_equals(newRecord.id, [], "newRecord.id");
assert_array_equals(newRecord.payload, payload, "newRecord.payload");
-}, "NDEFRecord_constructor_tnf");
+}, document.title);
</script>
</body>
<div id="log"></div>
<script type="text/javascript">
//==== TEST: NDEFRecord_constructor_tnf_with_id
-//==== LABEL check NDEFRecord.Constructor with only mandatory parameters
+//==== LABEL Check NDEFRecord constructor with only mandatory parameters
//==== PRIORITY P2
//==== SPEC Tizen Web API:Communication:NFC:NDEFRecord:constructor C
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/nfc.html
assert_array_equals(newRecord.id, record_id, "newRecord.id");
assert_array_equals(newRecord.payload, payload, "newRecord.payload");
-}, "NDEFRecord_constructor_tnf_with_id");
+}, document.title);
</script>
</body>
<head>
<title>NDEFRecord_exist</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
test(function () {
check_constructor("NDEFRecord");
-}, "NDEFRecord_exist");
+}, document.title);
</script>
</body>
<head>
<title>NDEFRecord_extend</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
test(function () {
record = new tizen.NDEFRecord(tizen.nfc.NFC_RECORD_TNF_UNKNOWN, [0x20], [0x40, 0x41]);
check_extensibility(record);
-}, "NDEFRecord_extend");
+}, document.title);
</script>
</body>
<head>
<title>NDEFRecord_id_attribute</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
record = new tizen.NDEFRecord(tizen.nfc.NFC_RECORD_TNF_UNKNOWN, [], []);
assert_array_equals(record.id, [], "default value of id");
-}, "NDEFRecord_id_attribute");
+}, document.title);
</script>
</body>
<head>
<title>NDEFRecord_payload_attribute</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
assert_array_equals(record.payload, payload_bytes, "record.payload after assignment");
check_invalid_array_assignments(record, "payload", false);
-}, "NDEFRecord_payload_attribute");
+}, document.title);
</script>
</body>
<head>
<title>NDEFRecord_tnf_attribute</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
record.tnf = null;
assert_equals(record.tnf, tizen.nfc.NFC_RECORD_TNF_UNKNOWN, "record.tnf should ignore null");
-}, "NDEFRecord_tnf_attribute");
+}, document.title);
</script>
</body>
<head>
<title>NDEFRecord_type_attribute</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
assert_array_equals(record.type, [0x20], "record.type after assignment");
check_invalid_array_assignments(record, "type", false);
-}, "NDEFRecord_type_attribute");
+}, document.title);
</script>
</body>
<head>
<title>NFCAdapter_extend</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
var adapter;
adapter = tizen.nfc.getDefaultAdapter();
check_extensibility(adapter);
-}, "NFCAdapter_extend");
+}, document.title);
</script>
</body>
<head>
<title>NFCAdapter_getCachedMessage</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
message = adapter.getCachedMessage();
assert_true(message === null || message instanceof tizen.NDEFMessage,
"getCachedMessage() should return NDEFMessage or null");
-}, "NFCAdapter_getCachedMessage");
+}, document.title);
</script>
</body>
<head>
<title>NFCAdapter_getCachedMessage_exist</title>
<script type="text/javascript" src="support/nfc_common.js"></script>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
<p><a href="https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/nfc.html">spec reference</a></p>
<div id="log"></div>
<script type="text/javascript">
//==== TEST: NFCAdapter_getCachedMessage_exist
-//==== LABEL check if NFCAdapter method getCachedMessage exists
+//==== LABEL Check if method NFCAdapter::getCachedMessage() exists
//==== SPEC Tizen Web API:Communication:NFC:NFCAdapter:getCachedMessage M
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/nfc.html
//==== TEST_CRITERIA ME
adapter = tizen.nfc.getDefaultAdapter();
assert_true("getCachedMessage" in adapter, "getCachedMessage does not exist.");
check_method_exists(adapter, "getCachedMessage");
-}, "NFCAdapter_getCachedMessage_exist");
+}, document.title);
</script>
</body>
<head>
<title>NFCAdapter_getCachedMessage_extra_argument</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
test(function () {
adapter = tizen.nfc.getDefaultAdapter();
checkExtraArgument(adapter, "getCachedMessage");
-}, "NFCAdapter_getCachedMessage_extra_argument");
+}, document.title);
</script>
</body>
<head>
<title>NFCAdapter_notexist</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
test(function () {
check_no_interface_object("NFCAdapter");
-}, "NFCAdapter_notexist");
+}, document.title);
</script>
</body>
<head>
<title>NFCAdapter_powered_attribute</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
adapter.powered = !originalValue;
assert_equals(adapter.powered, originalValue, "adapter.powered should not be changed");
-}, "NFCAdapter_powered_attribute");
+}, document.title);
</script>
</body>
<head>
<title>NFCAdapter_setPeerListener</title>
<script type="text/javascript" src="support/nfc_common.js"></script>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
<p><a href="https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/nfc.html">spec reference</a></p>
<div id="log"></div>
<script type="text/javascript">
//==== TEST: NFCAdapter_setPeerListener
-//==== LABEL check if detectCallback of setPeerListener can be called successfully when NFC peer-to-peer target is detected
+//==== LABEL Check if method NFCAdapter::setPeerListener() successfully registers listener for detecting NFC peer
//==== EXECUTION_TYPE manual
//==== STEP Click "Run". Move other NFC device close so it will be detected.
//==== EXPECT pass - peer detected
setup({timeout: 90000});
var adapter, peerListener, result = null,
- t = async_test("NFCAdapter_setPeerListener", {timeout: 90000});
+ t = async_test(document.title, {timeout: 90000});
t.step(function () {
<head>
<title>NFCAdapter_setPeerListener_detectCallback_TypeMismatch</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
}, "[listener = " + value + "]"
);
}
-}, "NFCAdapter_setPeerListener_detectCallback_TypeMismatch");
+}, document.title);
</script>
</body>
<head>
<title>NFCAdapter_setPeerListener_detectCallback_invalid_cb</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
setup({timeout: 90000});
-var t = async_test("NFCAdapter_setPeerListener_detectCallback_invalid_cb", {timeout: 90000}),
+var t = async_test(document.title, {timeout: 90000}),
adapter, incorrectListeners, value, exceptionName, i;
t.step(function () {
<head>
<title>NFCAdapter_setPeerListener_exist</title>
<script type="text/javascript" src="support/nfc_common.js"></script>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
<p><a href="https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/nfc.html">spec reference</a></p>
<div id="log"></div>
<script type="text/javascript">
//==== TEST: NFCAdapter_setPeerListener_exist
-//==== LABEL check if NFCAdapter method setPeerListener exists
+//==== LABEL Check if method NFCAdapter::setPeerListener() exists
//==== SPEC Tizen Web API:Communication:NFC:NFCAdapter:setPeerListener M
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/nfc.html
//==== TEST_CRITERIA ME
adapter = tizen.nfc.getDefaultAdapter();
assert_true("setPeerListener" in adapter, "setPeerListener does not exist.");
check_method_exists(adapter, "setPeerListener");
-}, "NFCAdapter_setPeerListener_exist");
+}, document.title);
</script>
</body>
<head>
<title>NFCAdapter_setPeerListener_missarg</title>
<meta charset="utf-8">
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
<script>
//==== TEST: NFCAdapter_setPeerListener_missarg
-//==== LABEL check if adapter.setPeerListener() throws an exception when called without argument
+//==== LABEL Check if adapter.setPeerListener() throws an exception when called without argument
//==== SPEC Tizen Web API:Communication:NFC:NFCAdapter:setPeerListener M
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/nfc.html
//==== TEST_CRITERIA MMA
test(function () {
var adapter = tizen.nfc.getDefaultAdapter();
- assert_throws({
- name: "TypeMismatchError"
- }, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
adapter.setPeerListener();
});
-}, "NFCAdapter_setPeerListener_missarg");
+}, document.title);
</script>
</body>
<head>
<title>NFCAdapter_setPowered_errorCallback_TypeMismatch</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
}
-}, "NFCAdapter_setPowered_errorCallback_TypeMismatch");
+}, document.title);
</script>
</body>
<head>
<title>NFCAdapter_setPowered_errorCallback_invalid_cb</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
setup({timeout: 90000});
-var t = async_test("NFCAdapter_setPowered_errorCallback_invalid_cb", {timeout: 90000}),
+var t = async_test(document.title, {timeout: 90000}),
adapter, onSuccess, invalidOnError;
t.step(function () {
})
};
- assert_throws({
- "name": "TypeMismatchError"
- }, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
adapter.setPowered(true, onSuccess, invalidOnError);
});
t.done();
<head>
<title>NFCAdapter_setPowered_exist</title>
<script type="text/javascript" src="support/nfc_common.js"></script>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
<p><a href="https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/nfc.html">spec reference</a></p>
<div id="log"></div>
<script type="text/javascript">
//==== TEST: NFCAdapter_setPowered_exist
-//==== LABEL check if NFCAdapter method setPowered exists
+//==== LABEL Check if method NFCAdapter::setPowered() exists
//==== SPEC Tizen Web API:Communication:NFC:NFCAdapter:setPowered M
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/nfc.html
//==== TEST_CRITERIA ME
adapter = tizen.nfc.getDefaultAdapter();
assert_true("setPowered" in adapter, "setPowered does not exist.");
check_method_exists(adapter, "setPowered");
-}, "NFCAdapter_setPowered_exist");
+}, document.title);
</script>
</body>
<div id="log"></div>
<script type="text/javascript">
//==== TEST: NFCAdapter_setPowered_off
-//==== LABEL check if NFCAdapter attribute powered can be got successfully when it is set to false
+//==== LABEL Check if method NFCAdapter::setPowered(false) sets a value of attribute NFCAdapter::powered to false
//==== PRIORITY P2
//==== EXECUTION_TYPE manual
//==== STEP Click "Run"
setup({timeout: 90000});
var adapter, onSuccess, onError, result = null,
- t = async_test("NFCAdapter_setPowered_off", {timeout: 90000});
+ t = async_test(document.title, {timeout: 90000});
t.step(function () {
adapter = tizen.nfc.getDefaultAdapter();
<div id="log"></div>
<script type="text/javascript">
//==== TEST: NFCAdapter_setPowered_on
-//==== LABEL check if NFCAdapter attribute powered can be got successfully when it is set to true
+//==== LABEL Check if method NFCAdapter::setPowered(true) sets a value of attribute NFCAdapter::powered to true
//==== PRIORITY P2
//==== EXECUTION_TYPE manual
//==== STEP Click "Run"
setup({timeout: 90000});
var adapter, onSuccess, onError, result = null,
- t = async_test("NFCAdapter_setPowered_on", {timeout: 90000});
+ t = async_test(document.title, {timeout: 90000});
t.step(function () {
adapter = tizen.nfc.getDefaultAdapter();
<head>
<title>NFCAdapter_setPowered_successCallback_TypeMismatch</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
);
}
-}, "NFCAdapter_setPowered_successCallback_TypeMismatch");
+}, document.title);
</script>
</body>
<head>
<title>NFCAdapter_setPowered_successCallback_invalid_cb</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
setup({timeout: 90000});
-var t = async_test("NFCAdapter_setPowered_successCallback_invalid_cb", {timeout: 90000}),
+var t = async_test(document.title, {timeout: 90000}),
adapter, invalidOnSuccess, onError;
t.step(function () {
assert_unreached("onError was not expected");
});
- assert_throws({
- "name": "TypeMismatchError"
- }, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
adapter.setPowered(true, invalidOnSuccess, onError);
});
t.done();
<head>
<title>NFCAdapter_setPowered_without_errorCallback</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
setup({timeout: 90000});
-var t = async_test("NFCAdapter_setPowered_without_errorCallback", {timeout: 90000}),
+var t = async_test(document.title, {timeout: 90000}),
adapter, onSuccess;
t.step(function () {
<head>
<title>NFCAdapter_setPowered_without_successCallback</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
//==== TEST_CRITERIA MMINA
//==== ONLOAD_DELAY 90
-var t = async_test("NFCAdapter_setPowered_without_successCallback", {timeout: 90000}),
+var t = async_test(document.title, {timeout: 90000}),
adapter;
setup({timeout: 90000});
<div id="log"></div>
<script type="text/javascript">
//==== TEST: NFCAdapter_setTagListener
-//==== LABEL Check if tagListener.onattach is invoked in case of successful detection of the NFC tag
+//==== LABEL Check if method NFCAdapter::setTagListener() successfully registers listener for detecting NFC tag
//==== EXECUTION_TYPE manual
//==== STEP Click "Run". Move NFC tag close so it will be detected.
//==== EXPECT pass - tag detected
setup({timeout: 90000});
var adapter, tagListener, result = null,
- t = async_test("NFCAdapter_setTagListener", {timeout: 90000});
+ t = async_test(document.title, {timeout: 90000});
t.step(function () {
<head>
<title>NFCAdapter_setTagListener_detectCallback_TypeMismatch</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
}, "[listener = " + value + "]"
);
}
-}, "NFCAdapter_setTagListener_detectCallback_TypeMismatch");
+}, document.title);
</script>
</body>
<head>
<title>NFCAdapter_setTagListener_detectCallback_invalid_cb</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
setup({timeout: 90000});
-var t = async_test("NFCAdapter_setTagListener_detectCallback_invalid_cb", {timeout: 90000}),
+var t = async_test(document.title, {timeout: 90000}),
adapter, incorrectListeners, value, exceptionName, i;
t.step(function () {
<head>
<title>NFCAdapter_setTagListener_exist</title>
<script type="text/javascript" src="support/nfc_common.js"></script>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
<p><a href="https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/nfc.html">spec reference</a></p>
<div id="log"></div>
<script type="text/javascript">
//==== TEST: NFCAdapter_setTagListener_exist
-//==== LABEL Check if setTagListener method exists
+//==== LABEL Check if NFCAdapter::setTagListener() method exists
//==== SPEC Tizen Web API:Communication:NFC:NFCAdapter:setTagListener M
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/nfc.html
//==== TEST_CRITERIA ME
adapter = tizen.nfc.getDefaultAdapter();
assert_true("setTagListener" in adapter, "setTagListener does not exist.");
check_method_exists(adapter, "setTagListener");
-}, "NFCAdapter_setTagListener_exist");
+}, document.title);
</script>
</body>
<head>
<title>NFCAdapter_setTagListener_missarg</title>
<meta charset="utf-8">
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
<script>
//==== TEST: NFCAdapter_setTagListener_missarg
-//==== LABEL check if adapter.setTagListener() throws an exception
+//==== LABEL Check if adapter.setTagListener() throws an exception
//==== SPEC Tizen Web API:Communication:NFC:NFCAdapter:setTagListener M
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/nfc.html
//==== TEST_CRITERIA MMA
test(function () {
var adapter = tizen.nfc.getDefaultAdapter();
- assert_throws({
- name: "TypeMismatchError"
- }, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
adapter.setTagListener();
});
-}, "NFCAdapter_setTagListener_missarg");
+}, document.title);
</script>
</body>
<head>
<title>NFCAdapter_setTagListener_tagFilter_TypeMismatch</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
setup({timeout: 90000});
-var t = async_test("NFCAdapter_setTagListener_tagFilter_TypeMismatch", {timeout: 90000});
+var t = async_test(document.title, {timeout: 90000}), adapter = tizen.nfc.getDefaultAdapter(), i, badValues,
+ value, exceptionName, listener;
t.step(function () {
- var adapter = tizen.nfc.getDefaultAdapter(),
- i, badValues, value, exceptionName, listener;
listener = {
onattach: this.step_func(function () { assert_unreached("onattach"); }),
<div id="log"></div>
<script type="text/javascript">
//==== TEST: NFCAdapter_setTagListener_tagFilter_is_null
-//==== LABEL check if successful callback of setTagListener method is invoked when tagFilter is set to null
+//==== LABEL Check if onattach() callback is called successfully when NFC tag is detected after NFCAdapter::setTagListener() with null tagFilter
//==== PRIORITY P2
//==== EXECUTION_TYPE manual
//==== STEP Click "Run". Move NFC tag close to the device so it will be detected.
setup({timeout: 90000});
-var t = async_test("NFCAdapter_setTagListener_tagFilter_is_null", {timeout: 90000});
+var t = async_test(document.title, {timeout: 90000}), adapter, tagListener;
t.step(function () {
- var adapter, tagListener;
tagListener = {
onattach: t.step_func(function (nfcTag) {
<div id="log"></div>
<script type="text/javascript">
//==== TEST: NFCAdapter_setTagListener_with_tagFilter
-//==== LABEL check if successful callback of setTagListener method is invoked with tagFilter parameters
+//==== LABEL Check if onattach() callback is called successfully when NFC tag is detected after NFCAdapter::setTagListener() with valid tagFilter
//==== PRIORITY P2
//==== EXECUTION_TYPE manual
//==== STEP Click "Run". Move NFC tag close to the device so it will be detected.
var adapter, tagListener,
NFCTagTypeList = Object.getOwnPropertyNames(NFCTagType),
- t = async_test("NFCAdapter_setTagListener_with_tagFilter", {timeout: 90000});
+ t = async_test(document.title, {timeout: 90000});
t.step(function () {
tagListener = {
<script type="text/javascript">
//==== TEST: NFCAdapter_unsetPeerListener
-//==== LABEL Check if successfully unset listener for detecting an NFC peer-to-peer target
+//==== LABEL Check if method NFCAdapter::unsetPeerListener() disables listener for detecting an NFC peer-to-peer target
//==== EXECUTION_TYPE manual
//==== STEP Click "Run". Move other NFC device close so it will be detected and then click "Peer was attached" button.
//==== EXPECT Pass
//==== TEST_CRITERIA MNAST MNA MR
var adapter, peerListener, isWaiting = false, result = null,
- t = async_test("NFCAdapter_unsetPeerListener", {timeout: 90000});
+ t = async_test(document.title, {timeout: 90000});
setup({timeout: 90000});
<head>
<title>NFCAdapter_unsetPeerListener_exist</title>
<script type="text/javascript" src="support/nfc_common.js"></script>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
<p><a href="https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/nfc.html">spec reference</a></p>
<div id="log"></div>
<script type="text/javascript">
//==== TEST: NFCAdapter_unsetPeerListener_exist
-//==== LABEL Check if unsetPeerListener method exists
+//==== LABEL Check if method NFCAdapter::unsetPeerListener() exists
//==== SPEC Tizen Web API:Communication:NFC:NFCAdapter:unsetPeerListener M
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/nfc.html
//==== TEST_CRITERIA ME
adapter = tizen.nfc.getDefaultAdapter();
assert_true("unsetPeerListener" in adapter, "unsetPeerListener does not exist.");
check_method_exists(adapter, "unsetPeerListener");
-}, "NFCAdapter_unsetPeerListener_exist");
+}, document.title);
</script>
</body>
<head>
<title>NFCAdapter_unsetPeerListener_extra_argument</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
test(function () {
adapter = tizen.nfc.getDefaultAdapter();
checkExtraArgument(adapter, "unsetPeerListener");
-}, "NFCAdapter_unsetPeerListener_extra_argument");
+}, document.title);
</script>
</body>
<script type="text/javascript">
//==== TEST: NFCAdapter_unsetTagListener
-//==== LABEL Check if successfully unset listener for detecting an NFC tag
+//==== LABEL Check if method NFCAdapter::unsetTagListener() disables listener for detecting an NFC tag
//==== EXECUTION_TYPE manual
//==== STEP Click "Run". Move NFC tag close so it will be detected and then click "Tag was attached" button.
//==== EXPECT pass
setup({timeout: 90000});
var adapter, tagListener, isWaiting = false, result = null,
- t = async_test("NFCAdapter_unsetTagListener", {timeout: 90000});
+ t = async_test(document.title, {timeout: 90000});
setup({timeout: t.timeout_length});
<head>
<title>NFCAdapter_unsetTagListener_exist</title>
<script type="text/javascript" src="support/nfc_common.js"></script>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
<p><a href="https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/nfc.html">spec reference</a></p>
<div id="log"></div>
<script type="text/javascript">
//==== TEST: NFCAdapter_unsetTagListener_exist
-//==== LABEL Check if unsetTagListener method exists
+//==== LABEL Check if method NFCAdapter::unsetTagListener() method exists
//==== SPEC Tizen Web API:Communication:NFC:NFCAdapter:unsetTagListener M
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/nfc.html
//==== TEST_CRITERIA ME
adapter = tizen.nfc.getDefaultAdapter();
assert_true("unsetTagListener" in adapter, "unsetTagListener does not exist.");
check_method_exists(adapter, "unsetTagListener");
-}, "NFCAdapter_unsetTagListener_exist");
+}, document.title);
</script>
</body>
<head>
<title>NFCAdapter_unsetTagListener_extra_argument</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
test(function () {
adapter = tizen.nfc.getDefaultAdapter();
checkExtraArgument(adapter, "unsetTagListener");
-}, "NFCAdapter_unsetTagListener_extra_argument");
+}, document.title);
</script>
</body>
<head>
<title>NFCManagerObject_notexist</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
test(function () {
check_no_interface_object("NFCManagerObject");
-}, "NFCManagerObject_notexist");
+}, document.title);
</script>
</body>
<head>
<title>NFCManager_NFC_RECORD_TNF_EMPTY_const</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
test(function () {
check_const(tizen.nfc, "NFC_RECORD_TNF_EMPTY", 0, "number", 2);
-}, "NFCManager_NFC_RECORD_TNF_EMPTY_const");
+}, document.title);
</script>
</body>
<head>
<title>NFCManager_NFC_RECORD_TNF_EXTERNAL_RTD_const</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
test(function () {
check_const(tizen.nfc, "NFC_RECORD_TNF_EXTERNAL_RTD", 4, "number", 2);
-}, "NFCManager_NFC_RECORD_TNF_EXTERNAL_RTD_const");
+}, document.title);
</script>
</body>
<head>
<title>NFCManager_NFC_RECORD_TNF_MIME_MEDIA_const</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
test(function () {
check_const(tizen.nfc, "NFC_RECORD_TNF_MIME_MEDIA", 2, "number", 0);
-}, "NFCManager_NFC_RECORD_TNF_MIME_MEDIA_const");
+}, document.title);
</script>
</body>
<head>
<title>NFCManager_NFC_RECORD_TNF_UNCHANGED_const</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
test(function () {
check_const(tizen.nfc, "NFC_RECORD_TNF_UNCHANGED", 6, "number", 0);
-}, "NFCManager_NFC_RECORD_TNF_UNCHANGED_const");
+}, document.title);
</script>
</body>
<head>
<title>NFCManager_NFC_RECORD_TNF_UNKNOWN_const</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
test(function () {
check_const(tizen.nfc, "NFC_RECORD_TNF_UNKNOWN", 5, "number", 0);
-}, "NFCManager_NFC_RECORD_TNF_UNKNOWN_const");
+}, document.title);
</script>
</body>
<head>
<title>NFCManager_NFC_RECORD_TNF_URI_const</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
test(function () {
check_const(tizen.nfc, "NFC_RECORD_TNF_URI", 3, "number", 0);
-}, "NFCManager_NFC_RECORD_TNF_URI_const");
+}, document.title);
</script>
</body>
<head>
<title>NFCManager_NFC_RECORD_TNF_WELL_KNOWN_const</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
test(function () {
check_const(tizen.nfc, "NFC_RECORD_TNF_WELL_KNOWN", 1, "number", 0);
-}, "NFCManager_NFC_RECORD_TNF_WELL_KNOWN_const");
+}, document.title);
</script>
</body>
<head>
<title>NFCManager_extend</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
test(function () {
check_extensibility(tizen.nfc);
-}, "NFCManager_extend");
+}, document.title);
</script>
</body>
<title>NFCManager_getDefaultAdapter</title>
<meta charset="utf-8">
<script type="text/javascript" src="support/nfc_common.js"></script>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
<script>
//==== TEST: NFCManager_getDefaultAdapter
-//==== LABEL check if NFCManager::getDefaultAdapter() method returns object
+//==== LABEL Check if NFCManager::getDefaultAdapter() method returns object
//==== SPEC Tizen Web API:Communication:NFC:NFCManager:getDefaultAdapter M
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/nfc.html
//==== TEST_CRITERIA MR MNA
assert_inherits(adapter, "unsetTagListener", "adapter does not inherits unsetTagListener");
assert_inherits(adapter, "unsetPeerListener", "adapter does not inherits unsetPeerListener");
assert_inherits(adapter, "getCachedMessage", "adapter does not inherits getCachedMessage");
-}, "NFCManager_getDefaultAdapter");
+}, document.title);
</script>
</body>
<html>
<head>
<title>NFCManager_getDefaultAdapter_exists</title>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
<p><a href="https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/nfc.html">spec reference</a></p>
<div id="log"></div>
<script type="text/javascript">
//==== TEST: NFCManager_getDefaultAdapter_exists
-//==== LABEL Check if getDefaultAdapter method exists
+//==== LABEL Check if method NFCAdapter::getDefaultAdapter() exists
//==== SPEC Tizen Web API:Communication:NFC:NFCManager:getDefaultAdapter M
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/nfc.html
//==== TEST_CRITERIA ME
test(function () {
assert_true("getDefaultAdapter" in tizen.nfc, "Check if getDefaultAdapter method exists");
check_method_exists(tizen.nfc, "getDefaultAdapter");
-}, "NFCManager_getDefaultAdapter_exists");
+}, document.title);
</script>
</body>
<head>
<title>NFCManager_getDefaultAdapter_extra_argument</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
test(function () {
checkExtraArgument(tizen.nfc, "getDefaultAdapter");
-}, "NFCManager_getDefaultAdapter_extra_argument");
+}, document.title);
</script>
</body>
<head>
<title>NFCManager_notexist</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
test(function () {
check_no_interface_object("NFCManager");
-}, "NFCManager_notexist");
+}, document.title);
</script>
</body>
<head>
<title>NFCManager_setExclusiveMode</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
result = null;
result = tizen.nfc.setExclusiveMode(false);
assert_equals(result, undefined, "setExclusiveMode() should return undefined");
-}, "NFCManager_setExclusiveMode");
+}, document.title);
</script>
</body>
<head>
<title>NFCManager_setExclusiveMode_exist</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
"tizen.nfc object should have method setExclusiveMode");
check_method_exists(tizen.nfc, "setExclusiveMode");
-}, "NFCManager_setExclusiveMode_exist");
+}, document.title);
</script>
</body>
<head>
<title>NFCPeer</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
<script type="text/javascript" src="support/nfc_common.js"></script>
</head>
setup({timeout: 90000});
-var t = async_test("NFCPeer_extend", {timeout: 90000});
+var t = async_test(document.title, {timeout: 90000});
t.step(function () {
var adapter, listener;
recordCount: 0
};
- assert_throws({
- name: "TypeMismatchError"
- }, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
peer.sendNDEF(invalidMessage);
});
}, "NFCPeer_sendNDEF_ndefMessage_invalid_obj");
})
};
- assert_throws({
- name: "TypeMismatchError"
- }, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
peer.sendNDEF(message, invalidCallback);
});
}, "NFCPeer_sendNDEF_successCallback_invalid_cb");
})
};
- assert_throws({
- name: "TypeMismatchError"
- }, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
peer.sendNDEF(message, t.step_func(assert_unreached), invalidCallback);
});
}, "NFCPeer_sendNDEF_errorCallback_invalid_cb");
//------------ NFCPeer_sendNDEF_missarg
test(function () {
- assert_throws({
- name: "TypeMismatchError"
- }, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
peer.sendNDEF();
});
}, "NFCPeer_sendNDEF_missarg");
})
};
- assert_throws({
- name: "TypeMismatchError"
- }, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
peer.setReceiveNDEFListener(invalidCallback);
});
}, "NFCPeer_setReceiveNDEFListener_successCallback_invalid_cb");
//------------ NFCPeer_setReceiveNDEFListener_missarg
test(function () {
- assert_throws({
- name: "TypeMismatchError"
- }, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
peer.setReceiveNDEFListener();
});
}, "NFCPeer_setReceiveNDEFListener_missarg");
<head>
<title>NFCPeerDetectCallback_notexist</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
test(function () {
check_no_interface_object("NFCPeerDetectCallback");
-}, "NFCPeerDetectCallback_notexist");
+}, document.title);
</script>
</body>
<head>
<title>NFCPeerDetectCallback_onattach</title>
<script type="text/javascript" src="support/nfc_common.js"></script>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
<div id="log"></div>
<script type="text/javascript">
//==== TEST: NFCPeerDetectCallback_onattach
-//==== LABEL Test setPeerListener for check NFCPeerDetectCallback onattach method
+//==== LABEL Check if NFCPeerDetectCallback::onattach() callback is called with proper argument when NFC peer is detected
//==== EXECUTION_TYPE manual
//==== STEP Click "Run". Move other NFC device close so it will be detected.
//==== EXPECT pass - setPeerListener onSuccess called
//==== PRE Turn on NFC adapter. Prepare the other device with NFC turned on.
//==== TEST_CRITERIA CBOA CBT
-var adapter, t = async_test("NFCPeerDetectCallback_onattach", {timeout: 90000}), onSuccessCB;
+var adapter, t = async_test(document.title, {timeout: 90000}), onSuccessCB;
setup({timeout: 90000});
t.step(function () {
onSuccessCB = {
- onattach : t.step_func(function (nfcPeer) {
+ onattach: t.step_func(function (nfcPeer) {
assert_not_equals(nfcPeer, null, "nfcPeer should not be null");
assert_own_property(nfcPeer, "isConnected", "nfcPeer");
t.done();
}),
- ondetach : t.step_func(function () {
+ ondetach: t.step_func(function () {
adapter.unsetPeerListener();
})
};
<head>
<title>NFCPeerDetectCallback_ondetach</title>
<script type="text/javascript" src="support/nfc_common.js"></script>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
<div id="log"></div>
<script type="text/javascript">
//==== TEST: NFCPeerDetectCallback_ondetach
-//==== LABEL Test NFCAdapter.setPeerListener for check NFCPeerDetectCallback.ondetach
+//==== LABEL Check if NFCPeerDetectCallback::ondetach() is called when NFC peer is taken away
//==== EXECUTION_TYPE manual
//==== STEP Click "Run". Put the other NFC device close to your device until it will be detected and then take it away.
//==== EXPECT pass - peerListener ondetach callback should be invoked
//==== PRE Turn on NFC adapter. Prepare the other device with NFC turned on.
//==== TEST_CRITERIA CBOA
-var adapter, peerListener, t = async_test("NFCPeerDetectCallback_ondetach", {timeout: 90000});
+var adapter, peerListener, t = async_test(document.title, {timeout: 90000});
setup({timeout: 90000});
t.step(function () {
peerListener = {
- onattach : t.step_func(function (nfcPeer) {
+ onattach: t.step_func(function (nfcPeer) {
assert_not_equals(nfcPeer, undefined, "nfcPeer");
assert_own_property(nfcPeer, "isConnected", "nfcPeer");
assert_type(nfcPeer.unsetReceiveNDEFListener, "function", "nfcPeer.unsetReceiveNDEFListener");
assert_type(nfcPeer.sendNDEF, "function", "nfcPeer.sendNDEF");
}),
- ondetach : t.step_func(function () {
+ ondetach: t.step_func(function () {
adapter.unsetPeerListener();
t.done();
})
<head>
<title>NFCPeer_notexist</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
test(function () {
check_no_interface_object("NFCPeer");
-}, "NFCPeer_notexist");
+}, document.title);
</script>
</body>
<head>
<title>NFCPeer_sendNDEF_errorCallback</title>
<script type="text/javascript" src="support/nfc_common.js"></script>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
<div id="log"></div>
<script type="text/javascript">
//==== TEST: NFCPeer_sendNDEF_errorCallback
-//==== LABEL check if errorCallback of sendNDEF can be called successfully when error occurs
+//==== LABEL Check if method NFCPeer::sendNDEF() reports error by calling errorCallback when peer is disconnected
//==== PRIORITY P2
//==== EXECUTION_TYPE manual
//==== STEP Click "Run". Put the other NFC device close to your device until it will be detected and then take it away before the expiration of 3 seconds.
var adapter, ndefMessage, onSuccessCB, successCallback, errorCallback, delayedSend,
- t = async_test("NFCPeer_sendNDEF_errorCallback", {timeout: 90000});
+ t = async_test(document.title, {timeout: 90000});
setup({timeout: 90000});
});
onSuccessCB = {
- onattach : t.step_func(function (nfcPeer) {
+ onattach: t.step_func(function (nfcPeer) {
setTimeout(delayedSend, 3000, nfcPeer);
}),
- ondetach : t.step_func(function () {
+ ondetach: t.step_func(function () {
adapter.unsetPeerListener();
})
};
<div id="log"></div>
<script type="text/javascript">
//==== TEST: NFCPeer_sendNDEF_sendData
-//==== LABEL Check using sendNDEF method which is in NFCPeer interface to send data
+//==== LABEL Check if method NFCPeer::sendNDEF() sends data to other NFC device
//==== PRIORITY P1
//==== EXECUTION_TYPE manual
//==== STEP Click "Run". Move other NFC device close so it will be detected.
//==== TEST_CRITERIA MMINA MR
var adapter, nfcPeer,
- t = async_test("NFCPeer_sendNDEF_sendData", {timeout: 90000}),
+ t = async_test(document.title, {timeout: 90000}),
powerOnSuccess, powerOnError,
peerListener, ndefMessage, returned = null;
<title>NFCPeer_sendNDEF_with_errorCallback</title>
<meta charset="utf-8"/>
<script type="text/javascript" src="support/nfc_common.js"></script>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
<div id="log"></div>
//==== PRE Turn on NFC adapter. Prepare the other device with NFC turned on. Other device should be able to take NDEF message from NFC.
//==== TEST_CRITERIA MOA MR
-var t = async_test("NFCPeer_sendNDEF_with_errorCallback", {timeout: 90000}),
+var t = async_test(document.title, {timeout: 90000}),
adapter, listener, ndefMessage, successCallback, errorCallback,
returnedValue = null;
<title>NFCPeer_sendNDEF_with_successCallback</title>
<meta charset="utf-8"/>
<script type="text/javascript" src="support/nfc_common.js"></script>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
//==== PRE Turn on NFC adapter. Prepare the other device with NFC turned on. Other device should be able to take NDEF message from NFC.
//==== TEST_CRITERIA MOA MR
-var t = async_test("NFCPeer_sendNDEF_with_successCallback", {timeout: 90000}),
+var t = async_test(document.title, {timeout: 90000}),
returnedValue = null, adapter, listener, ndefMessage, successCallback;
setup({timeout: 90000});
<head>
<title>NFCPeer_unsetReceiveNDEFListener</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
//==== PRE Turn on NFC adapter. Prepare the other device with NFC turned on. Other device should be able to send NDEF message by NFC.
//==== TEST_CRITERIA MR MNA MNAST
-var t = async_test("NFCPeer_unsetReceiveNDEFListener", {timeout: 90000});
+var t = async_test(document.title, {timeout: 90000}), adapter, listener, onMessage, returnedValue = null, button = document.getElementById("doneButton");
setup({timeout: 90000});
t.step(function () {
- var adapter, listener, onMessage, returnedValue = null,
- button = document.getElementById("doneButton");
onMessage = t.step_func(function (message) {
assert_unreached("Message received by listener - unsetReceiveNDEFListener() does not work");
<head>
<title>NFCPeer_unsetReceiveNDEFListener_extra_argument</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
//==== PRE Turn on NFC adapter. Prepare the other device with NFC turned on.
//==== TEST_CRITERIA MNAEX
-var adapter, t = async_test("NFCPeer_unsetReceiveNDEFListener_extra_argument", {timeout: 90000});
+var adapter, t = async_test(document.title, {timeout: 90000}), listener;
setup({timeout: 90000});
t.step(function () {
- var listener;
listener = {
onattach: t.step_func(function (peer) {
<head>
<title>NFCTag</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
<script type="text/javascript" src="support/nfc_common.js"></script>
</head>
setup({timeout: 90000});
-var t = async_test("NFCTag_extend", {timeout: 90000});
+var t = async_test(document.title, {timeout: 90000});
t.step(function () {
})
};
- assert_throws({
- name: "TypeMismatchError"
- }, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
tag.readNDEF(invalidCallback);
});
}, "NFCTag_readNDEF_readCallback_invalid_cb");
})
};
- assert_throws({
- name: "TypeMismatchError"
- }, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
tag.readNDEF(t.step_func(assert_unreached), invalidCallback);
});
}, "NFCTag_readNDEF_errorCallback_invalid_cb");
//------------ NFCTag_readNDEF_missarg
test(function () {
- assert_throws({
- name: "TypeMismatchError"
- }, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
tag.readNDEF();
});
}, "NFCTag_readNDEF_missarg");
recordCount: 0
};
- assert_throws({
- name: "TypeMismatchError"
- }, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
tag.writeNDEF(invalidMessage);
});
}, "NFCTag_writeNDEF_ndefMessage_invalid_obj");
})
};
- assert_throws({
- name: "TypeMismatchError"
- }, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
tag.writeNDEF(message, invalidCallback);
});
}, "NFCTag_writeNDEF_successCallback_invalid_cb");
})
};
- assert_throws({
- name: "TypeMismatchError"
- }, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
tag.writeNDEF(message, t.step_func(assert_unreached), invalidCallback);
});
}, "NFCTag_writeNDEF_errorCallback_invalid_cb");
//------------ NFCTag_writeNDEF_missarg
test(function () {
- assert_throws({
- name: "TypeMismatchError"
- }, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
tag.writeNDEF();
});
}, "NFCTag_writeNDEF_missarg");
})
};
- assert_throws({
- name: "TypeMismatchError"
- }, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
tag.transceive(bytes, invalidCallback);
});
}, "NFCTag_transceive_dataCallback_invalid_cb");
})
};
- assert_throws({
- name: "TypeMismatchError"
- }, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
tag.transceive(bytes, t.step_func(assert_unreached), invalidCallback);
});
}, "NFCTag_transceive_errorCallback_invalid_cb");
//------------ NFCTag_transceive_missarg
test(function () {
- assert_throws({
- name: "TypeMismatchError"
- }, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
tag.transceive([]);
});
}, "NFCTag_transceive_missarg");
<head>
<title>NFCTagDetectCallback_notexist</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
test(function () {
check_no_interface_object("NFCTagDetectCallback");
-}, "NFCTagDetectCallback_notexist");
+}, document.title);
</script>
</body>
<div id="log"></div>
<script type="text/javascript">
//==== TEST: NFCTagDetectCallback_onattach
-//==== LABEL Test unsetTagListener for check NFCTagDetectCallback onattach method
+//==== LABEL Check if NFCTagDetectCallback::onattach() callback is called with proper argument when NFC tag is detected
//==== EXECUTION_TYPE manual
//==== STEP Click "Run". Move NFC tag close so it will be detected.
//==== EXPECT pass - after setTagListener onattach callback was called
//==== TEST_CRITERIA CBOA CBT
var adapter, onSuccessCB,
- t = async_test("NFCTagDetectCallback_onattach", {timeout: 90000});
+ t = async_test(document.title, {timeout: 90000});
setup({timeout: 90000});
t.step(function () {
onSuccessCB = {
- onattach : t.step_func(function (nfcTag) {
+ onattach: t.step_func(function (nfcTag) {
assert_not_equals(nfcTag, null, "nfcTag should not be null");
assert_own_property(nfcTag, "type", "nfcTag");
t.done();
}),
- ondetach : t.step_func(function () {
+ ondetach: t.step_func(function () {
adapter.unsetTagListener();
})
};
<div id="log"></div>
<script type="text/javascript">
//==== TEST: NFCTagDetectCallback_ondetach
-//==== LABEL Test NFCAdapter.setTagListener for check NFCTagDetectCallback.ondetach
+//==== LABEL Check if NFCTagDetectCallback::ondetach() callback is called when NFC tag is disconnected
//==== EXECUTION_TYPE manual
//==== STEP Click "Run". Move NFC tag close until it will be detected and then take it away.
//==== EXPECT pass - after setTagListener ondetach callback is called
setup({timeout: 90000});
-var t = async_test("NFCTagDetectCallback_ondetach", {timeout: 90000});
+var t = async_test(document.title, {timeout: 90000}), adapter, tagListener;
t.step(function () {
- var adapter, tagListener;
tagListener = {
onattach: t.step_func(function (nfcTag) {
<head>
<title>NFCTag_notexist</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
test(function () {
check_no_interface_object("NFCTag");
-}, "NFCTag_notexist");
+}, document.title);
</script>
</body>
<div id="log"></div>
<script type="text/javascript">
//==== TEST: NFCTag_readNDEF_errorCallback
-//==== LABEL check if errorCallback of readNDEF can be called successfully when error occurs
+//==== LABEL Check if method NFCTag::readNDEF() reports error by calling errorCallback when NFC tag was disconnected
//==== PRIORITY P2
//==== EXECUTION_TYPE manual
//==== STEP Click "Run". Move NFC tag close until it will be detected and then take it away before the expiration of 3 seconds.
var adapter, onSuccessCB, readCallback, errorCallback, doRead,
- t = async_test("NFCTag_readNDEF_errorCallback", {timeout: 90000});
+ t = async_test(document.title, {timeout: 90000});
setup({timeout: 90000});
});
onSuccessCB = {
- onattach : t.step_func(function (nfcTag) {
+ onattach: t.step_func(function (nfcTag) {
setTimeout(doRead, 3000, nfcTag);
}),
- ondetach : t.step_func(function () {
+ ondetach: t.step_func(function () {
adapter.unsetTagListener();
})
};
<div id="log"></div>
<script type="text/javascript">
//==== TEST: NFCTag_readNDEF_without_errorCallback
-//==== LABEL Check reading NDEF data from NFC tag
+//==== LABEL Check if method NFCTag::readNDEF() successfully reads data from NFC tag
//==== EXECUTION_TYPE manual
//==== STEP Click "Run". Move NFC tag close so it will be detected.
//==== EXPECT pass - read the NDEF data successfully
//==== TEST_CRITERIA CBT CBOA
var adapter, tagListener, readCallback, result = null,
- t = async_test("NFCTag_readNDEF_without_errorCallback", {timeout: 90000});
+ t = async_test(document.title, {timeout: 90000});
setup({timeout: 90000});
<div id="log"></div>
<script type="text/javascript">
//==== TEST: NFCTag_transceive_with_errorCallback
-//==== LABEL check if errorCallback of transceive can be called successfully when error occurs
+//==== LABEL Check if method NFCTag::transceive() reports error by calling errorCallback when NFC tag is disconnected
//==== PRIORITY P2
//==== EXECUTION_TYPE manual
//==== STEP Click "Run". Move NFC tag close until it will be detected and then take it away before the expiration of 3 seconds.
setup({timeout: 90000});
-var t = async_test("NFCTag_transceive_with_errorCallback", {timeout: 90000});
+var t = async_test(document.title, {timeout: 90000}), adapter, tagListener,
+ message = [0x30, 0x00, 0x02, 0xa8]; // READ command for MIFARE tags
t.step(function () {
- var adapter, tagListener,
- message = [0x30, 0x00, 0x02, 0xa8]; // READ command for MIFARE tags
message[4] = 0; // make CRC wrong
<div id="log"></div>
<script type="text/javascript">
//==== TEST: NFCTag_writeNDEF
-//==== LABEL check writeNDEF method
+//==== LABEL Check if method NFCTag::writeNDEF() can be called with only mandatory argument
//==== PRIORITY P2
//==== EXECUTION_TYPE manual
//==== STEP Click "Run". Move NFC tag close so it will be detected.
//==== TEST_CRITERIA MR MMINA
var adapter, tagListener, ndefMessage, returned = null,
- t = async_test("NFCTag_writeNDEF", {timeout: 90000});
+ t = async_test(document.title, {timeout: 90000});
setup({timeout: 90000});
<head>
<title>NFCTag_writeNDEF_with_errorCallback</title>
<script type="text/javascript" src="support/nfc_common.js"></script>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
<div id="log"></div>
<script type="text/javascript">
//==== TEST: NFCTag_writeNDEF_with_errorCallback
-//==== LABEL check if errorCallback of writeNDEF can be called successfully when error occurs
+//==== LABEL Check if method NFCTag::writeNDEF() reports error by calling errorCallback when NFC tag is disconnected
//==== PRIORITY P2
//==== EXECUTION_TYPE manual
//==== STEP Click "Run". Move NFC tag close until it will be detected and then take it away before the expiration of 3 seconds.
//==== TEST_CRITERIA MERRCB
var adapter, ndefMessage, onSuccessCB, successCallback, errorCallback, doWrite,
- t = async_test("NFCTag_writeNDEF_with_errorCallback", {timeout: 90000});
+ t = async_test(document.title, {timeout: 90000});
setup({timeout: 90000});
});
onSuccessCB = {
- onattach : t.step_func(function (nfcTag) {
+ onattach: t.step_func(function (nfcTag) {
setTimeout(doWrite, 3000, nfcTag);
}),
- ondetach : t.step_func(function () {
+ ondetach: t.step_func(function () {
adapter.unsetTagListener();
})
};
<div id="log"></div>
<script type="text/javascript">
//==== TEST: NFCTag_writeNDEF_with_successCallback
-//==== LABEL Check if successfully writing the NDEF Data
+//==== LABEL Check if method NFCTag::writeNDEF() calls successCallback
//==== EXECUTION_TYPE manual
//==== STEP Click "Run". Move NFC tag close so it will be detected.
//==== EXPECT pass - writing the NDEF Data successfully
//==== PRE Turn on NFC adapter. Prepare NFC tag.
//==== TEST_CRITERIA MOA MAST
-var t = async_test("NFCTag_writeNDEF_with_successCallback", {timeout: 90000});
+var t = async_test(document.title, {timeout: 90000}), adapter, nfcTag, tagListener, ndefMessage, successCallback,
+ errorCallback, readSuccess, readError;
setup({timeout: 90000});
t.step(function () {
- var adapter, nfcTag, tagListener, ndefMessage, successCallback, errorCallback, readSuccess, readError;
readSuccess = t.step_func(function (message) {
assert_equals(message.records[0].text, ndefMessage.records[0].text, "message.records[0].text");
<head>
<title>Tizen_nfc_exist</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
test(function () {
assert_own_property(tizen, "nfc", "Tizen should implement NFCManagerObject");
assert_equals(typeof(tizen.nfc), "object", "tizen.nfc should be object");
-}, "Tizen_nfc_exist");
+}, document.title);
</script>
</body>
--- /dev/null
+/*
+
+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) {
+ var exceptionName = "TypeMismatchError",
+ conversionTable;
+ switch (conversionType) {
+ case "enum":
+ 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]
+ ];
+ 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;
+ 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;
+}
+++ /dev/null
-/*
-
-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) {
- var exceptionName = "TypeMismatchError",
- conversionTable;
- switch (conversionType) {
- case "enum":
- 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]
- ];
- 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;
- 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;
-}
<capabilities>
<capability name="nfc"/>
</capabilities>
- <testcase purpose="check if NFCAdapter attribute powered can be got successfully when it is set to true" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P2" id="NFCAdapter_setPowered_on">
+ <testcase purpose="Check if method NFCAdapter::setPowered(true) sets a value of attribute NFCAdapter::powered to true" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P2" id="NFCAdapter_setPowered_on">
<description>
<pre_condition>Turn OFF NFC adapter.</pre_condition>
<steps>
</spec>
</specs>
</testcase>
- <testcase purpose="check if errorCallback of readNDEF can be called successfully when error occurs" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P2" id="NFCTag_readNDEF_errorCallback">
+ <testcase purpose="Check if method NFCTag::readNDEF() reports error by calling errorCallback when NFC tag was disconnected" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P2" id="NFCTag_readNDEF_errorCallback">
<description>
<pre_condition>Turn on NFC adapter. Prepare NFC tag.</pre_condition>
<steps>
</spec>
</specs>
</testcase>
- <testcase purpose="Test NFCAdapter.setTagListener for check NFCTagDetectCallback.ondetach" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P1" id="NFCTagDetectCallback_ondetach">
+ <testcase purpose="Check if NFCTagDetectCallback::ondetach() callback is called when NFC tag is disconnected" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P1" id="NFCTagDetectCallback_ondetach">
<description>
<pre_condition>Turn on NFC adapter. Prepare NFC tag.</pre_condition>
<steps>
</spec>
</specs>
</testcase>
- <testcase purpose="check if errorCallback of transceive can be called successfully when error occurs" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P2" id="NFCTag_transceive_with_errorCallback">
+ <testcase purpose="Check if method NFCTag::transceive() reports error by calling errorCallback when NFC tag is disconnected" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P2" id="NFCTag_transceive_with_errorCallback">
<description>
<pre_condition>Turn on NFC adapter. Prepare NFC tag.</pre_condition>
<steps>
</spec>
</specs>
</testcase>
- <testcase purpose="check if errorCallback of writeNDEF can be called successfully when error occurs" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P2" id="NFCTag_writeNDEF_with_errorCallback">
+ <testcase purpose="Check if method NFCTag::writeNDEF() reports error by calling errorCallback when NFC tag is disconnected" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P2" id="NFCTag_writeNDEF_with_errorCallback">
<description>
<pre_condition>Turn on NFC adapter. Prepare NFC tag.</pre_condition>
<steps>
</spec>
</specs>
</testcase>
- <testcase purpose="Check if successfully unset listener for detecting an NFC tag" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P1" id="NFCAdapter_unsetTagListener">
+ <testcase purpose="Check if method NFCAdapter::unsetTagListener() disables listener for detecting an NFC tag" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P1" id="NFCAdapter_unsetTagListener">
<description>
<pre_condition>Turn on NFC adapter. Prepare NFC tag.</pre_condition>
<steps>
</spec>
</specs>
</testcase>
- <testcase purpose="Check if successfully unset listener for detecting an NFC peer-to-peer target" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P1" id="NFCAdapter_unsetPeerListener">
+ <testcase purpose="Check if method NFCAdapter::unsetPeerListener() disables listener for detecting an NFC peer-to-peer target" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P1" id="NFCAdapter_unsetPeerListener">
<description>
<pre_condition>Turn on NFC adapter. Prepare the other device with NFC turned on.</pre_condition>
<steps>
</spec>
</specs>
</testcase>
- <testcase purpose="check if errorCallback of sendNDEF can be called successfully when error occurs" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P2" id="NFCPeer_sendNDEF_errorCallback">
+ <testcase purpose="Check if method NFCPeer::sendNDEF() reports error by calling errorCallback when peer is disconnected" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P2" id="NFCPeer_sendNDEF_errorCallback">
<description>
<pre_condition>Turn on NFC adapter. Prepare the other device with NFC turned on. Other device should be able to take NDEF message from NFC.</pre_condition>
<steps>
</spec>
</specs>
</testcase>
- <testcase purpose="Test NFCAdapter.setPeerListener for check NFCPeerDetectCallback.ondetach" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P1" id="NFCPeerDetectCallback_ondetach">
+ <testcase purpose="Check if NFCPeerDetectCallback::ondetach() is called when NFC peer is taken away" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P1" id="NFCPeerDetectCallback_ondetach">
<description>
<pre_condition>Turn on NFC adapter. Prepare the other device with NFC turned on.</pre_condition>
<steps>
</spec>
</specs>
</testcase>
- <testcase purpose="Test method NDEFMessage.toByte exists" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P1" id="NDEFMessage_toByte_exists">
+ <testcase purpose="Check if method NDEFMessage::toByte() exists" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P1" id="NDEFMessage_toByte_exists">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NDEFMessage_toByte_exists.html</test_script_entry>
</description>
</spec>
</specs>
</testcase>
- <testcase purpose="Check if getDefaultAdapter method exists" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P1" id="NFCManager_getDefaultAdapter_exists">
+ <testcase purpose="Check if method NFCAdapter::getDefaultAdapter() exists" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P1" id="NFCManager_getDefaultAdapter_exists">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCManager_getDefaultAdapter_exists.html</test_script_entry>
</description>
</spec>
</specs>
</testcase>
- <testcase purpose="Check using sendNDEF method which is in NFCPeer interface to send data" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P1" id="NFCPeer_sendNDEF_sendData">
+ <testcase purpose="Check if method NFCPeer::sendNDEF() sends data to other NFC device" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P1" id="NFCPeer_sendNDEF_sendData">
<description>
<pre_condition>Turn on NFC adapter. Prepare the other device with NFC turned on. Other device should be able to take NDEF message from NFC.</pre_condition>
<steps>
</spec>
</specs>
</testcase>
- <testcase purpose="check if NDEFMessage constructor works without arguments" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P1" id="NDEFMessage_constructor">
+ <testcase purpose="Check if NDEFMessage constructor works without arguments" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P1" id="NDEFMessage_constructor">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NDEFMessage_constructor.html</test_script_entry>
</description>
</spec>
</specs>
</testcase>
- <testcase purpose="check if NDEFMessage constructor works with rawData" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P1" id="NDEFMessage_constructor_rawData">
+ <testcase purpose="Check if NDEFMessage constructor works with rawData" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P1" id="NDEFMessage_constructor_rawData">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NDEFMessage_constructor_rawData.html</test_script_entry>
</description>
</spec>
</specs>
</testcase>
- <testcase purpose="check NDEFMessage constructor with records array" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P1" id="NDEFMessage_constructor_records">
+ <testcase purpose="Check NDEFMessage constructor with NDEF records array" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P1" id="NDEFMessage_constructor_records">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NDEFMessage_constructor_records.html</test_script_entry>
</description>
</spec>
</specs>
</testcase>
- <testcase purpose="Check if attribute recordCount of NDEFMessage exists, has type Number and is readonly" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P1" id="NDEFMessage_recordCount_attribute">
+ <testcase purpose="Check if attribute NDEFMessage::recordCount exists, has type Number and is readonly" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P1" id="NDEFMessage_recordCount_attribute">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NDEFMessage_recordCount_attribute.html</test_script_entry>
</description>
</spec>
</specs>
</testcase>
- <testcase purpose="check whether NDEFMessage:toByte() returns correct byte array of the NDEF message" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P1" id="NDEFMessage_toByte">
+ <testcase purpose="Check whether NDEFMessage:toByte() returns correct byte array of the NDEF message" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P1" id="NDEFMessage_toByte">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NDEFMessage_toByte.html</test_script_entry>
</description>
</spec>
</specs>
</testcase>
- <testcase purpose="check whether NDEFMessage::toByte() returns empty array for empty NDEF message" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P1" id="NDEFMessage_toByte_empty">
+ <testcase purpose="Check whether NDEFMessage::toByte() returns empty array for empty NDEF message" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P1" id="NDEFMessage_toByte_empty">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NDEFMessage_toByte_empty.html</test_script_entry>
</description>
</spec>
</specs>
</testcase>
- <testcase purpose="check NDEFRecord.Constructor with all parameters" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P2" id="NDEFRecord_constructor_tnf">
+ <testcase purpose="Check NDEFRecord constructor with all parameters" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P2" id="NDEFRecord_constructor_tnf">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NDEFRecord_constructor_tnf.html</test_script_entry>
</description>
</spec>
</specs>
</testcase>
- <testcase purpose="check NDEFRecord.Constructor with only mandatory parameters" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P2" id="NDEFRecord_constructor_tnf_with_id">
+ <testcase purpose="Check NDEFRecord constructor with only mandatory parameters" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P2" id="NDEFRecord_constructor_tnf_with_id">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NDEFRecord_constructor_tnf_with_id.html</test_script_entry>
</description>
</spec>
</specs>
</testcase>
- <testcase purpose="check if adapter.setPeerListener() throws an exception when called without argument" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P1" id="NFCAdapter_setPeerListener_missarg">
+ <testcase purpose="Check if adapter.setPeerListener() throws an exception when called without argument" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P1" id="NFCAdapter_setPeerListener_missarg">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCAdapter_setPeerListener_missarg.html</test_script_entry>
</description>
</spec>
</specs>
</testcase>
- <testcase purpose="check if adapter.setTagListener() throws an exception" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P1" id="NFCAdapter_setTagListener_missarg">
+ <testcase purpose="Check if adapter.setTagListener() throws an exception" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P1" id="NFCAdapter_setTagListener_missarg">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCAdapter_setTagListener_missarg.html</test_script_entry>
</description>
</spec>
</specs>
</testcase>
- <testcase purpose="check if NFCManager::getDefaultAdapter() method returns object" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P1" id="NFCManager_getDefaultAdapter">
+ <testcase purpose="Check if NFCManager::getDefaultAdapter() method returns object" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P1" id="NFCManager_getDefaultAdapter">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCManager_getDefaultAdapter.html</test_script_entry>
</description>
</spec>
</specs>
</testcase>
- <testcase purpose="check if NFCAdapter method getCachedMessage exists" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P1" id="NFCAdapter_getCachedMessage_exist">
+ <testcase purpose="Check if method NFCAdapter::getCachedMessage() exists" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P1" id="NFCAdapter_getCachedMessage_exist">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCAdapter_getCachedMessage_exist.html</test_script_entry>
</description>
</spec>
</specs>
</testcase>
- <testcase purpose="check if detectCallback of setPeerListener can be called successfully when NFC peer-to-peer target is detected" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P1" id="NFCAdapter_setPeerListener">
+ <testcase purpose="Check if method NFCAdapter::setPeerListener() successfully registers listener for detecting NFC peer" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P1" id="NFCAdapter_setPeerListener">
<description>
<pre_condition>Turn on NFC adapter. Prepare the other device with NFC turned on.</pre_condition>
<steps>
</spec>
</specs>
</testcase>
- <testcase purpose="check if NFCAdapter method setPeerListener exists" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P1" id="NFCAdapter_setPeerListener_exist">
+ <testcase purpose="Check if method NFCAdapter::setPeerListener() exists" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P1" id="NFCAdapter_setPeerListener_exist">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCAdapter_setPeerListener_exist.html</test_script_entry>
</description>
</spec>
</specs>
</testcase>
- <testcase purpose="check if NFCAdapter method setPowered exists" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P1" id="NFCAdapter_setPowered_exist">
+ <testcase purpose="Check if method NFCAdapter::setPowered() exists" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P1" id="NFCAdapter_setPowered_exist">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCAdapter_setPowered_exist.html</test_script_entry>
</description>
</spec>
</specs>
</testcase>
- <testcase purpose="Check if setTagListener method exists" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P1" id="NFCAdapter_setTagListener_exist">
+ <testcase purpose="Check if NFCAdapter::setTagListener() method exists" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P1" id="NFCAdapter_setTagListener_exist">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCAdapter_setTagListener_exist.html</test_script_entry>
</description>
</spec>
</specs>
</testcase>
- <testcase purpose="Check if unsetPeerListener method exists" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P1" id="NFCAdapter_unsetPeerListener_exist">
+ <testcase purpose="Check if method NFCAdapter::unsetPeerListener() exists" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P1" id="NFCAdapter_unsetPeerListener_exist">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCAdapter_unsetPeerListener_exist.html</test_script_entry>
</description>
</spec>
</specs>
</testcase>
- <testcase purpose="Check if unsetTagListener method exists" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P1" id="NFCAdapter_unsetTagListener_exist">
+ <testcase purpose="Check if method NFCAdapter::unsetTagListener() method exists" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P1" id="NFCAdapter_unsetTagListener_exist">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCAdapter_unsetTagListener_exist.html</test_script_entry>
</description>
</spec>
</specs>
</testcase>
- <testcase purpose="Test setPeerListener for check NFCPeerDetectCallback onattach method" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P1" id="NFCPeerDetectCallback_onattach">
+ <testcase purpose="Check if NFCPeerDetectCallback::onattach() callback is called with proper argument when NFC peer is detected" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P1" id="NFCPeerDetectCallback_onattach">
<description>
<pre_condition>Turn on NFC adapter. Prepare the other device with NFC turned on.</pre_condition>
<steps>
</spec>
</specs>
</testcase>
- <testcase purpose="check if successful callback of setTagListener method is invoked when tagFilter is set to null" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P2" id="NFCAdapter_setTagListener_tagFilter_is_null">
+ <testcase purpose="Check if onattach() callback is called successfully when NFC tag is detected after NFCAdapter::setTagListener() with null tagFilter" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P2" id="NFCAdapter_setTagListener_tagFilter_is_null">
<description>
<pre_condition>Turn on NFC adapter. Prepare NFC tag</pre_condition>
<steps>
</spec>
</specs>
</testcase>
- <testcase purpose="check if successful callback of setTagListener method is invoked with tagFilter parameters" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P2" id="NFCAdapter_setTagListener_with_tagFilter">
+ <testcase purpose="Check if onattach() callback is called successfully when NFC tag is detected after NFCAdapter::setTagListener() with valid tagFilter" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P2" id="NFCAdapter_setTagListener_with_tagFilter">
<description>
<pre_condition>Turn on NFC adapter. Prepare NFC tag.</pre_condition>
<steps>
</spec>
</specs>
</testcase>
- <testcase purpose="Check reading NDEF data from NFC tag" type="compliance" onload_delay="90" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P1" id="NFCTag_readNDEF_without_errorCallback">
+ <testcase purpose="Check if method NFCTag::readNDEF() successfully reads data from NFC tag" type="compliance" onload_delay="90" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P1" id="NFCTag_readNDEF_without_errorCallback">
<description>
<pre_condition>Turn on NFC adapter. Prepare NFC tag.</pre_condition>
<steps>
</spec>
</specs>
</testcase>
- <testcase purpose="Check if tagListener.onattach is invoked in case of successful detection of the NFC tag" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P1" id="NFCAdapter_setTagListener">
+ <testcase purpose="Check if method NFCAdapter::setTagListener() successfully registers listener for detecting NFC tag" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P1" id="NFCAdapter_setTagListener">
<description>
<pre_condition>Turn on NFC adapter. Prepare NFC tag.</pre_condition>
<steps>
</spec>
</specs>
</testcase>
- <testcase purpose="Test unsetTagListener for check NFCTagDetectCallback onattach method" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P1" id="NFCTagDetectCallback_onattach">
+ <testcase purpose="Check if NFCTagDetectCallback::onattach() callback is called with proper argument when NFC tag is detected" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P1" id="NFCTagDetectCallback_onattach">
<description>
<pre_condition>Turn on NFC adapter. Prepare NFC tag</pre_condition>
<steps>
</spec>
</specs>
</testcase>
- <testcase purpose="check writeNDEF method" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P2" id="NFCTag_writeNDEF">
+ <testcase purpose="Check if method NFCTag::writeNDEF() can be called with only mandatory argument" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P2" id="NFCTag_writeNDEF">
<description>
<pre_condition>Turn on NFC adapter. Prepare NFC tag.</pre_condition>
<steps>
</spec>
</specs>
</testcase>
- <testcase purpose="Check if successfully writing the NDEF Data" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P1" id="NFCTag_writeNDEF_with_successCallback">
+ <testcase purpose="Check if method NFCTag::writeNDEF() calls successCallback" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P1" id="NFCTag_writeNDEF_with_successCallback">
<description>
<pre_condition>Turn on NFC adapter. Prepare NFC tag.</pre_condition>
<steps>
</spec>
</specs>
</testcase>
- <testcase purpose="check if NFCAdapter attribute powered can be got successfully when it is set to false" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P2" id="NFCAdapter_setPowered_off">
+ <testcase purpose="Check if method NFCAdapter::setPowered(false) sets a value of attribute NFCAdapter::powered to false" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="manual" priority="P2" id="NFCAdapter_setPowered_off">
<description>
<pre_condition>Turn ON NFC adapter.</pre_condition>
<steps>
</spec>
</specs>
</testcase>
- <testcase purpose="check whether NDEFMessage:toByte() throws exception when NDEFMessage.records contains invalid object" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P2" id="NDEFMessage_toByte_TypeMismatch">
+ <testcase purpose="Check whether NDEFMessage:toByte() throws exception when NDEFMessage.records contains invalid object" type="compliance" status="approved" component="TizenAPI/Communication/NFC" execution_type="auto" priority="P2" id="NDEFMessage_toByte_TypeMismatch">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NDEFMessage_toByte_TypeMismatch.html</test_script_entry>
</description>
<capabilities>
<capability name="nfc"/>
</capabilities>
- <testcase purpose="check if NFCAdapter attribute powered can be got successfully when it is set to true" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCAdapter_setPowered_on">
+ <testcase purpose="Check if method NFCAdapter::setPowered(true) sets a value of attribute NFCAdapter::powered to true" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCAdapter_setPowered_on">
<description>
<pre_condition>Turn OFF NFC adapter.</pre_condition>
<steps>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCAdapter_setPowered_on.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="check if errorCallback of readNDEF can be called successfully when error occurs" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCTag_readNDEF_errorCallback">
+ <testcase purpose="Check if method NFCTag::readNDEF() reports error by calling errorCallback when NFC tag was disconnected" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCTag_readNDEF_errorCallback">
<description>
<pre_condition>Turn on NFC adapter. Prepare NFC tag.</pre_condition>
<steps>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCTag_readNDEF_errorCallback.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="Test NFCAdapter.setTagListener for check NFCTagDetectCallback.ondetach" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCTagDetectCallback_ondetach">
+ <testcase purpose="Check if NFCTagDetectCallback::ondetach() callback is called when NFC tag is disconnected" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCTagDetectCallback_ondetach">
<description>
<pre_condition>Turn on NFC adapter. Prepare NFC tag.</pre_condition>
<steps>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCTagDetectCallback_ondetach.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="check if errorCallback of transceive can be called successfully when error occurs" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCTag_transceive_with_errorCallback">
+ <testcase purpose="Check if method NFCTag::transceive() reports error by calling errorCallback when NFC tag is disconnected" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCTag_transceive_with_errorCallback">
<description>
<pre_condition>Turn on NFC adapter. Prepare NFC tag.</pre_condition>
<steps>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCTag_transceive_with_errorCallback.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="check if errorCallback of writeNDEF can be called successfully when error occurs" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCTag_writeNDEF_with_errorCallback">
+ <testcase purpose="Check if method NFCTag::writeNDEF() reports error by calling errorCallback when NFC tag is disconnected" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCTag_writeNDEF_with_errorCallback">
<description>
<pre_condition>Turn on NFC adapter. Prepare NFC tag.</pre_condition>
<steps>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCTag_writeNDEF_with_errorCallback.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="Check if successfully unset listener for detecting an NFC tag" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCAdapter_unsetTagListener">
+ <testcase purpose="Check if method NFCAdapter::unsetTagListener() disables listener for detecting an NFC tag" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCAdapter_unsetTagListener">
<description>
<pre_condition>Turn on NFC adapter. Prepare NFC tag.</pre_condition>
<steps>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCAdapter_unsetTagListener.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="Check if successfully unset listener for detecting an NFC peer-to-peer target" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCAdapter_unsetPeerListener">
+ <testcase purpose="Check if method NFCAdapter::unsetPeerListener() disables listener for detecting an NFC peer-to-peer target" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCAdapter_unsetPeerListener">
<description>
<pre_condition>Turn on NFC adapter. Prepare the other device with NFC turned on.</pre_condition>
<steps>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCPeer_sendNDEF_with_successCallback.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="check if errorCallback of sendNDEF can be called successfully when error occurs" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCPeer_sendNDEF_errorCallback">
+ <testcase purpose="Check if method NFCPeer::sendNDEF() reports error by calling errorCallback when peer is disconnected" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCPeer_sendNDEF_errorCallback">
<description>
<pre_condition>Turn on NFC adapter. Prepare the other device with NFC turned on. Other device should be able to take NDEF message from NFC.</pre_condition>
<steps>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCPeer_sendNDEF_errorCallback.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="Test NFCAdapter.setPeerListener for check NFCPeerDetectCallback.ondetach" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCPeerDetectCallback_ondetach">
+ <testcase purpose="Check if NFCPeerDetectCallback::ondetach() is called when NFC peer is taken away" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCPeerDetectCallback_ondetach">
<description>
<pre_condition>Turn on NFC adapter. Prepare the other device with NFC turned on.</pre_condition>
<steps>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCPeerDetectCallback_ondetach.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="Test method NDEFMessage.toByte exists" component="TizenAPI/Communication/NFC" execution_type="auto" id="NDEFMessage_toByte_exists">
+ <testcase purpose="Check if method NDEFMessage::toByte() exists" component="TizenAPI/Communication/NFC" execution_type="auto" id="NDEFMessage_toByte_exists">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NDEFMessage_toByte_exists.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="Check if getDefaultAdapter method exists" component="TizenAPI/Communication/NFC" execution_type="auto" id="NFCManager_getDefaultAdapter_exists">
+ <testcase purpose="Check if method NFCAdapter::getDefaultAdapter() exists" component="TizenAPI/Communication/NFC" execution_type="auto" id="NFCManager_getDefaultAdapter_exists">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCManager_getDefaultAdapter_exists.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="Check using sendNDEF method which is in NFCPeer interface to send data" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCPeer_sendNDEF_sendData">
+ <testcase purpose="Check if method NFCPeer::sendNDEF() sends data to other NFC device" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCPeer_sendNDEF_sendData">
<description>
<pre_condition>Turn on NFC adapter. Prepare the other device with NFC turned on. Other device should be able to take NDEF message from NFC.</pre_condition>
<steps>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NDEFMessageReadCallback_notexist.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="check if NDEFMessage constructor works without arguments" component="TizenAPI/Communication/NFC" execution_type="auto" id="NDEFMessage_constructor">
+ <testcase purpose="Check if NDEFMessage constructor works without arguments" component="TizenAPI/Communication/NFC" execution_type="auto" id="NDEFMessage_constructor">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NDEFMessage_constructor.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="check if NDEFMessage constructor works with rawData" component="TizenAPI/Communication/NFC" execution_type="auto" id="NDEFMessage_constructor_rawData">
+ <testcase purpose="Check if NDEFMessage constructor works with rawData" component="TizenAPI/Communication/NFC" execution_type="auto" id="NDEFMessage_constructor_rawData">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NDEFMessage_constructor_rawData.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="check NDEFMessage constructor with records array" component="TizenAPI/Communication/NFC" execution_type="auto" id="NDEFMessage_constructor_records">
+ <testcase purpose="Check NDEFMessage constructor with NDEF records array" component="TizenAPI/Communication/NFC" execution_type="auto" id="NDEFMessage_constructor_records">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NDEFMessage_constructor_records.html</test_script_entry>
</description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NDEFMessage_extend.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="Check if attribute recordCount of NDEFMessage exists, has type Number and is readonly" component="TizenAPI/Communication/NFC" execution_type="auto" id="NDEFMessage_recordCount_attribute">
+ <testcase purpose="Check if attribute NDEFMessage::recordCount exists, has type Number and is readonly" component="TizenAPI/Communication/NFC" execution_type="auto" id="NDEFMessage_recordCount_attribute">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NDEFMessage_recordCount_attribute.html</test_script_entry>
</description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NDEFMessage_records_attribute.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="check whether NDEFMessage:toByte() returns correct byte array of the NDEF message" component="TizenAPI/Communication/NFC" execution_type="auto" id="NDEFMessage_toByte">
+ <testcase purpose="Check whether NDEFMessage:toByte() returns correct byte array of the NDEF message" component="TizenAPI/Communication/NFC" execution_type="auto" id="NDEFMessage_toByte">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NDEFMessage_toByte.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="check whether NDEFMessage::toByte() returns empty array for empty NDEF message" component="TizenAPI/Communication/NFC" execution_type="auto" id="NDEFMessage_toByte_empty">
+ <testcase purpose="Check whether NDEFMessage::toByte() returns empty array for empty NDEF message" component="TizenAPI/Communication/NFC" execution_type="auto" id="NDEFMessage_toByte_empty">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NDEFMessage_toByte_empty.html</test_script_entry>
</description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NDEFRecord_constructor_raw_data.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="check NDEFRecord.Constructor with all parameters" component="TizenAPI/Communication/NFC" execution_type="auto" id="NDEFRecord_constructor_tnf">
+ <testcase purpose="Check NDEFRecord constructor with all parameters" component="TizenAPI/Communication/NFC" execution_type="auto" id="NDEFRecord_constructor_tnf">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NDEFRecord_constructor_tnf.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="check NDEFRecord.Constructor with only mandatory parameters" component="TizenAPI/Communication/NFC" execution_type="auto" id="NDEFRecord_constructor_tnf_with_id">
+ <testcase purpose="Check NDEFRecord constructor with only mandatory parameters" component="TizenAPI/Communication/NFC" execution_type="auto" id="NDEFRecord_constructor_tnf_with_id">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NDEFRecord_constructor_tnf_with_id.html</test_script_entry>
</description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCAdapter_setPeerListener_detectCallback_invalid_cb.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="check if adapter.setPeerListener() throws an exception when called without argument" component="TizenAPI/Communication/NFC" execution_type="auto" id="NFCAdapter_setPeerListener_missarg">
+ <testcase purpose="Check if adapter.setPeerListener() throws an exception when called without argument" component="TizenAPI/Communication/NFC" execution_type="auto" id="NFCAdapter_setPeerListener_missarg">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCAdapter_setPeerListener_missarg.html</test_script_entry>
</description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCAdapter_setTagListener_detectCallback_invalid_cb.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="check if adapter.setTagListener() throws an exception" component="TizenAPI/Communication/NFC" execution_type="auto" id="NFCAdapter_setTagListener_missarg">
+ <testcase purpose="Check if adapter.setTagListener() throws an exception" component="TizenAPI/Communication/NFC" execution_type="auto" id="NFCAdapter_setTagListener_missarg">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCAdapter_setTagListener_missarg.html</test_script_entry>
</description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCManager_extend.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="check if NFCManager::getDefaultAdapter() method returns object" component="TizenAPI/Communication/NFC" execution_type="auto" id="NFCManager_getDefaultAdapter">
+ <testcase purpose="Check if NFCManager::getDefaultAdapter() method returns object" component="TizenAPI/Communication/NFC" execution_type="auto" id="NFCManager_getDefaultAdapter">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCManager_getDefaultAdapter.html</test_script_entry>
</description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCManager_setExclusiveMode_exist.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="check if NFCAdapter method getCachedMessage exists" component="TizenAPI/Communication/NFC" execution_type="auto" id="NFCAdapter_getCachedMessage_exist">
+ <testcase purpose="Check if method NFCAdapter::getCachedMessage() exists" component="TizenAPI/Communication/NFC" execution_type="auto" id="NFCAdapter_getCachedMessage_exist">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCAdapter_getCachedMessage_exist.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="check if detectCallback of setPeerListener can be called successfully when NFC peer-to-peer target is detected" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCAdapter_setPeerListener">
+ <testcase purpose="Check if method NFCAdapter::setPeerListener() successfully registers listener for detecting NFC peer" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCAdapter_setPeerListener">
<description>
<pre_condition>Turn on NFC adapter. Prepare the other device with NFC turned on.</pre_condition>
<steps>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCAdapter_setPeerListener.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="check if NFCAdapter method setPeerListener exists" component="TizenAPI/Communication/NFC" execution_type="auto" id="NFCAdapter_setPeerListener_exist">
+ <testcase purpose="Check if method NFCAdapter::setPeerListener() exists" component="TizenAPI/Communication/NFC" execution_type="auto" id="NFCAdapter_setPeerListener_exist">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCAdapter_setPeerListener_exist.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="check if NFCAdapter method setPowered exists" component="TizenAPI/Communication/NFC" execution_type="auto" id="NFCAdapter_setPowered_exist">
+ <testcase purpose="Check if method NFCAdapter::setPowered() exists" component="TizenAPI/Communication/NFC" execution_type="auto" id="NFCAdapter_setPowered_exist">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCAdapter_setPowered_exist.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="Check if setTagListener method exists" component="TizenAPI/Communication/NFC" execution_type="auto" id="NFCAdapter_setTagListener_exist">
+ <testcase purpose="Check if NFCAdapter::setTagListener() method exists" component="TizenAPI/Communication/NFC" execution_type="auto" id="NFCAdapter_setTagListener_exist">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCAdapter_setTagListener_exist.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="Check if unsetPeerListener method exists" component="TizenAPI/Communication/NFC" execution_type="auto" id="NFCAdapter_unsetPeerListener_exist">
+ <testcase purpose="Check if method NFCAdapter::unsetPeerListener() exists" component="TizenAPI/Communication/NFC" execution_type="auto" id="NFCAdapter_unsetPeerListener_exist">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCAdapter_unsetPeerListener_exist.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="Check if unsetTagListener method exists" component="TizenAPI/Communication/NFC" execution_type="auto" id="NFCAdapter_unsetTagListener_exist">
+ <testcase purpose="Check if method NFCAdapter::unsetTagListener() method exists" component="TizenAPI/Communication/NFC" execution_type="auto" id="NFCAdapter_unsetTagListener_exist">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCAdapter_unsetTagListener_exist.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="Test setPeerListener for check NFCPeerDetectCallback onattach method" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCPeerDetectCallback_onattach">
+ <testcase purpose="Check if NFCPeerDetectCallback::onattach() callback is called with proper argument when NFC peer is detected" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCPeerDetectCallback_onattach">
<description>
<pre_condition>Turn on NFC adapter. Prepare the other device with NFC turned on.</pre_condition>
<steps>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCPeer.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="check if successful callback of setTagListener method is invoked when tagFilter is set to null" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCAdapter_setTagListener_tagFilter_is_null">
+ <testcase purpose="Check if onattach() callback is called successfully when NFC tag is detected after NFCAdapter::setTagListener() with null tagFilter" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCAdapter_setTagListener_tagFilter_is_null">
<description>
<pre_condition>Turn on NFC adapter. Prepare NFC tag</pre_condition>
<steps>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCAdapter_setTagListener_tagFilter_is_null.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="check if successful callback of setTagListener method is invoked with tagFilter parameters" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCAdapter_setTagListener_with_tagFilter">
+ <testcase purpose="Check if onattach() callback is called successfully when NFC tag is detected after NFCAdapter::setTagListener() with valid tagFilter" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCAdapter_setTagListener_with_tagFilter">
<description>
<pre_condition>Turn on NFC adapter. Prepare NFC tag.</pre_condition>
<steps>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCAdapter_setTagListener_with_tagFilter.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="Check reading NDEF data from NFC tag" onload_delay="90" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCTag_readNDEF_without_errorCallback">
+ <testcase purpose="Check if method NFCTag::readNDEF() successfully reads data from NFC tag" onload_delay="90" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCTag_readNDEF_without_errorCallback">
<description>
<pre_condition>Turn on NFC adapter. Prepare NFC tag.</pre_condition>
<steps>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCTag_readNDEF_without_errorCallback.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="Check if tagListener.onattach is invoked in case of successful detection of the NFC tag" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCAdapter_setTagListener">
+ <testcase purpose="Check if method NFCAdapter::setTagListener() successfully registers listener for detecting NFC tag" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCAdapter_setTagListener">
<description>
<pre_condition>Turn on NFC adapter. Prepare NFC tag.</pre_condition>
<steps>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCAdapter_setTagListener.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="Test unsetTagListener for check NFCTagDetectCallback onattach method" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCTagDetectCallback_onattach">
+ <testcase purpose="Check if NFCTagDetectCallback::onattach() callback is called with proper argument when NFC tag is detected" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCTagDetectCallback_onattach">
<description>
<pre_condition>Turn on NFC adapter. Prepare NFC tag</pre_condition>
<steps>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCTagDetectCallback_onattach.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="check writeNDEF method" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCTag_writeNDEF">
+ <testcase purpose="Check if method NFCTag::writeNDEF() can be called with only mandatory argument" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCTag_writeNDEF">
<description>
<pre_condition>Turn on NFC adapter. Prepare NFC tag.</pre_condition>
<steps>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCTag_writeNDEF.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="Check if successfully writing the NDEF Data" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCTag_writeNDEF_with_successCallback">
+ <testcase purpose="Check if method NFCTag::writeNDEF() calls successCallback" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCTag_writeNDEF_with_successCallback">
<description>
<pre_condition>Turn on NFC adapter. Prepare NFC tag.</pre_condition>
<steps>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCTag.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="check if NFCAdapter attribute powered can be got successfully when it is set to false" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCAdapter_setPowered_off">
+ <testcase purpose="Check if method NFCAdapter::setPowered(false) sets a value of attribute NFCAdapter::powered to false" component="TizenAPI/Communication/NFC" execution_type="manual" id="NFCAdapter_setPowered_off">
<description>
<pre_condition>Turn ON NFC adapter.</pre_condition>
<steps>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NFCAdapter_setPowered_off.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="check whether NDEFMessage:toByte() throws exception when NDEFMessage.records contains invalid object" component="TizenAPI/Communication/NFC" execution_type="auto" id="NDEFMessage_toByte_TypeMismatch">
+ <testcase purpose="Check whether NDEFMessage:toByte() throws exception when NDEFMessage.records contains invalid object" component="TizenAPI/Communication/NFC" execution_type="auto" id="NDEFMessage_toByte_TypeMismatch">
<description>
<test_script_entry>/opt/tct-nfc-tizen-tests/nfc/NDEFMessage_toByte_TypeMismatch.html</test_script_entry>
</description>