[iot][deprecatedapi] fix block issue in content 37/310537/1
authorchen <chen89.chen@samsung.com>
Tue, 30 Apr 2024 10:05:17 +0000 (18:05 +0800)
committerchen <chen89.chen@samsung.com>
Tue, 30 Apr 2024 10:05:39 +0000 (18:05 +0800)
Change-Id: I86206dc2b018aa4abd95861f9bb6600a1ec47de0
Signed-off-by: chen <chen89.chen@samsung.com>
97 files changed:
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_createPlaylist.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_createPlaylist_errorCallback_TypeMismatch.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_createPlaylist_errorCallback_invalid_cb.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_createPlaylist_errorCallback_invoked.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_createPlaylist_exist.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_createPlaylist_misarg.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_createPlaylist_noarg.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_createPlaylist_sourcePlaylist_TypeMismatch.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_createPlaylist_successCallback_TypeMismatch.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_createPlaylist_successCallback_invalid_cb.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_createPlaylist_with_sourcePlaylist.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_getPlaylists.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_getPlaylists_errorCallback_TypeMismatch.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_getPlaylists_errorCallback_invalid_cb.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_getPlaylists_exist.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_getPlaylists_misarg.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_getPlaylists_successCallback_TypeMismatch.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_getPlaylists_successCallback_invalid_cb.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_getPlaylists_with_errorCallback.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_removePlaylist.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_removePlaylist_errorCallback_TypeMismatch.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_removePlaylist_errorCallback_invalid_cb.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_removePlaylist_exist.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_removePlaylist_misarg.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_removePlaylist_successCallback_TypeMismatch.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_removePlaylist_successCallback_invalid_cb.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_removePlaylist_with_errorCallback.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/PlaylistArraySuccessCallback_notexist.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/PlaylistArraySuccessCallback_onsuccess.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/PlaylistItemArraySuccessCallback_notexist.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/PlaylistItemArraySuccessCallback_onsuccess.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/PlaylistItem_content_attribute.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/PlaylistItem_extend.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/PlaylistItem_notexist.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/PlaylistSuccessCallback_notexist.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/PlaylistSuccessCallback_onsuccess.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_add.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_addBatch.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_addBatch_errorCallback_TypeMismatch.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_addBatch_errorCallback_invalid_cb.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_addBatch_exist.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_addBatch_items_TypeMismatch.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_addBatch_misarg.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_addBatch_successCallback_TypeMismatch.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_addBatch_successCallback_invalid_cb.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_addBatch_with_errorCallback.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_add_exist.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_add_item_TypeMismatch.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_add_misarg.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_extend.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_get.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_get_errorCallback_TypeMismatch.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_get_errorCallback_invalid_cb.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_get_errorCallback_invoked.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_get_exist.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_get_misarg.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_get_successCallback_TypeMismatch.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_get_successCallback_invalid_cb.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_get_with_offset.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_id_attribute.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_move.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_move_errorCallback_TypeMismatch.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_move_errorCallback_invalid_cb.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_move_errorCallback_invoked.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_move_exist.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_move_item_TypeMismatch.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_move_noarg.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_move_successCallback_TypeMismatch.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_move_successCallback_invalid_cb.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_move_with_errorCallback.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_name_attribute.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_notexist.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_numberOfTracks_attribute.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_remove.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_removeBatch.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_removeBatch_errorCallback_TypeMismatch.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_removeBatch_errorCallback_invalid_cb.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_removeBatch_exist.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_removeBatch_items_TypeMismatch.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_removeBatch_noarg.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_removeBatch_successCallback_TypeMismatch.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_removeBatch_successCallback_invalid_cb.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_removeBatch_with_errorCallback.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_remove_exist.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_remove_item_TypeMismatch.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_remove_noarg.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_setOrder.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_setOrder_errorCallback_TypeMismatch.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_setOrder_errorCallback_invalid_cb.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_setOrder_errorCallback_invoked.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_setOrder_exist.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_setOrder_items_TypeMismatch.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_setOrder_noarg.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_setOrder_successCallback_TypeMismatch.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_setOrder_successCallback_invalid_cb.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_setOrder_with_errorCallback.html [new file with mode: 0755]
iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_thumbnailURI_attribute.html [new file with mode: 0755]

diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_createPlaylist.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_createPlaylist.html
new file mode 100755 (executable)
index 0000000..cf9196c
--- /dev/null
@@ -0,0 +1,63 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>ContentManager_createPlaylist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: ContentManager_createPlaylist\r
+//==== LABEL Check if ContentManager createPlaylist method without optional arguments works properly\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:ContentManager:createPlaylist M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA MMINA MR\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    createSuccess, removePlaylistSuccess, removePlaylistFail, retVal = null;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        assert_equals(retVal, undefined, "createPlaylist should return undefined");\r
+        tizen.content.removePlaylist(playlist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    retVal = tizen.content.createPlaylist(randomString(5), createSuccess);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_createPlaylist_errorCallback_TypeMismatch.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_createPlaylist_errorCallback_TypeMismatch.html
new file mode 100755 (executable)
index 0000000..96f8c28
--- /dev/null
@@ -0,0 +1,64 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>ContentManager_createPlaylist_errorCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: ContentManager_createPlaylist_errorCallback_TypeMismatch\r
+//==== LABEL Check if createPlaylist throws exception when errorCallback is incorrect\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:ContentManager:createPlaylist M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}), conversionTable, successCallback, errorCallback, exceptionName, i;\r
+\r
+t.step(function () {\r
+    conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+    successCallback = t.step_func(function (playlist) {\r
+        assert_unreached("createPlaylist() success callback should not be invoked.");\r
+    });\r
+\r
+    for (i = 0; i < conversionTable.length; i++) {\r
+        errorCallback = conversionTable[i][0];\r
+        exceptionName = conversionTable[i][1];\r
+        assert_throws({name: exceptionName},\r
+            function () {\r
+                tizen.content.createPlaylist("My new playlist", successCallback, errorCallback);\r
+            }, "Given incorrect error callback.");\r
+    }\r
+\r
+    t.done();\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_createPlaylist_errorCallback_invalid_cb.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_createPlaylist_errorCallback_invalid_cb.html
new file mode 100755 (executable)
index 0000000..8896d79
--- /dev/null
@@ -0,0 +1,63 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>ContentManager_createPlaylist_errorCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: ContentManager_createPlaylist_errorCallback_invalid_cb\r
+//==== LABEL Check if createPlaylist throws exception when errorCallback is invalid\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:ContentManager:createPlaylist M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}), successCallback, incorrectCallback;\r
+\r
+t.step(function () {\r
+    incorrectCallback = {\r
+        onerror: t.step_func(function (error) {\r
+            assert_unreached("Invalid error callback invoked:" + error.name + ": " + error.message);\r
+        })\r
+    };\r
+\r
+    successCallback = t.step_func(function (playlist) {\r
+        assert_unreached("createPlaylist() success callback should not be invoked.");\r
+    });\r
+\r
+    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+        tizen.content.createPlaylist("newplaylist", successCallback, incorrectCallback);\r
+    }, "Given incorrect errorCallback.");\r
+\r
+    t.done();\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_createPlaylist_errorCallback_invoked.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_createPlaylist_errorCallback_invoked.html
new file mode 100755 (executable)
index 0000000..ffc9858
--- /dev/null
@@ -0,0 +1,60 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>ContentManager_createPlaylist_errorCallback_invoked</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: ContentManager_createPlaylist_errorCallback_invoked\r
+//==== LABEL Check if ContentManager createPlaylist method with invalid arguments would invoke errorCallback\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:ContentManager:createPlaylist M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MERRCB\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}), createSuccess, createFail;\r
+\r
+t.step(function () {\r
+    createSuccess = t.step_func(function (playlist) {\r
+        assert_unreached("createPlaylist() success callback unreachable");\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_equals(error.name, "InvalidValuesError", "Incorrect error name");\r
+        assert_type(error.message, "string", "Error message is not a string");\r
+        assert_not_equals(error.message, "","Error message is empty");\r
+        t.done();\r
+    });\r
+\r
+    tizen.content.createPlaylist("", createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_createPlaylist_exist.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_createPlaylist_exist.html
new file mode 100755 (executable)
index 0000000..104f684
--- /dev/null
@@ -0,0 +1,45 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>ContentManager_createPlaylist_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: ContentManager_createPlaylist_exist\r
+//==== LABEL Check if createPlaylist exists\r
+//==== SPEC Tizen Web API:Content:Content:ContentManager:createPlaylist M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P0\r
+//==== TEST_CRITERIA ME\r
+\r
+test(function () {\r
+    assert_true("createPlaylist" in tizen.content, "ContentManager should have createPlaylist method");\r
+    check_method_exists(tizen.content, "createPlaylist");\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_createPlaylist_misarg.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_createPlaylist_misarg.html
new file mode 100755 (executable)
index 0000000..a4dca0e
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>ContentManager_createPlaylist_misarg</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: ContentManager_createPlaylist_misarg\r
+//==== LABEL Check if createPlaylist method called with missing non-optional argument throws an exception\r
+//==== SPEC Tizen Web API:Content:Content:ContentManager:createPlaylist M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MMA\r
+\r
+test(function () {\r
+    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+        tizen.content.createPlaylist("newPlaylist");\r
+    }, "Invoked with non-optional arguments.");\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_createPlaylist_noarg.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_createPlaylist_noarg.html
new file mode 100755 (executable)
index 0000000..f4567e6
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>ContentManager_createPlaylist_noarg</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: ContentManager_createPlaylist_noarg\r
+//==== LABEL Check if createPlaylist method called with missing non-optional argument throws an exception\r
+//==== SPEC Tizen Web API:Content:Content:ContentManager:createPlaylist M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MMA\r
+\r
+test(function () {\r
+    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+        tizen.content.createPlaylist();\r
+    }, "Invoked with non-optional arguments.");\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_createPlaylist_sourcePlaylist_TypeMismatch.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_createPlaylist_sourcePlaylist_TypeMismatch.html
new file mode 100755 (executable)
index 0000000..c140c5e
--- /dev/null
@@ -0,0 +1,68 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>ContentManager_createPlaylist_sourcePlaylist_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: ContentManager_createPlaylist_sourcePlaylist_TypeMismatch\r
+//==== LABEL Check if createPlaylist throws exception when sourcePlaylist is incorrect\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:ContentManager:createPlaylist M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}), conversionTable, successCallback, errorCallback, exceptionName, i, sourcePlaylist;\r
+\r
+t.step(function () {\r
+    conversionTable = getTypeConversionExceptions("object", true);\r
+\r
+    successCallback = t.step_func(function (playlist) {\r
+        assert_unreached("createPlaylist() success callback should not be invoked.");\r
+    });\r
+\r
+    errorCallback = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback should not be invoked.");\r
+    });\r
+\r
+    for (i = 0; i < conversionTable.length; i++) {\r
+        sourcePlaylist = conversionTable[i][0];\r
+        exceptionName = conversionTable[i][1];\r
+        assert_throws({name: exceptionName},\r
+            function () {\r
+                tizen.content.createPlaylist("My new playlist", successCallback, errorCallback, sourcePlaylist);\r
+            }, "Given incorrect error callback.");\r
+    }\r
+\r
+    t.done();\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_createPlaylist_successCallback_TypeMismatch.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_createPlaylist_successCallback_TypeMismatch.html
new file mode 100755 (executable)
index 0000000..890e06e
--- /dev/null
@@ -0,0 +1,64 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>ContentManager_createPlaylist_successCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: ContentManager_createPlaylist_successCallback_TypeMismatch\r
+//==== LABEL Check if createPlaylist throws exception when successCallback is incorrect\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:ContentManager:createPlaylist M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}), conversionTable, successCallback, errorCallback, exceptionName, i;\r
+\r
+t.step(function () {\r
+    conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+    errorCallback = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    for (i = 0; i < conversionTable.length; i++) {\r
+        successCallback = conversionTable[i][0];\r
+        exceptionName = conversionTable[i][1];\r
+        assert_throws({name: exceptionName},\r
+            function () {\r
+                tizen.content.createPlaylist("My new playlist", successCallback, errorCallback);\r
+            }, "Given incorrect success callback.");\r
+    }\r
+\r
+    t.done();\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_createPlaylist_successCallback_invalid_cb.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_createPlaylist_successCallback_invalid_cb.html
new file mode 100755 (executable)
index 0000000..93a32a0
--- /dev/null
@@ -0,0 +1,56 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>ContentManager_createPlaylist_successCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: ContentManager_createPlaylist_successCallback_invalid_cb\r
+//==== LABEL Check if createPlaylist throws exception when success callback is invalid\r
+//==== SPEC Tizen Web API:Content:Content:ContentManager:createPlaylist M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MTCB\r
+\r
+test(function () {\r
+    var incorrectCallback;\r
+\r
+    incorrectCallback = {\r
+        onsuccess: function (playlist) {\r
+            assert_unreached("Invalid success callback invoked.");\r
+        }\r
+    };\r
+\r
+    assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+        function () {\r
+            tizen.content.createPlaylist("newplaylist", incorrectCallback);\r
+        }, "Given invalid successCallback.");\r
+\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_createPlaylist_with_sourcePlaylist.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_createPlaylist_with_sourcePlaylist.html
new file mode 100755 (executable)
index 0000000..1a0d3b9
--- /dev/null
@@ -0,0 +1,95 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>ContentManager_createPlaylist_with_sourcePlaylist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: ContentManager_createPlaylist_with_sourcePlaylist\r
+//==== LABEL Check if ContentManager createPlaylist method with all optional arguments works properly\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:ContentManager:createPlaylist M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA MOA MAST\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}), successCallback, errorCallback, getSuccessCallback, getErrorCallback, gPlaylist,\r
+    createSuccess, createFail, removePlaylistSuccess, removePlaylistFail, successCb, errorCb, beforelength = 0, afterlength = 0, id;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    successCb = t.step_func(function (playlists) {\r
+        afterlength = playlists.length;\r
+        assert_greater_than(afterlength, beforelength, "length increase");\r
+        tizen.content.removePlaylist(id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    errorCb = t.step_func(function (error) {\r
+        assert_unreached("getPlaylists() error callback(after create) was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        id = playlist.id;\r
+        tizen.content.getPlaylists(successCb, errorCb);\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    getSuccessCallback = t.step_func(function (playlists) {\r
+        beforelength = playlists.length;\r
+        tizen.content.createPlaylist(randomString(5), createSuccess, createFail, gPlaylist);\r
+    });\r
+\r
+    getErrorCallback = t.step_func(function (error) {\r
+        assert_unreached("getPlaylists() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    successCallback = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.getPlaylists(getSuccessCallback, getErrorCallback);\r
+    });\r
+\r
+    errorCallback = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), successCallback, errorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_getPlaylists.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_getPlaylists.html
new file mode 100755 (executable)
index 0000000..78bca08
--- /dev/null
@@ -0,0 +1,67 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>ContentManager_getPlaylists</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: ContentManager_getPlaylists\r
+//==== LABEL Check if ContentManager getPlaylists method without optional error callback works properly\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:ContentManager:getPlaylists M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA MMINA MR\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}), successCallback, createSuccess, createFail, gPlaylist, removePlaylistSuccess, retVal = null;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    successCallback = t.step_func(function (playlists) {\r
+        assert_equals(retVal, undefined, "getPlaylists should return undefined");\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        retVal = tizen.content.getPlaylists(successCallback);\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+       assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_getPlaylists_errorCallback_TypeMismatch.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_getPlaylists_errorCallback_TypeMismatch.html
new file mode 100755 (executable)
index 0000000..4a0246f
--- /dev/null
@@ -0,0 +1,64 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>ContentManager_getPlaylists_errorCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: ContentManager_getPlaylists_errorCallback_TypeMismatch\r
+//==== LABEL Check if getPlaylists throws exception when errorCallback is incorrect\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:ContentManager:getPlaylists M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}), conversionTable, successCallback, errorCallback, exceptionName, i;\r
+\r
+t.step(function () {\r
+    conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+    successCallback = t.step_func(function () {\r
+        assert_unreached("getPlaylists() success callback should not be invoked.");\r
+    });\r
+\r
+    for (i = 0; i < conversionTable.length; i++) {\r
+        errorCallback = conversionTable[i][0];\r
+        exceptionName = conversionTable[i][1];\r
+        assert_throws({name: exceptionName},\r
+            function () {\r
+                tizen.content.getPlaylists(successCallback, errorCallback);\r
+            }, "Given incorrect error callback.");\r
+    }\r
+\r
+    t.done();\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_getPlaylists_errorCallback_invalid_cb.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_getPlaylists_errorCallback_invalid_cb.html
new file mode 100755 (executable)
index 0000000..2aa4063
--- /dev/null
@@ -0,0 +1,64 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>ContentManager_getPlaylists_errorCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: ContentManager_getPlaylists_errorCallback_invalid_cb\r
+//==== LABEL Check if getPlaylists throws exception when errorCallback is invalid\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:ContentManager:getPlaylists M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}), successCallback, incorrectCallback;\r
+\r
+t.step(function () {\r
+\r
+    incorrectCallback = {\r
+        onerror: t.step_func(function (error) {\r
+            assert_unreached("Invalid error callback invoked:" + error.name + ": " + error.message);\r
+        })\r
+    };\r
+\r
+    successCallback = t.step_func(function () {\r
+        assert_unreached("getPlaylists() success callback should not be invoked.");\r
+    });\r
+\r
+    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+        tizen.content.getPlaylists(successCallback, incorrectCallback);\r
+    }, "Given incorrect errorCallback.");\r
+\r
+    t.done();\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_getPlaylists_exist.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_getPlaylists_exist.html
new file mode 100755 (executable)
index 0000000..92b9f02
--- /dev/null
@@ -0,0 +1,45 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>ContentManager_getPlaylists_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: ContentManager_getPlaylists_exist\r
+//==== LABEL Check if getPlaylists exists\r
+//==== SPEC Tizen Web API:Content:Content:ContentManager:getPlaylists M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P0\r
+//==== TEST_CRITERIA ME\r
+\r
+test(function () {\r
+    assert_true("getPlaylists" in tizen.content, "ContentManager should have getPlaylists method");\r
+    check_method_exists(tizen.content, "getPlaylists");\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_getPlaylists_misarg.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_getPlaylists_misarg.html
new file mode 100755 (executable)
index 0000000..6330c4a
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>ContentManager_getPlaylists_misarg</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: ContentManager_getPlaylists_misarg\r
+//==== LABEL Check if getPlaylists method called with missing non-optional argument throws an exception\r
+//==== SPEC Tizen Web API:Content:Content:ContentManager:getPlaylists M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MMA\r
+\r
+test(function () {\r
+    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+        tizen.content.getPlaylists();\r
+    }, "Invoked with non-optional arguments.");\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_getPlaylists_successCallback_TypeMismatch.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_getPlaylists_successCallback_TypeMismatch.html
new file mode 100755 (executable)
index 0000000..dde1a69
--- /dev/null
@@ -0,0 +1,64 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>ContentManager_getPlaylists_successCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: ContentManager_getPlaylists_successCallback_TypeMismatch\r
+//==== LABEL Check if getPlaylists throws exception when successCallback is incorrect\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:ContentManager:getPlaylists M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}), conversionTable, successCallback, errorCallback, exceptionName, i;\r
+\r
+t.step(function () {\r
+    conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+    errorCallback = t.step_func(function (error) {\r
+        assert_unreached("getPlaylists() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    for (i = 0; i < conversionTable.length; i++) {\r
+        successCallback = conversionTable[i][0];\r
+        exceptionName = conversionTable[i][1];\r
+        assert_throws({name: exceptionName},\r
+            function () {\r
+                tizen.content.getPlaylists(successCallback, errorCallback);\r
+            }, "Given incorrect success callback.");\r
+    }\r
+\r
+    t.done();\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_getPlaylists_successCallback_invalid_cb.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_getPlaylists_successCallback_invalid_cb.html
new file mode 100755 (executable)
index 0000000..c1a1016
--- /dev/null
@@ -0,0 +1,56 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>ContentManager_getPlaylists_successCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: ContentManager_getPlaylists_successCallback_invalid_cb\r
+//==== LABEL Check if getPlaylists throws exception when success callback is invalid\r
+//==== SPEC Tizen Web API:Content:Content:ContentManager:getPlaylists M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MTCB\r
+\r
+test(function () {\r
+    var incorrectCallback;\r
+\r
+    incorrectCallback = {\r
+        onsuccess: function (playlists) {\r
+            assert_unreached("Invalid success callback invoked.");\r
+        }\r
+    };\r
+\r
+    assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+        function () {\r
+            tizen.content.getPlaylists(incorrectCallback);\r
+        }, "Given invalid successCallback.");\r
+\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_getPlaylists_with_errorCallback.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_getPlaylists_with_errorCallback.html
new file mode 100755 (executable)
index 0000000..147c9a2
--- /dev/null
@@ -0,0 +1,71 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>ContentManager_getPlaylists_with_errorCallback</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: ContentManager_getPlaylists_with_errorCallback\r
+//==== LABEL Check if ContentManager getPlaylists method with optional error callback is invoked properly\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:ContentManager:getPlaylists M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MOA MR\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}), successCallback, errorCallback, createSuccess, createFail, removePlaylistSuccess, gPlaylist, retVal = null;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    successCallback = t.step_func(function (playlists) {\r
+        assert_equals(retVal, undefined, "getPlaylists should return undefined");\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess);\r
+    });\r
+\r
+    errorCallback = t.step_func(function (error) {\r
+        assert_unreached("getPlaylists() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        retVal = tizen.content.getPlaylists(successCallback, errorCallback);\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+       assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_removePlaylist.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_removePlaylist.html
new file mode 100755 (executable)
index 0000000..eba6a04
--- /dev/null
@@ -0,0 +1,63 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>ContentManager_removePlaylist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: ContentManager_removePlaylist\r
+//==== LABEL Check if ContentManager removePlaylist method without optional arguments works properly\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:ContentManager:removePlaylist M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA MMINA MR\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    createSuccess, createFail, removePlaylistSuccess, retVal = null;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        assert_equals(retVal, undefined, "removePlaylist should return undefined");\r
+        t.done();\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        retVal = tizen.content.removePlaylist(playlist.id, removePlaylistSuccess);\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+       assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_removePlaylist_errorCallback_TypeMismatch.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_removePlaylist_errorCallback_TypeMismatch.html
new file mode 100755 (executable)
index 0000000..8f8d015
--- /dev/null
@@ -0,0 +1,79 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>ContentManager_removePlaylist_errorCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: ContentManager_removePlaylist_errorCallback_TypeMismatch\r
+//==== LABEL Check if removePlaylist throws exception when successCallback is incorrect\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:ContentManager:removePlaylist M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    createSuccess, createFail, exceptionName, conversionTable, i, successCallback, errorCallback, removePlaylistSuccess, removePlaylistFail;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    successCallback = t.step_func(function () {\r
+        assert_unreached("removePlaylist() success callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+        for (i = 0; i < conversionTable.length; i++) {\r
+            errorCallback = conversionTable[i][0];\r
+            exceptionName = conversionTable[i][1];\r
+            assert_throws({name: exceptionName},\r
+                function () {\r
+                    tizen.content.removePlaylist(playlist.id, successCallback, errorCallback);\r
+            }, "Given incorrect success callback.");\r
+        }\r
+        tizen.content.removePlaylist(playlist.id, removePlaylistSuccess, removePlaylistFail)\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+       assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_removePlaylist_errorCallback_invalid_cb.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_removePlaylist_errorCallback_invalid_cb.html
new file mode 100755 (executable)
index 0000000..b8b34d7
--- /dev/null
@@ -0,0 +1,78 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>ContentManager_removePlaylist_errorCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: ContentManager_removePlaylist_errorCallback_invalid_cb\r
+//==== LABEL Check if removePlaylist throws exception when errorCallback is invalid\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:ContentManager:removePlaylist M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    createSuccess, createFail, incorrectCallback, successCallback, removePlaylistSuccess, removePlaylistFail;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    incorrectCallback = {\r
+        onerror: function (error) {\r
+             assert_unreached("Invalid errorCallback invoked:" + error.name + " msg: " + error.message);\r
+        }\r
+    };\r
+\r
+    successCallback = t.step_func(function () {\r
+       assert_unreached("removePlaylist() success callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+            tizen.content.removePlaylist(playlist.id, successCallback, incorrectCallback);\r
+        }, "Given incorrect errorCallback.");\r
+        tizen.content.removePlaylist(playlist.id, removePlaylistSuccess, removePlaylistFail)\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+       assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_removePlaylist_exist.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_removePlaylist_exist.html
new file mode 100755 (executable)
index 0000000..614aeae
--- /dev/null
@@ -0,0 +1,45 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>ContentManager_removePlaylist_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: ContentManager_removePlaylist_exist\r
+//==== LABEL Check if removePlaylist exists\r
+//==== SPEC Tizen Web API:Content:Content:ContentManager:removePlaylist M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P0\r
+//==== TEST_CRITERIA ME\r
+\r
+test(function () {\r
+    assert_true("removePlaylist" in tizen.content, "ContentManager should have removePlaylist method");\r
+    check_method_exists(tizen.content, "removePlaylist");\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_removePlaylist_misarg.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_removePlaylist_misarg.html
new file mode 100755 (executable)
index 0000000..1ae1231
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>ContentManager_removePlaylist_misarg</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: ContentManager_removePlaylist_misarg\r
+//==== LABEL Check if removePlaylist method called with missing non-optional argument throws an exception\r
+//==== SPEC Tizen Web API:Content:Content:ContentManager:removePlaylist M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MMA\r
+\r
+test(function () {\r
+    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+        tizen.content.removePlaylist();\r
+    }, "Invoked with non-optional arguments.");\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_removePlaylist_successCallback_TypeMismatch.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_removePlaylist_successCallback_TypeMismatch.html
new file mode 100755 (executable)
index 0000000..a695db8
--- /dev/null
@@ -0,0 +1,77 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>ContentManager_removePlaylist_successCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: ContentManager_removePlaylist_successCallback_TypeMismatch\r
+//==== LABEL Check if removePlaylist throws exception when success callback is invalid\r
+//==== SPEC Tizen Web API:Content:Content:ContentManager:removePlaylist M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    createSuccess, createFail, exceptionName, conversionTable, i, successCallback, errorCallback, removePlaylistSuccess, removePlaylistFail;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    errorCallback = t.step_func(function (error) {\r
+        assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        conversionTable = getTypeConversionExceptions("functionObject", true);\r
+        for (i = 0; i < conversionTable.length; i++) {\r
+            successCallback = conversionTable[i][0];\r
+            exceptionName = conversionTable[i][1];\r
+            assert_throws({name: exceptionName},\r
+                function () {\r
+                    tizen.content.removePlaylist(playlist.id, successCallback, errorCallback);\r
+            }, "Given incorrect success callback.");\r
+        }\r
+        tizen.content.removePlaylist(playlist.id, removePlaylistSuccess, removePlaylistFail)\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+       assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_removePlaylist_successCallback_invalid_cb.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_removePlaylist_successCallback_invalid_cb.html
new file mode 100755 (executable)
index 0000000..9230d80
--- /dev/null
@@ -0,0 +1,73 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>ContentManager_removePlaylist_successCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: ContentManager_removePlaylist_successCallback_invalid_cb\r
+//==== LABEL Check if createPlaylist throws exception when successCallback is invalid\r
+//==== SPEC Tizen Web API:Content:Content:ContentManager:removePlaylist M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    createSuccess, createFail, incorrectCallback, removePlaylistSuccess, removePlaylistFail;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    incorrectCallback = {\r
+        onsuccess: function () {\r
+            assert_unreached("Invalid successCallback invoked.");\r
+        }\r
+    };\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+            tizen.content.removePlaylist(playlist.id, incorrectCallback);\r
+        }, "Given incorrect successCallback.");\r
+        tizen.content.removePlaylist(playlist.id, removePlaylistSuccess, removePlaylistFail)\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+       assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_removePlaylist_with_errorCallback.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/ContentManager_removePlaylist_with_errorCallback.html
new file mode 100755 (executable)
index 0000000..03269b8
--- /dev/null
@@ -0,0 +1,88 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>ContentManager_removePlaylist_with_errorCallback</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: ContentManager_removePlaylist_with_errorCallback\r
+//==== LABEL Check if ContentManager removePlaylist method with optional arguments works properly\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:ContentManager:removePlaylist M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA MOA MAST\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    createSuccess, createFail, successCallback, errorCallback, removePlaylistSuccess, removePlaylistFail, successCb, errorCb,\r
+    beforelength = 0, afterlength = 0, id;\r
+\r
+t.step(function () {\r
+    successCb = t.step_func(function (playlists) {\r
+        afterlength = playlists.length;\r
+        assert_less_than(afterlength, beforelength, "length shoulddecrease");\r
+        assert_equals(afterlength, beforelength-1, "length should decrease");\r
+        t.done();\r
+    });\r
+\r
+    errorCb = t.step_func(function (error) {\r
+        assert_unreached("getPlaylists() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        tizen.content.getPlaylists(successCb, errorCb);\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    successCallback = t.step_func(function (playlists) {\r
+        beforelength = playlists.length;\r
+        tizen.content.removePlaylist(id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    errorCallback = t.step_func(function (error) {\r
+        assert_unreached("getPlaylists() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        id = playlist.id;\r
+        tizen.content.getPlaylists(successCallback, errorCallback);\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+       assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/PlaylistArraySuccessCallback_notexist.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/PlaylistArraySuccessCallback_notexist.html
new file mode 100755 (executable)
index 0000000..78444d7
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>PlaylistArraySuccessCallback_notexist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: PlaylistArraySuccessCallback_notexist\r
+//==== LABEL Check if interface PlaylistArraySuccessCallback exists,it should not\r
+//==== SPEC Tizen Web API:Content:Content:PlaylistArraySuccessCallback:PlaylistArraySuccessCallback U\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P3\r
+//==== TEST_CRITERIA CBNIO\r
+\r
+test(function () {\r
+    check_no_interface_object("PlaylistArraySuccessCallback");\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/PlaylistArraySuccessCallback_onsuccess.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/PlaylistArraySuccessCallback_onsuccess.html
new file mode 100755 (executable)
index 0000000..d2b33fb
--- /dev/null
@@ -0,0 +1,77 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>PlaylistArraySuccessCallback_onsuccess</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: PlaylistArraySuccessCallback_onsuccess\r
+//==== LABEL Check if PlaylistArraySuccessCallback onsuccess is called and if its arguments have proper type\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:PlaylistArraySuccessCallback:onsuccess M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA CBT CBOA\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}), successCallback, errorCallback, createSuccess, createFail, removePlaylistSuccess, gPlaylist, retVal = null;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    successCallback = t.step_func(function (playlists) {\r
+        assert_equals(retVal, undefined, "getPlaylists should return undefined");\r
+        assert_type(playlists, "array", "playlists should be an array");\r
+        assert_type(playlists[0], "object", "Incorrect type.");\r
+        assert_type(playlists[0].id, "string", "id type check");\r
+        assert_type(playlists[0].name, "string", "name type check");\r
+        assert_type(playlists[0].numberOfTracks, "long", "numberOfTracks type check");\r
+        assert_equals(playlists[0].thumbnailURI, null, "thumbnailURI type check");\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess);\r
+    });\r
+\r
+    errorCallback = t.step_func(function (error) {\r
+        assert_unreached("getPlaylists() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        retVal = tizen.content.getPlaylists(successCallback, errorCallback);\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+       assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/PlaylistItemArraySuccessCallback_notexist.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/PlaylistItemArraySuccessCallback_notexist.html
new file mode 100755 (executable)
index 0000000..187d00b
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>PlaylistItemArraySuccessCallback_notexist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST:PlaylistItemArraySuccessCallback_notexist\r
+//==== LABEL Check if interface PlaylistItemArraySuccessCallback exists,it should not\r
+//==== SPEC Tizen Web API:Content:Content:PlaylistItemArraySuccessCallback:PlaylistItemArraySuccessCallback U\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P3\r
+//==== TEST_CRITERIA CBNIO\r
+\r
+test(function () {\r
+    check_no_interface_object("PlaylistItemArraySuccessCallback");\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/PlaylistItemArraySuccessCallback_onsuccess.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/PlaylistItemArraySuccessCallback_onsuccess.html
new file mode 100755 (executable)
index 0000000..b06fcf3
--- /dev/null
@@ -0,0 +1,89 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>PlaylistItemArraySuccessCallback_onsuccess</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: PlaylistItemArraySuccessCallback_onsuccess\r
+//==== LABEL Check if PlaylistItemArraySuccessCallback onsuccess is called and if its arguments have proper type\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:PlaylistItemArraySuccessCallback:onsuccess M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA CBT CBOA\r
+\r
+setup({timeout: 90000});\r
+\r
+var t = async_test(document.title, {timeout: 90000}),\r
+    findSuccess, findFail, createSuccess, createFail, onSuccess, onError,\r
+    removePlaylistSuccess, removePlaylistFail, gPlaylist;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    onSuccess = t.step_func(function (items) {\r
+        assert_type(items, "array", "items should be an array");\r
+        assert_type(items[0].content, "object", "content type check");\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    onError = t.step_func(function (error) {\r
+        assert_unreached("get() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 0) {\r
+            gPlaylist.add(contents[0]);\r
+            gPlaylist.get(onSuccess, onError);\r
+        }\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/PlaylistItem_content_attribute.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/PlaylistItem_content_attribute.html
new file mode 100755 (executable)
index 0000000..f002f8d
--- /dev/null
@@ -0,0 +1,91 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>PlaylistItem_content_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: PlaylistItem_content_attribute\r
+//==== LABEL Check if interface PlaylistItem have content attribute with proper type and is readonly\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:PlaylistItem:content A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, successCallback, errorCallback,\r
+    removePlaylistSuccess, removePlaylistFail, gPlaylist;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+        assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    successCallback = t.step_func(function (items) {\r
+        assert_equals(items.length, 1 ,"Playlist items is not found");\r
+        assert_own_property(items[0], "content", "items does not own content property.");\r
+        assert_type(items[0].content, "object", "content should be an object");\r
+        items[0].content = null;\r
+        assert_not_equals(items[0].content, null, "content should not be modified");\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    errorCallback = t.step_func(function (error) {\r
+        assert_unreached("get() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        assert_greater_than(contents.length, 0, "length should greater than 0");\r
+        gPlaylist.add(contents[0]);\r
+        gPlaylist.get(successCallback, errorCallback);\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/PlaylistItem_extend.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/PlaylistItem_extend.html
new file mode 100755 (executable)
index 0000000..6d9dd2a
--- /dev/null
@@ -0,0 +1,89 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>PlaylistItem_extend</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: PlaylistItem_extend\r
+//==== LABEL Check if interface PlaylistItem can have new properties\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:PlaylistItem:PlaylistItem U\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P3\r
+//==== TEST_CRITERIA OBX\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, successCallback, errorCallback,\r
+    removePlaylistSuccess, removePlaylistFail, gPlaylist;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    successCallback = t.step_func(function (items) {\r
+        assert_greater_than(items.length, 0 ,"Playlist items is not found");\r
+        check_extensibility(items);\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    errorCallback = t.step_func(function (error) {\r
+       assert_unreached("get() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 0) {\r
+            gPlaylist.add(contents[0]);\r
+            gPlaylist.get(successCallback, errorCallback);\r
+        }\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/PlaylistItem_notexist.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/PlaylistItem_notexist.html
new file mode 100755 (executable)
index 0000000..f216682
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>PlaylistItem_notexist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: PlaylistItem_notexist\r
+//==== LABEL Check if interface PlaylistItem exists,it should not\r
+//==== SPEC Tizen Web API:Content:Content:PlaylistItem:PlaylistItem U\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P3\r
+//==== TEST_CRITERIA NIO\r
+\r
+test(function () {\r
+    check_no_interface_object("PlaylistItem");\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/PlaylistSuccessCallback_notexist.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/PlaylistSuccessCallback_notexist.html
new file mode 100755 (executable)
index 0000000..a1f6ff4
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>PlaylistSuccessCallback_notexist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: PlaylistSuccessCallback_notexist\r
+//==== LABEL Check if interface PlaylistSuccessCallback exists,it should not\r
+//==== SPEC Tizen Web API:Content:Content:PlaylistSuccessCallback:PlaylistSuccessCallback U\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P3\r
+//==== TEST_CRITERIA CBNIO\r
+\r
+test(function () {\r
+    check_no_interface_object("PlaylistSuccessCallback");\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/PlaylistSuccessCallback_onsuccess.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/PlaylistSuccessCallback_onsuccess.html
new file mode 100755 (executable)
index 0000000..e01e8c8
--- /dev/null
@@ -0,0 +1,68 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>PlaylistSuccessCallback_onsuccess</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: PlaylistSuccessCallback_onsuccess\r
+//==== LABEL Check if PlaylistSuccessCallback onsuccess is called and if its arguments have proper type\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:PlaylistSuccessCallback:PlaylistSuccessCallback U\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA CBT CBOA\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    onSuccess, onError, removePlaylistSuccess;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    onSuccess = t.step_func(function (playlist) {\r
+        assert_not_equals(playlist , null, "Argument should not be null.");\r
+        assert_type(playlist, "object", "Incorrect type.");\r
+        assert_type(playlist.id, "string", "id type check");\r
+        assert_type(playlist.name, "string", "name type check");\r
+        assert_type(playlist.numberOfTracks, "long", "numberOfTracks type check");\r
+        assert_equals(playlist.thumbnailURI, null, "thumbnailURI type check");\r
+        tizen.content.removePlaylist(playlist.id, removePlaylistSuccess);\r
+    });\r
+\r
+    onError = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), onSuccess, onError);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_add.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_add.html
new file mode 100755 (executable)
index 0000000..62b711d
--- /dev/null
@@ -0,0 +1,89 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_add</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_add\r
+//==== LABEL Check if Playlist add method works properly\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:add M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA MR MAST\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail,\r
+    removePlaylistSuccess, removePlaylistFail, gPlaylist, successCallback, errorCallback, i, retVal = null;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    successCallback = t.step_func(function (items) {\r
+        assert_equals(retVal, undefined, "add should return undefined");\r
+        assert_not_equals(items, 0, "items should not be 0");\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    errorCallback = t.step_func(function (error) {\r
+       assert_unreached("get() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 0) {\r
+            retVal = gPlaylist.add(contents[0]);\r
+        }\r
+        gPlaylist.get(successCallback, errorCallback);\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_addBatch.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_addBatch.html
new file mode 100755 (executable)
index 0000000..eb4faf2
--- /dev/null
@@ -0,0 +1,88 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_addBatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_addBatch\r
+//==== LABEL Check if Playlist addBatch method works properly\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:addBatch M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA MR MAST MMINA\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, removePlaylistSuccess, removePlaylistFail, successCallback, errorCallback, gPlaylist ,retVal = null;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    successCallback = t.step_func(function (items) {\r
+        assert_equals(retVal, undefined, "addBatch should return undefined");\r
+        assert_not_equals(items, 0, "items should not be 0");\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    errorCallback = t.step_func(function (error) {\r
+       assert_unreached("get() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 2) {\r
+            retVal = gPlaylist.addBatch([contents[0], contents[1]]);\r
+        }\r
+        gPlaylist.get(successCallback, errorCallback);\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_addBatch_errorCallback_TypeMismatch.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_addBatch_errorCallback_TypeMismatch.html
new file mode 100755 (executable)
index 0000000..beb864e
--- /dev/null
@@ -0,0 +1,91 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_addBatch_errorCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_addBatch_errorCallback_TypeMismatch\r
+//==== LABEL Check if Playlist addBatch method throws exception when errorCallback is incorrect\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:addBatch M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, successCallback, errorCallback, conversionTable, i, exceptionName,\r
+    removePlaylistSuccess, removePlaylistFail, gPlaylist;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    successCallback = t.step_func(function () {\r
+         assert_unreached("addBatch() success callback should not be invoked.");\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 2) {\r
+            conversionTable = getTypeConversionExceptions("functionObject", true);\r
+            for (i = 0; i < conversionTable.length; i++) {\r
+                errorCallback = conversionTable[i][0];\r
+                exceptionName = conversionTable[i][1];\r
+                assert_throws({name: exceptionName},\r
+                    function () {\r
+                        gPlaylist.addBatch([contents[0], contents[1]], successCallback, errorCallback);\r
+                    }, "Given incorrect errorCallback.");\r
+            }\r
+        }\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_addBatch_errorCallback_invalid_cb.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_addBatch_errorCallback_invalid_cb.html
new file mode 100755 (executable)
index 0000000..78d5ff3
--- /dev/null
@@ -0,0 +1,91 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_addBatch_errorCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_addBatch_errorCallback_invalid_cb\r
+//==== LABEL Check if Playlist addBatch method throws exception when errorCallback is invalid\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:addBatch M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, successCallback, incorrectCallback,\r
+    removePlaylistSuccess, removePlaylistFail, gPlaylist;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    incorrectCallback = {\r
+        onerror: function (error) {\r
+             assert_unreached("Invalid errorCallback invoked:" + error.name + " msg: " + error.message);\r
+        }\r
+    };\r
+\r
+    successCallback = t.step_func(function () {\r
+         assert_unreached("addBatch() success callback should not be invoked.");\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 2) {\r
+            assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+                gPlaylist.addBatch([contents[0], contents[1]], successCallback, incorrectCallback);\r
+            }, "Given incorrect errorCallback.");\r
+        }\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_addBatch_exist.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_addBatch_exist.html
new file mode 100755 (executable)
index 0000000..fa9c64a
--- /dev/null
@@ -0,0 +1,66 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_addBatch_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_addBatch_exist\r
+//==== LABEL Check if addBatch exists\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:addBatch M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P0\r
+//==== TEST_CRITERIA ME\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    createSuccess, createFail, removePlaylistSuccess, removePlaylistFail;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        assert_true("addBatch" in playlist, "Playlist should have addBatch method");\r
+        check_method_exists(playlist, "addBatch");\r
+        tizen.content.removePlaylist(playlist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_addBatch_items_TypeMismatch.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_addBatch_items_TypeMismatch.html
new file mode 100755 (executable)
index 0000000..e8c85e7
--- /dev/null
@@ -0,0 +1,71 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_addBatch_items_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_addBatch_items_TypeMismatch\r
+//==== LABEL Check if addBatch throws exception when content is incorrect\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:addBatch M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    createSuccess, createFail, conversionTable, item, i, removePlaylistSuccess, removePlaylistFail;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        conversionTable = getTypeConversionExceptions("object", false);\r
+        for (i = 0; i < conversionTable.length; i++) {\r
+            item = conversionTable[i][0];\r
+            assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+                playlist.addBatch(item);\r
+            }, "Invoked with non-optional arguments.");\r
+        }\r
+        tizen.content.removePlaylist(playlist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_addBatch_misarg.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_addBatch_misarg.html
new file mode 100755 (executable)
index 0000000..f18fd0f
--- /dev/null
@@ -0,0 +1,67 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_addBatch_misarg</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_addBatch_misarg\r
+//==== LABEL Check if addBatch method called with missing non-optional argument throws an exception\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:addBatch M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MMA\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    createSuccess, createFail, removePlaylistSuccess, removePlaylistFail;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+            playlist.addBatch();\r
+        }, "Invoked with non-optional arguments.");\r
+        tizen.content.removePlaylist(playlist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_addBatch_successCallback_TypeMismatch.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_addBatch_successCallback_TypeMismatch.html
new file mode 100755 (executable)
index 0000000..2868056
--- /dev/null
@@ -0,0 +1,91 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_addBatch_successCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_addBatch_successCallback_TypeMismatch\r
+//==== LABEL Check if Playlist addBatch method throws exception when successCallback is incorrect\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:addBatch M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, successCallback, errorCallback, conversionTable, i, exceptionName,\r
+    removePlaylistSuccess, removePlaylistFail, gPlaylist;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    errorCallback = t.step_func(function () {\r
+         assert_unreached("addBatch() error callback should not be invoked.");\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 2) {\r
+            conversionTable = getTypeConversionExceptions("functionObject", true);\r
+            for (i = 0; i < conversionTable.length; i++) {\r
+                successCallback = conversionTable[i][0];\r
+                exceptionName = conversionTable[i][1];\r
+                assert_throws({name: exceptionName},\r
+                    function () {\r
+                        gPlaylist.addBatch([contents[0], contents[1]], successCallback, errorCallback);\r
+                    }, "Given incorrect successCallback.");\r
+            }\r
+        }\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_addBatch_successCallback_invalid_cb.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_addBatch_successCallback_invalid_cb.html
new file mode 100755 (executable)
index 0000000..9eb20e9
--- /dev/null
@@ -0,0 +1,87 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_addBatch_successCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_addBatch_successCallback_invalid_cb\r
+//==== LABEL Check if Playlist addBatch method throws exception when successCallback is invalid\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:addBatch M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, incorrectCallback,\r
+    removePlaylistSuccess, removePlaylistFail, gPlaylist;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    incorrectCallback = {\r
+        onsuccess: function () {\r
+            assert_unreached("Invalid successCallback invoked.");\r
+        }\r
+    };\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 2) {\r
+            assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+                gPlaylist.addBatch([contents[0], contents[1]], incorrectCallback);\r
+            }, "Given incorrect successCallback.");\r
+        }\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_addBatch_with_errorCallback.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_addBatch_with_errorCallback.html
new file mode 100755 (executable)
index 0000000..a997a61
--- /dev/null
@@ -0,0 +1,86 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_addBatch_with_errorCallback</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_addBatch_with_errorCallback\r
+//==== LABEL Check if Playlist addBatch method works properly with all optional arguments\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:addBatch M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA MOA\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, successCallback, errorCallback,\r
+    removePlaylistSuccess, removePlaylistFail, gPlaylist;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    successCallback = t.step_func(function () {\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    errorCallback = t.step_func(function (error) {\r
+        assert_unreached("addBatch() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 2) {\r
+            gPlaylist.addBatch([contents[0], contents[1]], successCallback, errorCallback);\r
+        }\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_add_exist.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_add_exist.html
new file mode 100755 (executable)
index 0000000..caa62c5
--- /dev/null
@@ -0,0 +1,66 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_add_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_add_exist\r
+//==== LABEL Check if add exists\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:add M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P0\r
+//==== TEST_CRITERIA ME\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    createSuccess, createFail, removePlaylistSuccess, removePlaylistFail;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        assert_true("add" in playlist, "Playlist should have add method");\r
+        check_method_exists(playlist, "add");\r
+        tizen.content.removePlaylist(playlist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_add_item_TypeMismatch.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_add_item_TypeMismatch.html
new file mode 100755 (executable)
index 0000000..e5218d4
--- /dev/null
@@ -0,0 +1,72 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_add_item_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_add_item_TypeMismatch\r
+//==== LABEL Check if add throws exception when content is incorrect\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:add M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    createSuccess, createFail, conversionTable, item, exceptionName, i, removePlaylistSuccess, removePlaylistFail;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        conversionTable = getTypeConversionExceptions("object", false);\r
+        for (i = 0; i < conversionTable.length; i++) {\r
+            item = conversionTable[i][0];\r
+            exceptionName = conversionTable[i][1];\r
+            assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+                playlist.add(item);\r
+            }, "Invoked with non-optional arguments.");\r
+        }\r
+        tizen.content.removePlaylist(playlist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_add_misarg.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_add_misarg.html
new file mode 100755 (executable)
index 0000000..9ee345c
--- /dev/null
@@ -0,0 +1,67 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_add_misarg</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_add_misarg\r
+//==== LABEL Check if add method called with missing non-optional argument throws an exception\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:add M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MMA\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    createSuccess, createFail, removePlaylistSuccess, removePlaylistFail;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+            playlist.add();\r
+        }, "Invoked with non-optional arguments.");\r
+        tizen.content.removePlaylist(playlist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_extend.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_extend.html
new file mode 100755 (executable)
index 0000000..49d5f28
--- /dev/null
@@ -0,0 +1,64 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_extend</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_extend\r
+//==== LABEL Check if interface Playlist can have new properties\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:Playlist U\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P3\r
+//==== TEST_CRITERIA OBX\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}), createSuccess, createFail, removePlaylistSuccess, removePlaylistFail;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+        assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        check_extensibility(playlist);\r
+        tizen.content.removePlaylist(playlist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_get.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_get.html
new file mode 100755 (executable)
index 0000000..a501122
--- /dev/null
@@ -0,0 +1,84 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_get</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_get\r
+//==== LABEL Check if Playlist get method works properly\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:get M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA MR MMINA\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, successCallback,\r
+    removePlaylistSuccess, removePlaylistFail, gPlaylist, retVal = null;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    successCallback = t.step_func(function (items) {\r
+        assert_equals(retVal, undefined, "get should return undefined");\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 0) {\r
+            gPlaylist.add(contents[0]);\r
+            retVal = gPlaylist.get(successCallback);\r
+        }\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_get_errorCallback_TypeMismatch.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_get_errorCallback_TypeMismatch.html
new file mode 100755 (executable)
index 0000000..377d033
--- /dev/null
@@ -0,0 +1,92 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_get_errorCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_get_errorCallback_TypeMismatch\r
+//==== LABEL Check if Playlist get method throws exception when errorCallback is incorrect\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:get M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, successCallback, errorCallback, conversionTable, i, exceptionName,\r
+    removePlaylistSuccess, removePlaylistFail, gPlaylist;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    successCallback = t.step_func(function () {\r
+         assert_unreached("get() success callback should not be invoked.");\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 0) {\r
+            gPlaylist.add(contents[0]);\r
+            conversionTable = getTypeConversionExceptions("functionObject", true);\r
+            for (i = 0; i < conversionTable.length; i++) {\r
+                errorCallback = conversionTable[i][0];\r
+                exceptionName = conversionTable[i][1];\r
+                assert_throws({name: exceptionName},\r
+                    function () {\r
+                        gPlaylist.get(successCallback, errorCallback);\r
+                    }, "Given incorrect errorCallback.");\r
+            }\r
+            tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+        }\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_get_errorCallback_invalid_cb.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_get_errorCallback_invalid_cb.html
new file mode 100755 (executable)
index 0000000..2772e79
--- /dev/null
@@ -0,0 +1,92 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_get_errorCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_get_errorCallback_invalid_cb\r
+//==== LABEL Check if Playlist get method throws exception when errorCallback is incorrect\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:get M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, successCallback, incorrectCallback,\r
+    removePlaylistSuccess, removePlaylistFail, gPlaylist;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    incorrectCallback = {\r
+        onerror: t.step_func(function (error) {\r
+            assert_unreached("Invalid errorCallback invoked:" + error.name + " msg: " + error.message);\r
+        })\r
+    };\r
+\r
+    successCallback = t.step_func(function () {\r
+         assert_unreached("get() success callback should not be invoked.");\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 0) {\r
+            gPlaylist.add(contents[0]);\r
+            assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+                gPlaylist.get(successCallback, incorrectCallback);\r
+            }, "Given incorrect errorCallback.");\r
+            tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+        }\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_get_errorCallback_invoked.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_get_errorCallback_invoked.html
new file mode 100755 (executable)
index 0000000..09259bb
--- /dev/null
@@ -0,0 +1,90 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_get_errorCallback_invoked</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_get_errorCallback_invoked\r
+//==== LABEL Check if Playlist get method with invalid arguments would invoke errorCallback\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:get M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MERRCB\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, successCallback, errorCallback, count = 1, offset = -1,\r
+    removePlaylistSuccess, removePlaylistFail, gPlaylist;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    successCallback = t.step_func(function (items) {\r
+        assert_unreached("get() success callback unreachable");\r
+    });\r
+\r
+    errorCallback = t.step_func(function (error) {\r
+        assert_equals(error.name, "InvalidValuesError", "Incorrect error name");\r
+        assert_type(error.message, "string", "Error message is not a string");\r
+        assert_not_equals(error.message, "","Error message is empty");\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 0) {\r
+            gPlaylist.add(contents[0]);\r
+            gPlaylist.get(successCallback, errorCallback, count, offset);\r
+        }\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_get_exist.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_get_exist.html
new file mode 100755 (executable)
index 0000000..a922099
--- /dev/null
@@ -0,0 +1,66 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_get_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_get_exist\r
+//==== LABEL Check if get exists\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:get M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P0\r
+//==== TEST_CRITERIA ME\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    createSuccess, createFail, removePlaylistSuccess, removePlaylistFail;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        assert_true("get" in playlist, "Playlist should have get method");\r
+        check_method_exists(playlist, "get");\r
+        tizen.content.removePlaylist(playlist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_get_misarg.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_get_misarg.html
new file mode 100755 (executable)
index 0000000..272fc43
--- /dev/null
@@ -0,0 +1,81 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_get_misarg</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_get_misarg\r
+//==== LABEL Check if get method called with missing non-optional argument throws an exception\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:get M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MMA\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, removePlaylistSuccess, removePlaylistFail, gPlaylist;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 0) {\r
+            gPlaylist.add(contents[0]);\r
+            assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+                gPlaylist.get();\r
+            }, "Invoked with non-optional arguments.");\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+        }\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_get_successCallback_TypeMismatch.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_get_successCallback_TypeMismatch.html
new file mode 100755 (executable)
index 0000000..a8ed29b
--- /dev/null
@@ -0,0 +1,92 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_get_successCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_get_successCallback_TypeMismatch\r
+//==== LABEL Check if Playlist get method throws exception when successCallback is incorrect\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:get M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, successCallback, errorCallback, conversionTable, i, exceptionName,\r
+    removePlaylistSuccess, removePlaylistFail, gPlaylist;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    errorCallback = t.step_func(function (error) {\r
+         assert_unreached("get() error callback should not be invoked.");\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 0) {\r
+            gPlaylist.add(contents[0]);\r
+            conversionTable = getTypeConversionExceptions("functionObject", true);\r
+            for (i = 0; i < conversionTable.length; i++) {\r
+                successCallback = conversionTable[i][0];\r
+                exceptionName = conversionTable[i][1];\r
+                assert_throws({name: exceptionName},\r
+                    function () {\r
+                        gPlaylist.get(successCallback, errorCallback);\r
+                    }, "Given incorrect successCallback.");\r
+            }\r
+            tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+        }\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_get_successCallback_invalid_cb.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_get_successCallback_invalid_cb.html
new file mode 100755 (executable)
index 0000000..5956e91
--- /dev/null
@@ -0,0 +1,89 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_get_successCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_get_successCallback_invalid_cb\r
+//==== LABEL Check if Playlist get method throws exception when successCallback is invalid\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:get M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, incorrectCallback,\r
+    removePlaylistSuccess, removePlaylistFail, gPlaylist;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    incorrectCallback = {\r
+        onsuccess: function (items) {\r
+            assert_unreached("Invalid successCallback invoked.");\r
+        }\r
+    };\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 0) {\r
+            gPlaylist.add(contents[0]);\r
+            assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+                function () {\r
+                    gPlaylist.get(incorrectCallback);\r
+                }, "Given incorrect successCallback.");\r
+            tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+        }\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_get_with_offset.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_get_with_offset.html
new file mode 100755 (executable)
index 0000000..4898abc
--- /dev/null
@@ -0,0 +1,87 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_get_with_offset</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_get_with_offset\r
+//==== LABEL Check if Playlist get method works properly with all optional arguments\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:get M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA MOA\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, successCallback, errorCallback, count = 1, offset = 1,\r
+    removePlaylistSuccess, removePlaylistFail, gPlaylist;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    successCallback = t.step_func(function (items) {\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    errorCallback = t.step_func(function (error) {\r
+        assert_unreached("get() error callback unreachable");\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 0) {\r
+            gPlaylist.add(contents[0]);\r
+            gPlaylist.get(successCallback, errorCallback, count, offset);\r
+        }\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_id_attribute.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_id_attribute.html
new file mode 100755 (executable)
index 0000000..d552b04
--- /dev/null
@@ -0,0 +1,69 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_id_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_id_attribute\r
+//==== LABEL Check if Playlist have id attribute with proper type and is readonly\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:id A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    createSuccess, createFail, removePlaylistSuccess, removePlaylistFail;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+        assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        assert_own_property(playlist, "id", "playlist does not own id property.");\r
+        assert_type(playlist.id, "string", "id should be an string");\r
+        check_readonly(playlist, "id", playlist.id, "string", playlist.id + "abc");\r
+        tizen.content.removePlaylist(playlist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_move.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_move.html
new file mode 100755 (executable)
index 0000000..4c12129
--- /dev/null
@@ -0,0 +1,99 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_move</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_move\r
+//==== LABEL Check if Playlist move method works properly without optional arguments\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:move M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA MR MMINA\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, successCallback, errorCallback, addsuccessCallback, adderrorCallback,\r
+    moveSuccess, removePlaylistSuccess, removePlaylistFail, gPlaylist, retVal = null;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    moveSuccess = t.step_func(function () {\r
+        assert_equals(retVal, undefined, "move should return undefined");\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    successCallback = t.step_func(function (items) {\r
+        retVal = gPlaylist.move(items[1], -1, moveSuccess);\r
+    });\r
+\r
+    errorCallback = t.step_func(function (error) {\r
+        assert_unreached("get() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    addsuccessCallback = t.step_func(function () {\r
+        gPlaylist.get(successCallback, errorCallback);\r
+    });\r
+\r
+    adderrorCallback = t.step_func(function (error) {\r
+        assert_unreached("addBatch() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 2) {\r
+            gPlaylist.addBatch([contents[0], contents[1]], addsuccessCallback, adderrorCallback);\r
+        }\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_move_errorCallback_TypeMismatch.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_move_errorCallback_TypeMismatch.html
new file mode 100755 (executable)
index 0000000..8878a93
--- /dev/null
@@ -0,0 +1,107 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_move_errorCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_move_errorCallback_TypeMismatch\r
+//==== LABEL Check if Playlist move method throws exception when errorCallback is incorrect\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:move M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, successCallback, errorCallback, addsuccessCallback, adderrorCallback,\r
+    moveSuccess, moveFail, removePlaylistSuccess, removePlaylistFail, gPlaylist, conversionTable, i, exceptionName;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    moveSuccess = t.step_func(function () {\r
+        assert_unreached("move() success callback should not be invoked.");\r
+    });\r
+\r
+    successCallback = t.step_func(function (items) {\r
+        conversionTable = getTypeConversionExceptions("functionObject", true);\r
+        for (i = 0; i < conversionTable.length; i++) {\r
+            moveFail = conversionTable[i][0];\r
+            exceptionName = conversionTable[i][1];\r
+            assert_throws({name: exceptionName},\r
+                function () {\r
+                    gPlaylist.move(items[1], -1, moveSuccess, moveFail);\r
+                }, "Given incorrect errorCallback.");\r
+        }\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    errorCallback = t.step_func(function (error) {\r
+        assert_unreached("get() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    addsuccessCallback = t.step_func(function () {\r
+        gPlaylist.get(successCallback, errorCallback);\r
+    });\r
+\r
+    adderrorCallback = t.step_func(function (error) {\r
+        assert_unreached("addBatch() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 2) {\r
+            gPlaylist.addBatch([contents[0], contents[1]], addsuccessCallback, adderrorCallback);\r
+        }\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_move_errorCallback_invalid_cb.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_move_errorCallback_invalid_cb.html
new file mode 100755 (executable)
index 0000000..2479df7
--- /dev/null
@@ -0,0 +1,108 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_move_errorCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_move_errorCallback_invalid_cb\r
+//==== LABEL Check if Playlist move method throws exception when errorCallback is invalid\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:move M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, successCallback, errorCallback, addsuccessCallback, adderrorCallback,\r
+    moveSuccess, incorrectCallback, removePlaylistSuccess, removePlaylistFail, gPlaylist;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    moveSuccess = t.step_func(function () {\r
+        assert_unreached("move() success callback should not be invoked.");\r
+    });\r
+\r
+    incorrectCallback = {\r
+        onsuccess: function (error) {\r
+             assert_unreached("Invalid errorCallback invoked:" + error.name + " msg: " + error.message);\r
+        }\r
+    };\r
+\r
+    successCallback = t.step_func(function (items) {\r
+        assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+            function () {\r
+                gPlaylist.move(items[1], -1, moveSuccess, incorrectCallback);\r
+            }, "Given incorrect errorCallback.");\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    errorCallback = t.step_func(function (error) {\r
+        assert_unreached("get() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    addsuccessCallback = t.step_func(function () {\r
+        gPlaylist.get(successCallback, errorCallback);\r
+    });\r
+\r
+    adderrorCallback = t.step_func(function (error) {\r
+        assert_unreached("addBatch() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 2) {\r
+            gPlaylist.addBatch([contents[0], contents[1]], addsuccessCallback, adderrorCallback);\r
+        }\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_move_errorCallback_invoked.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_move_errorCallback_invoked.html
new file mode 100755 (executable)
index 0000000..6050352
--- /dev/null
@@ -0,0 +1,105 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_move_errorCallback_invoked</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_move_errorCallback_invoked\r
+//==== LABEL Check if Playlist move method with invalid arguments would invoke errorCallback\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:move M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MERRCB\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, successCallback, errorCallback, addsuccessCallback, adderrorCallback,\r
+    moveSuccess, moveFail, removePlaylistSuccess, removePlaylistFail, gPlaylist;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    moveSuccess = t.step_func(function () {\r
+        assert_unreached("move() success callback should not be invoked.");\r
+    });\r
+\r
+    moveFail = t.step_func(function (error) {\r
+        assert_equals(error.name, "InvalidValuesError", "Incorrect error name");\r
+        assert_type(error.message, "string", "Error message is not a string");\r
+        assert_not_equals(error.message, "","Error message is empty");\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    successCallback = t.step_func(function (items) {\r
+        gPlaylist.remove(items[0]);\r
+        gPlaylist.move(items[0], items.length, moveSuccess, moveFail);\r
+    });\r
+\r
+    errorCallback = t.step_func(function (error) {\r
+        assert_unreached("get() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    addsuccessCallback = t.step_func(function () {\r
+        gPlaylist.get(successCallback, errorCallback);\r
+    });\r
+\r
+    adderrorCallback = t.step_func(function (error) {\r
+        assert_unreached("addBatch() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        assert_greater_than(contents.length, 2, "length should greater than 2");\r
+        gPlaylist.addBatch([contents[0], contents[1]], addsuccessCallback, adderrorCallback);\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_move_exist.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_move_exist.html
new file mode 100755 (executable)
index 0000000..44ad997
--- /dev/null
@@ -0,0 +1,66 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_move_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_move_exist\r
+//==== LABEL Check if move exists\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:move M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P0\r
+//==== TEST_CRITERIA ME\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    createSuccess, createFail, removePlaylistSuccess, removePlaylistFail;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        assert_true("move" in playlist, "Playlist should have move method");\r
+        check_method_exists(playlist, "move");\r
+        tizen.content.removePlaylist(playlist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_move_item_TypeMismatch.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_move_item_TypeMismatch.html
new file mode 100755 (executable)
index 0000000..4a804f2
--- /dev/null
@@ -0,0 +1,111 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_move_item_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_move_item_TypeMismatch\r
+//==== LABEL Check if Playlist move method throws exception when item is incorrect\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:move M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, successCallback, errorCallback, addsuccessCallback, adderrorCallback,\r
+    moveSuccess, moveFail, removePlaylistSuccess, removePlaylistFail, gPlaylist, conversionTable, i, exceptionName;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    moveSuccess = t.step_func(function () {\r
+        assert_unreached("move() success callback should not be invoked.");\r
+    });\r
+\r
+    moveFail = t.step_func(function (error) {\r
+        assert_unreached("move() error callback should not be invoked.");\r
+    });\r
+\r
+    successCallback = t.step_func(function (items) {\r
+        conversionTable = getTypeConversionExceptions("object", true);\r
+        for (i = 0; i < conversionTable.length; i++) {\r
+            items = conversionTable[i][0];\r
+            exceptionName = conversionTable[i][1];\r
+            assert_throws({name: exceptionName},\r
+                function () {\r
+                    gPlaylist.move(items, -1, moveSuccess, moveFail);\r
+                }, "Given incorrect errorCallback.");\r
+        }\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    errorCallback = t.step_func(function (error) {\r
+        assert_unreached("get() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    addsuccessCallback = t.step_func(function () {\r
+        gPlaylist.get(successCallback, errorCallback);\r
+    });\r
+\r
+    adderrorCallback = t.step_func(function (error) {\r
+        assert_unreached("addBatch() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 2) {\r
+            gPlaylist.addBatch([contents[0], contents[1]], addsuccessCallback, adderrorCallback);\r
+        }\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_move_noarg.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_move_noarg.html
new file mode 100755 (executable)
index 0000000..1bcc1bd
--- /dev/null
@@ -0,0 +1,97 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_move_noarg</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_move_noarg\r
+//==== LABEL Check if move method called with missing non-optional argument throws an exception\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:move M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MMA\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, successCallback, errorCallback, addsuccessCallback, adderrorCallback,\r
+    removePlaylistSuccess, removePlaylistFail, gPlaylist;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    successCallback = t.step_func(function (items) {\r
+        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+            gPlaylist.move();\r
+        }, "miss argument");\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    errorCallback = t.step_func(function (error) {\r
+        assert_unreached("get() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    addsuccessCallback = t.step_func(function () {\r
+        gPlaylist.get(successCallback, errorCallback);\r
+    });\r
+\r
+    adderrorCallback = t.step_func(function (error) {\r
+        assert_unreached("addBatch() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 2) {\r
+            gPlaylist.addBatch([contents[0], contents[1]], addsuccessCallback, adderrorCallback);\r
+        }\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_move_successCallback_TypeMismatch.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_move_successCallback_TypeMismatch.html
new file mode 100755 (executable)
index 0000000..97ec74f
--- /dev/null
@@ -0,0 +1,107 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_move_successCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_move_successCallback_TypeMismatch\r
+//==== LABEL Check if Playlist move method throws exception when successCallback is incorrect\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:move M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, successCallback, errorCallback, addsuccessCallback, adderrorCallback,\r
+    moveSuccess, moveFail, removePlaylistSuccess, removePlaylistFail, gPlaylist, conversionTable, i, exceptionName;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    moveFail = t.step_func(function (error) {\r
+        assert_unreached("move() error callback should not be invoked.");\r
+    });\r
+\r
+    successCallback = t.step_func(function (items) {\r
+        conversionTable = getTypeConversionExceptions("functionObject", true);\r
+        for (i = 0; i < conversionTable.length; i++) {\r
+            moveSuccess = conversionTable[i][0];\r
+            exceptionName = conversionTable[i][1];\r
+            assert_throws({name: exceptionName},\r
+                function () {\r
+                    gPlaylist.move(items[1], -1, moveSuccess, moveFail);\r
+                }, "Given incorrect errorCallback.");\r
+        }\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    errorCallback = t.step_func(function (error) {\r
+        assert_unreached("get() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    addsuccessCallback = t.step_func(function () {\r
+        gPlaylist.get(successCallback, errorCallback);\r
+    });\r
+\r
+    adderrorCallback = t.step_func(function (error) {\r
+        assert_unreached("addBatch() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 2) {\r
+            gPlaylist.addBatch([contents[0], contents[1]], addsuccessCallback, adderrorCallback);\r
+        }\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_move_successCallback_invalid_cb.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_move_successCallback_invalid_cb.html
new file mode 100755 (executable)
index 0000000..1e377b5
--- /dev/null
@@ -0,0 +1,108 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_move_successCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_move_successCallback_invalid_cb\r
+//==== LABEL Check if Playlist move method throws exception when successCallback is invalid\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:move M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, successCallback, errorCallback, addsuccessCallback, adderrorCallback,\r
+    moveFail, incorrectCallback, removePlaylistSuccess, removePlaylistFail, gPlaylist;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    moveFail = t.step_func(function (error) {\r
+        assert_unreached("move() error callback should not be invoked.");\r
+    });\r
+\r
+    incorrectCallback = {\r
+        onsuccess: function (error) {\r
+             assert_unreached("Invalid errorCallback invoked:" + error.name + " msg: " + error.message);\r
+        }\r
+    };\r
+\r
+    successCallback = t.step_func(function (items) {\r
+        assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+            function () {\r
+                gPlaylist.move(items[1], -1, incorrectCallback, moveFail);\r
+            }, "Given incorrect errorCallback.");\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    errorCallback = t.step_func(function (error) {\r
+        assert_unreached("get() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    addsuccessCallback = t.step_func(function () {\r
+        gPlaylist.get(successCallback, errorCallback);\r
+    });\r
+\r
+    adderrorCallback = t.step_func(function (error) {\r
+        assert_unreached("addBatch() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 2) {\r
+            gPlaylist.addBatch([contents[0], contents[1]], addsuccessCallback, adderrorCallback);\r
+        }\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_move_with_errorCallback.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_move_with_errorCallback.html
new file mode 100755 (executable)
index 0000000..d7bcd31
--- /dev/null
@@ -0,0 +1,111 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_move_with_errorCallback</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_move_with_errorCallback\r
+//==== LABEL Check if Playlist move method works properly with all optional arguments\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:move M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA MOA MAST\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, getsuccessCallback, geterrorCallback, addsuccessCallback, adderrorCallback,\r
+    moveSuccess, moveFail, removePlaylistSuccess, removePlaylistFail, gPlaylist, gItmes, get2successCallback, get2errorCallback;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+        assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    get2successCallback = t.step_func(function (items) {\r
+        assert_equals(items[0].content.id, gItmes[1].content.id, "after moving items[0] should be the same with gItmes[1]");\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    get2errorCallback = t.step_func(function (error) {\r
+        assert_unreached("get() error callback (after move)was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    moveSuccess = t.step_func(function () {\r
+        gPlaylist.get(get2successCallback, get2errorCallback);\r
+    });\r
+\r
+    moveFail = t.step_func(function (error) {\r
+        assert_unreached("move() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    getsuccessCallback = t.step_func(function (items) {\r
+        gItmes = items;\r
+        gPlaylist.move(items[1], -1, moveSuccess, moveFail);\r
+    });\r
+\r
+    geterrorCallback = t.step_func(function (error) {\r
+        assert_unreached("get() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    addsuccessCallback = t.step_func(function () {\r
+        gPlaylist.get(getsuccessCallback, geterrorCallback);\r
+    });\r
+\r
+    adderrorCallback = t.step_func(function (error) {\r
+        assert_unreached("addBatch() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        assert_greater_than(contents.length, 2, "length should greater than 2");\r
+        gPlaylist.addBatch([contents[0], contents[1]], addsuccessCallback, adderrorCallback);\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_name_attribute.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_name_attribute.html
new file mode 100755 (executable)
index 0000000..07ae1b6
--- /dev/null
@@ -0,0 +1,70 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_name_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_name_attribute\r
+//==== LABEL Check if Playlist have name attribute with proper type\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:name A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA AE AT ASG AN\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    createSuccess, createFail, removePlaylistSuccess, removePlaylistFail;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+        assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        assert_own_property(playlist, "name", "playlist does not own name property.");\r
+        assert_type(playlist.name, "string", "name should be an string");\r
+        check_attribute(playlist, "name", playlist.name, "string", playlist.name + "abc");\r
+        check_not_nullable(playlist, "name");\r
+        tizen.content.removePlaylist(playlist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_notexist.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_notexist.html
new file mode 100755 (executable)
index 0000000..1ed7029
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_notexist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_notexist\r
+//==== LABEL Check if interface Playlist exists, it should not\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:Playlist U\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P3\r
+//==== TEST_CRITERIA NIO\r
+\r
+test(function () {\r
+    check_no_interface_object("Playlist");\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_numberOfTracks_attribute.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_numberOfTracks_attribute.html
new file mode 100755 (executable)
index 0000000..3103eed
--- /dev/null
@@ -0,0 +1,69 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_numberOfTracks_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_numberOfTracks_attribute\r
+//==== LABEL Check if Playlist have numberOfTracks attribute with proper type and is readonly\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:numberOfTracks A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    createSuccess, createFail, removePlaylistSuccess, removePlaylistFail;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+        assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        assert_own_property(playlist, "numberOfTracks", "playlist does not own numberOfTracks property.");\r
+        assert_type(playlist.numberOfTracks, "long", "numberOfTracks should be an long");\r
+        check_readonly(playlist, "numberOfTracks", playlist.numberOfTracks, "long", playlist.numberOfTracks + 1);\r
+        tizen.content.removePlaylist(playlist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_remove.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_remove.html
new file mode 100755 (executable)
index 0000000..028a227
--- /dev/null
@@ -0,0 +1,100 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_remove</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_remove\r
+//==== LABEL Check if Playlist remove method works properly\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:remove M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA MR MAST\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, getSuccess, getFail, get2Success, get2Fail,\r
+    removePlaylistSuccess, removePlaylistFail, gPlaylist, beforelenght, afterlength, retVal = null;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    get2Success = t.step_func(function (items) {\r
+        assert_equals(retVal, undefined, "remove should return undefined");\r
+        afterlength = items.length;\r
+        assert_less_than(afterlength, beforelenght, "length should be decrease");\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    get2Fail = t.step_func(function (error) {\r
+        assert_unreached("get() error callback(after remove) was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    getSuccess = t.step_func(function (items) {\r
+        beforelenght = items.length;\r
+        retVal = gPlaylist.remove(items[0]);\r
+        gPlaylist.get(get2Success, get2Fail);\r
+    });\r
+\r
+    getFail = t.step_func(function (error) {\r
+        assert_unreached("get() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 0) {\r
+            gPlaylist.add(contents[0]);\r
+            gPlaylist.get(getSuccess, getFail);\r
+        }\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_removeBatch.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_removeBatch.html
new file mode 100755 (executable)
index 0000000..b48e4f6
--- /dev/null
@@ -0,0 +1,106 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_removeBatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_removeBatch\r
+//==== LABEL Check if Playlist removeBatch method works properly\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:removeBatch M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA MR MAST MMINA\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, getSuccess, getFail, get2Success, get2Fail, addsuccessCallback, adderrorCallback,\r
+    removePlaylistSuccess, removePlaylistFail, gPlaylist , afterlength, beforelenght, retVal = null;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+        assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    get2Success = t.step_func(function (items) {\r
+        assert_equals(retVal, undefined, "remove should return undefined");\r
+        afterlength = items.length;\r
+        assert_equals(afterlength, 0, "length should be zero")\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    get2Fail = t.step_func(function (error) {\r
+        assert_unreached("get() error callback(after removeBatch) was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    getSuccess = t.step_func(function (items) {\r
+        beforelenght = items.length;\r
+        retVal = gPlaylist.removeBatch([items[0], items[1]]);\r
+        setTimeout(function(){gPlaylist.get(get2Success, get2Fail);}, 1000);\r
+    });\r
+\r
+    getFail = t.step_func(function (error) {\r
+        assert_unreached("get() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    addsuccessCallback = t.step_func(function () {\r
+        gPlaylist.get(getSuccess, getFail);\r
+    });\r
+\r
+    adderrorCallback = t.step_func(function (error) {\r
+        assert_unreached("addBatch() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        assert_greater_than(contents.length, 2, "length should greater than 2");\r
+        gPlaylist.addBatch([contents[0], contents[1]], addsuccessCallback, adderrorCallback);\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_removeBatch_errorCallback_TypeMismatch.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_removeBatch_errorCallback_TypeMismatch.html
new file mode 100755 (executable)
index 0000000..b8abb6e
--- /dev/null
@@ -0,0 +1,107 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_removeBatch_errorCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_removeBatch_errorCallback_TypeMismatch\r
+//==== LABEL Check if Playlist removeBatch method throws exception when errorCallback is incorrect\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:removeBatch M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, addsuccessCallback, adderrorCallback, successCallback, errorCallback,\r
+    removePlaylistSuccess, removePlaylistFail, getSuccess, getFail, gPlaylist, conversionTable, i, exceptionName;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    successCallback = t.step_func(function () {\r
+         assert_unreached("removeBatch() success callback should not be invoked.");\r
+    });\r
+\r
+    getSuccess = t.step_func(function (items) {\r
+        conversionTable = getTypeConversionExceptions("functionObject", true);\r
+        for (i = 0; i < conversionTable.length; i++) {\r
+            errorCallback = conversionTable[i][0];\r
+            exceptionName = conversionTable[i][1];\r
+            assert_throws({name: exceptionName},\r
+                function () {\r
+                    gPlaylist.removeBatch([items[0], items[1]], successCallback, errorCallback);\r
+                }, "Given incorrect errorCallback.");\r
+        }\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    getFail = t.step_func(function (error) {\r
+        assert_unreached("get() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    addsuccessCallback = t.step_func(function () {\r
+        gPlaylist.get(getSuccess, getFail);\r
+    });\r
+\r
+    adderrorCallback = t.step_func(function (error) {\r
+        assert_unreached("addBatch() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 2) {\r
+            gPlaylist.addBatch([contents[0], contents[1]], addsuccessCallback, adderrorCallback);\r
+        }\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_removeBatch_errorCallback_invalid_cb.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_removeBatch_errorCallback_invalid_cb.html
new file mode 100755 (executable)
index 0000000..1471f98
--- /dev/null
@@ -0,0 +1,107 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_removeBatch_errorCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_removeBatch_errorCallback_invalid_cb\r
+//==== LABEL Check if Playlist removeBatch method throws exception when errorCallback is invalid\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:removeBatch M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, addsuccessCallback, adderrorCallback, successCallback, incorrectCallback,\r
+    removePlaylistSuccess, removePlaylistFail, getSuccess, getFail, gPlaylist;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    incorrectCallback = {\r
+        onerror: t.step_func(function (error) {\r
+            assert_unreached("Invalid errorCallback invoked:" + error.name + " msg: " + error.message);\r
+        })\r
+    };\r
+\r
+    successCallback = t.step_func(function () {\r
+         assert_unreached("removeBatch() success callback should not be invoked.");\r
+    });\r
+\r
+    getSuccess = t.step_func(function (items) {\r
+        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+            gPlaylist.removeBatch([items[0], items[1]], successCallback, incorrectCallback);\r
+        }, "Given incorrect errorCallback.");\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    getFail = t.step_func(function (error) {\r
+        assert_unreached("get() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    addsuccessCallback = t.step_func(function () {\r
+        gPlaylist.get(getSuccess, getFail);\r
+    });\r
+\r
+    adderrorCallback = t.step_func(function (error) {\r
+        assert_unreached("addBatch() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 2) {\r
+            gPlaylist.addBatch([contents[0], contents[1]], addsuccessCallback, adderrorCallback);\r
+        }\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_removeBatch_exist.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_removeBatch_exist.html
new file mode 100755 (executable)
index 0000000..021ac6f
--- /dev/null
@@ -0,0 +1,67 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_removeBatch_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_removeBatch_exist\r
+//==== LABEL Check if removeBatch exists\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:removeBatch M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P0\r
+//==== TEST_CRITERIA ME\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    createSuccess, createFail, removePlaylistSuccess, removePlaylistFail;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        assert_true("removeBatch" in playlist, "Playlist should have removeBatch method");\r
+        check_method_exists(playlist, "removeBatch");\r
+        tizen.content.removePlaylist(playlist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_removeBatch_items_TypeMismatch.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_removeBatch_items_TypeMismatch.html
new file mode 100755 (executable)
index 0000000..219bcce
--- /dev/null
@@ -0,0 +1,73 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_removeBatch_items_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_removeBatch_items_TypeMismatch\r
+//==== LABEL Check if removeBatch throws exception when content is incorrect\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:removeBatch M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    createSuccess, createFail, conversionTable, item, exceptionName, i, removePlaylistSuccess, removePlaylistFail;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        conversionTable = getTypeConversionExceptions("object", false);\r
+        for (i = 0; i < conversionTable.length; i++) {\r
+            item = conversionTable[i][0];\r
+            exceptionName = conversionTable[i][1];\r
+            assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+                playlist.removeBatch(item);\r
+            }, "Invoked with non-optional arguments.");\r
+        }\r
+        tizen.content.removePlaylist(playlist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_removeBatch_noarg.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_removeBatch_noarg.html
new file mode 100755 (executable)
index 0000000..297abd9
--- /dev/null
@@ -0,0 +1,68 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_removeBatch_noarg</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_removeBatch_noarg\r
+//==== LABEL Check if removeBatch method called with missing non-optional argument throws an exception\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:removeBatch M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MMA\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    createSuccess, createFail, removePlaylistSuccess, removePlaylistFail;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+            playlist.removeBatch();\r
+        }, "Invoked with non-optional arguments.");\r
+        tizen.content.removePlaylist(playlist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_removeBatch_successCallback_TypeMismatch.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_removeBatch_successCallback_TypeMismatch.html
new file mode 100755 (executable)
index 0000000..e390db0
--- /dev/null
@@ -0,0 +1,107 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_removeBatch_successCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_removeBatch_successCallback_TypeMismatch\r
+//==== LABEL Check if Playlist removeBatch method throws exception when successCallback is incorrect\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:removeBatch M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, addsuccessCallback, adderrorCallback, successCallback, errorCallback,\r
+    removePlaylistSuccess, removePlaylistFail, getSuccess, getFail, gPlaylist, conversionTable, i, exceptionName;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    errorCallback = t.step_func(function () {\r
+         assert_unreached("removeBatch() success callback should not be invoked.");\r
+    });\r
+\r
+    getSuccess = t.step_func(function (items) {\r
+        conversionTable = getTypeConversionExceptions("functionObject", true);\r
+        for (i = 0; i < conversionTable.length; i++) {\r
+            successCallback = conversionTable[i][0];\r
+            exceptionName = conversionTable[i][1];\r
+            assert_throws({name: exceptionName},\r
+                function () {\r
+                    gPlaylist.removeBatch([items[0], items[1]], successCallback, errorCallback);\r
+                }, "Given incorrect successCallback.");\r
+        }\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    getFail = t.step_func(function (error) {\r
+        assert_unreached("get() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    addsuccessCallback = t.step_func(function () {\r
+        gPlaylist.get(getSuccess, getFail);\r
+    });\r
+\r
+    adderrorCallback = t.step_func(function (error) {\r
+        assert_unreached("addBatch() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 2) {\r
+            gPlaylist.addBatch([contents[0], contents[1]], addsuccessCallback, adderrorCallback);\r
+        }\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_removeBatch_successCallback_invalid_cb.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_removeBatch_successCallback_invalid_cb.html
new file mode 100755 (executable)
index 0000000..ea8aea2
--- /dev/null
@@ -0,0 +1,107 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_removeBatch_successCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_removeBatch_successCallback_invalid_cb\r
+//==== LABEL Check if Playlist removeBatch method throws exception when successCallback is invalid\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:removeBatch M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, addsuccessCallback, adderrorCallback, errorCallback, incorrectCallback,\r
+    removePlaylistSuccess, removePlaylistFail, getSuccess, getFail, gPlaylist;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    incorrectCallback = {\r
+        onsuccess: function () {\r
+             assert_unreached("Invalid successCallback invoked:" + error.name + " msg: " + error.message);\r
+        }\r
+    };\r
+\r
+    errorCallback = t.step_func(function () {\r
+         assert_unreached("removeBatch() error callback should not be invoked.");\r
+    });\r
+\r
+    getSuccess = t.step_func(function (items) {\r
+        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+            gPlaylist.removeBatch([items[0], items[1]], incorrectCallback, errorCallback);\r
+        }, "Given incorrect errorCallback.");\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    getFail = t.step_func(function (error) {\r
+        assert_unreached("get() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    addsuccessCallback = t.step_func(function () {\r
+        gPlaylist.get(getSuccess, getFail);\r
+    });\r
+\r
+    adderrorCallback = t.step_func(function (error) {\r
+        assert_unreached("addBatch() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 2) {\r
+            gPlaylist.addBatch([contents[0], contents[1]], addsuccessCallback, adderrorCallback);\r
+        }\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_removeBatch_with_errorCallback.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_removeBatch_with_errorCallback.html
new file mode 100755 (executable)
index 0000000..c5d8289
--- /dev/null
@@ -0,0 +1,102 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_removeBatch_with_errorCallback</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_removeBatch_with_errorCallback\r
+//==== LABEL Check if Playlist removeBatch method works properly with all optional arguments\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:removeBatch M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA MOA\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, addsuccessCallback, adderrorCallback, getSuccess, getFail, successCallback, errorCallback,\r
+    removePlaylistSuccess, removePlaylistFail, gPlaylist;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    successCallback = t.step_func(function () {\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    errorCallback = t.step_func(function (error) {\r
+        assert_unreached("removeBatch() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    getSuccess = t.step_func(function (items) {\r
+        gPlaylist.removeBatch([items[0], items[1]], successCallback, errorCallback);\r
+    });\r
+\r
+    getFail = t.step_func(function (error) {\r
+        assert_unreached("get() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    addsuccessCallback = t.step_func(function () {\r
+        gPlaylist.get(getSuccess, getFail);\r
+    });\r
+\r
+    adderrorCallback = t.step_func(function (error) {\r
+        assert_unreached("addBatch() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 2) {\r
+            gPlaylist.addBatch([contents[0], contents[1]], addsuccessCallback, adderrorCallback);\r
+        }\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_remove_exist.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_remove_exist.html
new file mode 100755 (executable)
index 0000000..e08ca96
--- /dev/null
@@ -0,0 +1,67 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_remove_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_remove_exist\r
+//==== LABEL Check if remove exists\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:remove M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P0\r
+//==== TEST_CRITERIA ME\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    createSuccess, createFail, removePlaylistSuccess, removePlaylistFail;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        assert_true("remove" in playlist, "Playlist should have remove method");\r
+        check_method_exists(playlist, "remove");\r
+        tizen.content.removePlaylist(playlist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_remove_item_TypeMismatch.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_remove_item_TypeMismatch.html
new file mode 100755 (executable)
index 0000000..ef33c9c
--- /dev/null
@@ -0,0 +1,73 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_remove_item_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_remove_item_TypeMismatch\r
+//==== LABEL Check if remove throws exception when item is incorrect\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:remove M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    createSuccess, createFail, conversionTable, item, exceptionName, i, removePlaylistSuccess, removePlaylistFail;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        conversionTable = getTypeConversionExceptions("object", false);\r
+        for (i = 0; i < conversionTable.length; i++) {\r
+            item = conversionTable[i][0];\r
+            exceptionName = conversionTable[i][1];\r
+            assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+                playlist.remove(item);\r
+            }, "Invoked with non-optional arguments.");\r
+        }\r
+        tizen.content.removePlaylist(playlist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_remove_noarg.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_remove_noarg.html
new file mode 100755 (executable)
index 0000000..69f1bc4
--- /dev/null
@@ -0,0 +1,68 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_remove_noarg</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_remove_noarg\r
+//==== LABEL Check if remove method called with missing non-optional argument throws an exception\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:remove M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MMA\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    createSuccess, createFail, removePlaylistSuccess, removePlaylistFail;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+            playlist.remove();\r
+        }, "Invoked with non-optional arguments.");\r
+        tizen.content.removePlaylist(playlist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_setOrder.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_setOrder.html
new file mode 100755 (executable)
index 0000000..b30c1cd
--- /dev/null
@@ -0,0 +1,111 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_setOrder</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_setOrder\r
+//==== LABEL Check if Playlist setOrder method works properly\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:setOrder M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA MR MMINA MAST\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, getsuccessCallback, geterrorCallback, addSuccess, addFail,\r
+    setOrderSuccess, get2successCallback, get2errorCallback, removePlaylistSuccess, removePlaylistFail, gPlaylist, gItems, gExpectedOrder, retVal = null;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    get2successCallback = t.step_func(function (items) {\r
+        assert_equals(items[0].content.name, gItems[items.length-1].content.name, "name should be the same");\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    get2errorCallback = t.step_func(function (error) {\r
+        assert_unreached("get() error callback unreachable(after set order)");\r
+    });\r
+\r
+    setOrderSuccess = t.step_func(function () {\r
+        assert_equals(retVal, undefined, "setOrder should return undefined");\r
+        gPlaylist.get(get2successCallback, get2errorCallback);\r
+    });\r
+\r
+    getsuccessCallback = t.step_func(function (items) {\r
+        gItems = items;\r
+        gExpectedOrder = gItems.slice(0);\r
+        gExpectedOrder.reverse();\r
+        retVal = gPlaylist.setOrder(gExpectedOrder, setOrderSuccess);\r
+    });\r
+\r
+    geterrorCallback = t.step_func(function (error) {\r
+        assert_unreached("get() error callback unreachable");\r
+    });\r
+\r
+    addSuccess = t.step_func(function () {\r
+        gPlaylist.get(getsuccessCallback, geterrorCallback);\r
+    });\r
+\r
+    addFail = t.step_func(function (error) {\r
+        assert_unreached("addBatch() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 2) {\r
+            gPlaylist.addBatch([contents[0], contents[1]], addSuccess, addFail);\r
+        }\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_setOrder_errorCallback_TypeMismatch.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_setOrder_errorCallback_TypeMismatch.html
new file mode 100755 (executable)
index 0000000..504db18
--- /dev/null
@@ -0,0 +1,110 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_setOrder_errorCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_setOrder_errorCallback_TypeMismatch\r
+//==== LABEL Check if Playlist get method throws exception when errorCallback is incorrect\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:setOrder M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, getsuccessCallback, geterrorCallback, addSuccess, addFail, conversionTable, i, exceptionName,\r
+    setOrderSuccess, setOrderFail, removePlaylistSuccess, removePlaylistFail, gPlaylist, gItems, gExpectedOrder;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    setOrderSuccess = t.step_func(function () {\r
+        assert_unreached("setOrder() success callback unreachable");\r
+    });\r
+\r
+    getsuccessCallback = t.step_func(function (items) {\r
+        gItems = items;\r
+        gExpectedOrder = gItems.slice(0);\r
+        gExpectedOrder.reverse();\r
+        conversionTable = getTypeConversionExceptions("functionObject", true);\r
+        for (i = 0; i < conversionTable.length; i++) {\r
+            setOrderFail = conversionTable[i][0];\r
+            exceptionName = conversionTable[i][1];\r
+            assert_throws({name: exceptionName},\r
+                function () {\r
+                    gPlaylist.setOrder(gExpectedOrder, setOrderSuccess, setOrderFail);\r
+                }, "Given incorrect errorCallback.");\r
+        }\r
+       tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    geterrorCallback = t.step_func(function (error) {\r
+        assert_unreached("get() error callback unreachable");\r
+    });\r
+\r
+    addSuccess = t.step_func(function () {\r
+        gPlaylist.get(getsuccessCallback, geterrorCallback);\r
+    });\r
+\r
+    addFail = t.step_func(function (error) {\r
+        assert_unreached("addBatch() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 2) {\r
+            gPlaylist.addBatch([contents[0], contents[1]], addSuccess, addFail);\r
+        }\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_setOrder_errorCallback_invalid_cb.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_setOrder_errorCallback_invalid_cb.html
new file mode 100755 (executable)
index 0000000..c27e771
--- /dev/null
@@ -0,0 +1,110 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_setOrder_errorCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_setOrder_errorCallback_invalid_cb\r
+//==== LABEL Check if Playlist get method throws exception when errorCallback is invalid\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:setOrder M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, getsuccessCallback, geterrorCallback, addSuccess, addFail, conversionTable,\r
+    setOrderSuccess, incorrectCallback, removePlaylistSuccess, removePlaylistFail, gPlaylist, gItems, gExpectedOrder, i, j;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    setOrderSuccess = t.step_func(function () {\r
+        assert_unreached("setOrder() success callback unreachable");\r
+    });\r
+\r
+    incorrectCallback = {\r
+        onsuccess: function (error) {\r
+             assert_unreached("Invalid errorCallback invoked:" + error.name + " msg: " + error.message);\r
+        }\r
+    };\r
+\r
+    getsuccessCallback = t.step_func(function (items) {\r
+        gItems = items;\r
+        gExpectedOrder = gItems.slice(0);\r
+        gExpectedOrder.reverse();\r
+        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+            gPlaylist.setOrder(gExpectedOrder, setOrderSuccess, incorrectCallback);\r
+        }, "Given incorrect errorCallback.");\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    geterrorCallback = t.step_func(function (error) {\r
+        assert_unreached("get() error callback unreachable");\r
+    });\r
+\r
+    addSuccess = t.step_func(function () {\r
+        gPlaylist.get(getsuccessCallback, geterrorCallback);\r
+    });\r
+\r
+    addFail = t.step_func(function (error) {\r
+        assert_unreached("addBatch() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 2) {\r
+            gPlaylist.addBatch([contents[0], contents[1]], addSuccess, addFail);\r
+        }\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_setOrder_errorCallback_invoked.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_setOrder_errorCallback_invoked.html
new file mode 100755 (executable)
index 0000000..6c8d171
--- /dev/null
@@ -0,0 +1,107 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_setOrder_errorCallback_invoked</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_setOrder_errorCallback_invoked\r
+//==== LABEL Check if ContentManager setOrder method with invalid arguments would invoke errorCallback\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:setOrder M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MERRCB\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, getsuccessCallback, geterrorCallback, addSuccess, addFail,\r
+    setOrderSuccess, setOrderFail, removePlaylistSuccess, removePlaylistFail, gPlaylist, gExpectedOrder;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    setOrderSuccess = t.step_func(function () {\r
+        assert_unreached("setOrder() success callback unreachable(after set order)");\r
+    });\r
+\r
+    setOrderFail = t.step_func(function (error) {\r
+        assert_equals(error.name, "InvalidValuesError", "Incorrect error name");\r
+        assert_type(error.message, "string", "Error message is not a string");\r
+        assert_not_equals(error.message, "","Error message is empty");\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    getsuccessCallback = t.step_func(function (items) {\r
+        gExpectedOrder = items.slice(items.length);\r
+        gExpectedOrder.reverse();\r
+        gPlaylist.setOrder(gExpectedOrder, setOrderSuccess, setOrderFail);\r
+    });\r
+\r
+    geterrorCallback = t.step_func(function (error) {\r
+        assert_unreached("get() error callback unreachable");\r
+    });\r
+\r
+    addSuccess = t.step_func(function () {\r
+        gPlaylist.get(getsuccessCallback, geterrorCallback);\r
+    });\r
+\r
+    addFail = t.step_func(function (error) {\r
+        assert_unreached("addBatch() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 2) {\r
+            gPlaylist.addBatch([contents[0], contents[1]], addSuccess, addFail);\r
+        }\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_setOrder_exist.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_setOrder_exist.html
new file mode 100755 (executable)
index 0000000..1f9b634
--- /dev/null
@@ -0,0 +1,67 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_setOrder_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_setOrder_exist\r
+//==== LABEL Check if setOrder exists\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:setOrder M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P0\r
+//==== TEST_CRITERIA ME\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    createSuccess, createFail, removePlaylistSuccess, removePlaylistFail;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        assert_true("setOrder" in playlist, "Playlist should have setOrder method");\r
+        check_method_exists(playlist, "setOrder");\r
+        tizen.content.removePlaylist(playlist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_setOrder_items_TypeMismatch.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_setOrder_items_TypeMismatch.html
new file mode 100755 (executable)
index 0000000..c4849da
--- /dev/null
@@ -0,0 +1,103 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_setOrder_items_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_setOrder_items_TypeMismatch\r
+//==== LABEL Check if Playlist get method throws exception when items is incorrect\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:setOrder M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, getsuccessCallback, geterrorCallback, addSuccess, addFail, conversionTable, i, exceptionName,\r
+    removePlaylistSuccess, removePlaylistFail, gPlaylist;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    getsuccessCallback = t.step_func(function (items) {\r
+        conversionTable = getTypeConversionExceptions("array", true);\r
+        for (i = 0; i < conversionTable.length; i++) {\r
+            items = conversionTable[i][0];\r
+            exceptionName = conversionTable[i][1];\r
+            assert_throws({name: exceptionName},\r
+                function () {\r
+                        gPlaylist.setOrder(items);\r
+                }, "Given incorrect items.");\r
+        }\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    geterrorCallback = t.step_func(function (error) {\r
+        assert_unreached("get() error callback unreachable");\r
+    });\r
+\r
+    addSuccess = t.step_func(function () {\r
+        gPlaylist.get(getsuccessCallback, geterrorCallback);\r
+    });\r
+\r
+    addFail = t.step_func(function (error) {\r
+        assert_unreached("addBatch() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 2) {\r
+            gPlaylist.addBatch([contents[0], contents[1]], addSuccess, addFail);\r
+        }\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_setOrder_noarg.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_setOrder_noarg.html
new file mode 100755 (executable)
index 0000000..d54d4fa
--- /dev/null
@@ -0,0 +1,101 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_setOrder_noarg</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_setOrder_noarg\r
+//==== LABEL Check if setOrder method called with missing non-optional argument throws an exception\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:setOrder M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MMA\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, getsuccessCallback, geterrorCallback, addSuccess, addFail,\r
+    removePlaylistSuccess, removePlaylistFail, gPlaylist, gItems, gExpectedOrder;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    getsuccessCallback = t.step_func(function (items) {\r
+        gItems = items;\r
+        gExpectedOrder = gItems.slice(0);\r
+        gExpectedOrder.reverse();\r
+        assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+            function () {\r
+                gPlaylist.setOrder();\r
+            }, "missing non-optional argument should throw an exception");\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    geterrorCallback = t.step_func(function (error) {\r
+        assert_unreached("get() error callback unreachable");\r
+    });\r
+\r
+    addSuccess = t.step_func(function () {\r
+        gPlaylist.get(getsuccessCallback, geterrorCallback);\r
+    });\r
+\r
+    addFail = t.step_func(function (error) {\r
+        assert_unreached("addBatch() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 2) {\r
+            gPlaylist.addBatch([contents[0], contents[1]], addSuccess, addFail);\r
+        }\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_setOrder_successCallback_TypeMismatch.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_setOrder_successCallback_TypeMismatch.html
new file mode 100755 (executable)
index 0000000..691ce7e
--- /dev/null
@@ -0,0 +1,106 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_setOrder_successCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_setOrder_successCallback_TypeMismatch\r
+//==== LABEL Check if Playlist get method throws exception when successCallback is incorrect\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:setOrder M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, getsuccessCallback, geterrorCallback, addSuccess, addFail, conversionTable, i, exceptionName,\r
+    setOrderSuccess, removePlaylistSuccess, removePlaylistFail, gPlaylist, gItems, gExpectedOrder;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    getsuccessCallback = t.step_func(function (items) {\r
+        gItems = items;\r
+        gExpectedOrder = gItems.slice(0);\r
+        gExpectedOrder.reverse();\r
+        conversionTable = getTypeConversionExceptions("functionObject", true);\r
+        for (i = 0; i < conversionTable.length; i++) {\r
+            setOrderSuccess = conversionTable[i][0];\r
+            exceptionName = conversionTable[i][1];\r
+            assert_throws({name: exceptionName},\r
+                function () {\r
+                    gPlaylist.setOrder(gExpectedOrder, setOrderSuccess);\r
+                }, "Given incorrect errorCallback.");\r
+        }\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    geterrorCallback = t.step_func(function (error) {\r
+        assert_unreached("get() error callback unreachable");\r
+    });\r
+\r
+    addSuccess = t.step_func(function () {\r
+        gPlaylist.get(getsuccessCallback, geterrorCallback);\r
+    });\r
+\r
+    addFail = t.step_func(function (error) {\r
+        assert_unreached("addBatch() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 2) {\r
+            gPlaylist.addBatch([contents[0], contents[1]], addSuccess, addFail);\r
+        }\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_setOrder_successCallback_invalid_cb.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_setOrder_successCallback_invalid_cb.html
new file mode 100755 (executable)
index 0000000..8c08463
--- /dev/null
@@ -0,0 +1,106 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_setOrder_successCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_setOrder_successCallback_invalid_cb\r
+//==== LABEL Check if Playlist get method throws exception when successCallback is invalid\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:setOrder M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P2\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, getsuccessCallback, geterrorCallback, addSuccess, addFail,\r
+    incorrectCallback, removePlaylistSuccess, removePlaylistFail, gPlaylist, gItems, gExpectedOrder;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    incorrectCallback = {\r
+        onsuccess: function () {\r
+            assert_unreached("Invalid successCallback invoked.");\r
+        }\r
+    };\r
+\r
+    getsuccessCallback = t.step_func(function (items) {\r
+        gItems = items;\r
+        gExpectedOrder = gItems.slice(0);\r
+        gExpectedOrder.reverse();\r
+        assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+            gPlaylist.setOrder(gExpectedOrder, incorrectCallback);\r
+        }, "Given incorrect successCallback.");\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    geterrorCallback = t.step_func(function (error) {\r
+        assert_unreached("get() error callback unreachable");\r
+    });\r
+\r
+    addSuccess = t.step_func(function () {\r
+        gPlaylist.get(getsuccessCallback, geterrorCallback);\r
+    });\r
+\r
+    addFail = t.step_func(function (error) {\r
+        assert_unreached("addBatch() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 2) {\r
+            gPlaylist.addBatch([contents[0], contents[1]], addSuccess, addFail);\r
+        }\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_setOrder_with_errorCallback.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_setOrder_with_errorCallback.html
new file mode 100755 (executable)
index 0000000..8d6326d
--- /dev/null
@@ -0,0 +1,114 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_setOrder_with_errorCallback</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_setOrder_with_errorCallback\r
+//==== LABEL Check if Playlist setOrder method works properly with all optional arguments\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:setOrder M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA MOA MAST\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    findSuccess, findFail, createSuccess, createFail, getsuccessCallback, geterrorCallback, addSuccess, addFail,\r
+    setOrderSuccess, setOrderFail, get2successCallback, get2errorCallback, removePlaylistSuccess, removePlaylistFail, gPlaylist, gItems, gExpectedOrder;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+       assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    get2successCallback = t.step_func(function (items) {\r
+        assert_equals(items[0].content.name, gItems[items.length-1].content.name, "name should be the same");\r
+        tizen.content.removePlaylist(gPlaylist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    get2errorCallback = t.step_func(function (error) {\r
+        assert_unreached("get() error callback unreachable(after set order)");\r
+    });\r
+\r
+    setOrderSuccess = t.step_func(function () {\r
+        gPlaylist.get(get2successCallback, get2errorCallback);\r
+    });\r
+\r
+    setOrderFail = t.step_func(function (error) {\r
+        assert_unreached("setOrder() error callback unreachable");\r
+    });\r
+\r
+    getsuccessCallback = t.step_func(function (items) {\r
+        gItems = items;\r
+        gExpectedOrder = gItems.slice(0);\r
+        gExpectedOrder.reverse();\r
+        gPlaylist.setOrder(gExpectedOrder, setOrderSuccess, setOrderFail);\r
+    });\r
+\r
+    geterrorCallback = t.step_func(function (error) {\r
+        assert_unreached("get() error callback unreachable");\r
+    });\r
+\r
+    addSuccess = t.step_func(function () {\r
+        gPlaylist.get(getsuccessCallback, geterrorCallback);\r
+    });\r
+\r
+    addFail = t.step_func(function (error) {\r
+        assert_unreached("addBatch() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    findSuccess = t.step_func(function (contents) {\r
+        if (contents.length > 2) {\r
+            gPlaylist.addBatch([contents[0], contents[1]], addSuccess, addFail);\r
+        }\r
+    });\r
+\r
+    findFail = t.step_func(function (error) {\r
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        gPlaylist = playlist;\r
+        tizen.content.find(findSuccess, findFail, null, new tizen.AttributeFilter("type", "EXACTLY", "AUDIO"));\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_thumbnailURI_attribute.html b/iot/tct-deprecatedapi-tizen-tests/deprecatedapi/Playlist_thumbnailURI_attribute.html
new file mode 100755 (executable)
index 0000000..f6f7140
--- /dev/null
@@ -0,0 +1,68 @@
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2014 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Author:\r
+        Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Playlist_thumbnailURI_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/content_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Playlist_thumbnailURI_attribute\r
+//==== LABEL Check if Playlist have thumbnailURI attribute with proper type\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:Content:Content:Playlist:thumbnailURI A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA AE AT ASG ADV\r
+\r
+setup({timeout: 30000});\r
+\r
+var t = async_test(document.title, {timeout: 30000}),\r
+    createSuccess, createFail, removePlaylistSuccess, removePlaylistFail;\r
+\r
+t.step(function () {\r
+    removePlaylistSuccess = t.step_func(function () {\r
+        t.done();\r
+    });\r
+\r
+    removePlaylistFail = t.step_func(function (error) {\r
+        assert_unreached("removePlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    createSuccess = t.step_func(function (playlist) {\r
+        assert_own_property(playlist, "thumbnailURI", "playlist does not own thumbnailURI property.");\r
+        assert_equals(playlist.thumbnailURI, null, "playlist.thumbnailURI should be null by default.");\r
+        tizen.content.removePlaylist(playlist.id, removePlaylistSuccess, removePlaylistFail);\r
+    });\r
+\r
+    createFail = t.step_func(function (error) {\r
+        assert_unreached("createPlaylist() error callback was invoked: " + error.name + " msg: " + error.message);\r
+    });\r
+\r
+    tizen.content.createPlaylist(randomString(5), createSuccess, createFail);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>
\ No newline at end of file