[common][tct-content-tizen-tests][sync testcase from suprem] 34/111234/1
authorxy.qian <xy.qian@samsung.com>
Fri, 20 Jan 2017 03:13:04 +0000 (11:13 +0800)
committerxy.qian <xy.qian@samsung.com>
Fri, 20 Jan 2017 03:13:18 +0000 (11:13 +0800)
Change-Id: I0dbb88f6d3adf3640b95ebcedd9c2563993cdb7c
Signed-off-by: xy.qian <xy.qian@samsung.com>
28 files changed:
common/tct-content-tizen-tests/askpolicy.sh [new file with mode: 0755]
common/tct-content-tizen-tests/content/ContentChangeCallback_oncontentadded.html
common/tct-content-tizen-tests/content/ContentChangeCallback_oncontentdiradded.html
common/tct-content-tizen-tests/content/ContentChangeCallback_oncontentdirremoved.html
common/tct-content-tizen-tests/content/ContentChangeCallback_oncontentdirupdated.html
common/tct-content-tizen-tests/content/ContentChangeCallback_oncontentremoved.html
common/tct-content-tizen-tests/content/ContentChangeCallback_oncontentremoved_id_type.html
common/tct-content-tizen-tests/content/ContentChangeCallback_oncontentupdated.html
common/tct-content-tizen-tests/content/ContentManager_addChangeListener.html [new file with mode: 0755]
common/tct-content-tizen-tests/content/ContentManager_addChangeListener_changeCallback_TypeMismatch.html [new file with mode: 0755]
common/tct-content-tizen-tests/content/ContentManager_addChangeListener_changeCallback_invalid_cb.html [new file with mode: 0755]
common/tct-content-tizen-tests/content/ContentManager_addChangeListener_exist.html [new file with mode: 0755]
common/tct-content-tizen-tests/content/ContentManager_addChangeListener_misarg.html [new file with mode: 0755]
common/tct-content-tizen-tests/content/ContentManager_removeChangeListener.html [new file with mode: 0755]
common/tct-content-tizen-tests/content/ContentManager_removeChangeListener_exist.html [new file with mode: 0755]
common/tct-content-tizen-tests/content/ContentManager_scanFile.html
common/tct-content-tizen-tests/content/ContentManager_setChangeListener.html [deleted file]
common/tct-content-tizen-tests/content/ContentManager_setChangeListener_changeCallback_TypeMismatch.html [deleted file]
common/tct-content-tizen-tests/content/ContentManager_setChangeListener_changeCallback_invalid_cb.html [deleted file]
common/tct-content-tizen-tests/content/ContentManager_setChangeListener_exist.html [deleted file]
common/tct-content-tizen-tests/content/ContentManager_setChangeListener_missarg.html [deleted file]
common/tct-content-tizen-tests/content/ContentManager_unsetChangeListener.html [deleted file]
common/tct-content-tizen-tests/content/ContentManager_unsetChangeListener_exist.html [deleted file]
common/tct-content-tizen-tests/content/ContentManager_unsetChangeListener_extra_argument.html [deleted file]
common/tct-content-tizen-tests/inst.wgt.py
common/tct-content-tizen-tests/suite.json
common/tct-content-tizen-tests/tests.full.xml
common/tct-content-tizen-tests/tests.xml

diff --git a/common/tct-content-tizen-tests/askpolicy.sh b/common/tct-content-tizen-tests/askpolicy.sh
new file mode 100755 (executable)
index 0000000..1c39bdd
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/bash
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+for i in `grep -r "0xA" /var/cynara/db/_ | grep $1`
+do
+    CLIENT=`echo $i | cut -d ";" -f1`
+    USER=`echo $i | cut -d ";" -f2`
+    PRIVILEGE=`echo $i | cut -d ";" -f3`
+    #echo "cyad --erase=\"\" -r=no -c $CLIENT -u $USER -p $PRIVILEGE"
+    cyad --erase="" -r=no -c $CLIENT -u $USER -p $PRIVILEGE
+done
index 949bb1dbc978222d3f429771f65cc393e77068ce..fc924ed8f1838af06ee9583746463107b37eddf3 100644 (file)
@@ -17,6 +17,7 @@ limitations under the License.
 Authors:
         Dong-Young Kim <dydot1.kim@samsung.com>
         Junghyuk Park <junghyuk.park@samsung.com>
+        Xiaoyan Qian <xy.qian@samsung.com>
 
 -->
 
@@ -39,14 +40,14 @@ Authors:
 //==== TEST_CRITERIA CBT CBOA
 setup({timeout: 30000});
 
-var t = async_test(document.title, {timeout: 30000}), changeCallback, onCopySuccess,
+var t = async_test(document.title, {timeout: 30000}), changeCallback, listenerId, onCopySuccess,
         addedImagePath=TEST_CONTENT_PATH + "/ContentChangeCallback_oncontentadded.png";
 
 t.step(function () {
     //cleanup after TC
     add_result_callback(function () {
         try {
-            tizen.content.unsetChangeListener();
+            tizen.content.removeChangeListener(listenerId);
         } catch (err) {}
     });
 
@@ -60,7 +61,7 @@ t.step(function () {
     };
 
     onCopySuccess = t.step_func(function () {
-        tizen.content.setChangeListener(changeCallback);
+        listenerId = tizen.content.addChangeListener(changeCallback);
         tizen.content.scanFile("file://" + addedImagePath, null,
             function (error) {
                 assert_unreached("Failed to scan a file: " + addedImagePath + " with message: " + error.message);
index 622c4acadf94b0c08ee920f50f814c171e8e734f..08393c47367f5d1538881cb9f0f1d2b9a152d35c 100644 (file)
@@ -39,7 +39,7 @@ Author:
 setup({timeout: 30000, explicit_done:true});
 
 var t = async_test(document.title, {timeout: 30000}), contentDirectory, changeCallback, resolveSuccess, resolveError, newDir,
-    onCopySuccess, onCopyError, onScanError;
+    onCopySuccess, onCopyError, onScanError, listenerId;
 
 t.step(function () {
     add_result_callback(function () {
@@ -47,7 +47,7 @@ t.step(function () {
             done();
         } 
         try {
-            tizen.content.unsetChangeListener();
+            tizen.content.removeChangeListener(listenerId);
             contentDirectory.deleteDirectory(newDir.fullPath, true, function () {
                 tizen.content.scanDirectory("file://" + newDir.fullPath, true, ScanCB);
             });
@@ -73,7 +73,7 @@ t.step(function () {
     });
 
     onCopySuccess = t.step_func(function () {
-        tizen.content.setChangeListener(changeCallback);
+        listenerId = tizen.content.addChangeListener(changeCallback);
         tizen.content.scanDirectory("file://" + newDir.fullPath, true, null, onScanError);
     });
 
index 3e6b0b36f755098cdf94a1e266c737db7cda17fa..4c8ed22ef02900ff0dcf39f8607ccb48d6099f1b 100644 (file)
@@ -39,13 +39,13 @@ Author:
 setup({timeout: 30000});
 
 var t = async_test(document.title, {timeout: 30000}), contentDirectory, changeCallback, resolveSuccess, resolveError, newDir,
-    onCopySuccess, onCopyError, onScanSuccess, onScanError, expectedContentDirId = null;
+    onCopySuccess, onCopyError, onScanSuccess, onScanError, expectedContentDirId = null, listenerId;
 
 t.step(function () {
 
     add_result_callback(function () {
         try {
-            tizen.content.unsetChangeListener();
+            tizen.content.removeChangeListener(listenerId);
         } catch (err) {}
     });
 
@@ -72,7 +72,7 @@ t.step(function () {
     });
 
     onCopySuccess = t.step_func(function () {
-        tizen.content.setChangeListener(changeCallback);
+        listenerId = tizen.content.addChangeListener(changeCallback);
         tizen.content.scanDirectory("file://" + newDir.fullPath, true, onScanSuccess, onScanError);
     });
 
index 8914f128745ce4053587342933ebad64f9ba3af6..aed8c75de581fe3f744eeb90fdd71d6ab1bd4bc3 100644 (file)
@@ -46,7 +46,7 @@ t.step(function () {
             done();
             } 
         try {
-            tizen.content.unsetChangeListener();
+            tizen.content.removeChangeListener(listenerId);
             contentDirectory.deleteDirectory(newDir.fullPath, true, function () {
                 tizen.content.scanDirectory("file://" + newDir.fullPath, true, ScanCB);
             });
@@ -77,7 +77,7 @@ t.step(function () {
 
     scanSuccess = t.step_func(function (error) {
         contentDirectory.copyTo(CONTENT_PATH + TEST_CONTENT_IMAGES[1], newDir.fullPath + "/ContentChangeCallback_oncontentdirupdated2.png", true);
-        tizen.content.setChangeListener(changeCallback);
+        listenerId = tizen.content.addChangeListener(changeCallback);
         tizen.content.scanDirectory("file://" + newDir.fullPath, true);
     });
    
index 34cb30662590e68a1210c2e6d98b90092e488b29..3c66874858710eb058a4910c1485861b95ffbd3e 100644 (file)
@@ -17,6 +17,7 @@ limitations under the License.
 Authors:
         Dong-Young Kim <dydot1.kim@samsung.com>
         Junghyuk Park <junghyuk.park@samsung.com>
+        Xiaoyan Qian <xy.qian@samsung.com>
 
 -->
 
@@ -41,7 +42,7 @@ setup({timeout: 30000});
 
 var t = async_test(document.title, {timeout: 30000}),
     contentDirectory, sharedDirectory, addedImagePath=TEST_CONTENT_PATH + "/ContentChangeCallback_oncontentremoved.png",
-    addedContent, changeCallback, onCopySuccess, onCopyError, onDeleteSuccess, onDeleteError,
+    addedContent, changeCallback, onCopySuccess, onCopyError, onDeleteSuccess, onDeleteError, listenerId,
     onScanSuccess, onScanError;
 
 add_result_callback(function (result) {
@@ -52,7 +53,7 @@ t.step(function () {
     //cleanup after TC
     add_result_callback(function () {
         try {
-            tizen.content.unsetChangeListener();
+            tizen.content.removeChangeListener(listenerId);
         } catch (err) {}
     });
 
@@ -101,7 +102,7 @@ t.step(function () {
         assert_unreached("Failed to copy a file to " + addedImagePath);
     });
 
-    tizen.content.setChangeListener(changeCallback);
+    listenerId = tizen.content.addChangeListener(changeCallback);
 
     tizen.filesystem.resolve(
         "file://" + CONTENT_PATH,
index 3dffa82dfe7b0a8e856fbbd262ac40a5bb1aad8e..a30a5e3e0bf4a1a4842f93af92fb0b4a734b5e18 100644 (file)
@@ -16,6 +16,7 @@ limitations under the License.
 
 Authors:
         Wei Zhang <wei625.zhang@samsung.com>
+        Xiaoyan Qian <xy.qian@samsung.com>
 
 -->
 
@@ -41,7 +42,7 @@ setup({timeout: 30000});
 
 var t = async_test(document.title, {timeout: 30000}),
     contentDirectory, sharedDirectory, addedImagePath = TEST_CONTENT_PATH + "/ContentChangeCallback_oncontentremoved.png",
-    addedContent, changeCallback, onCopySuccess, onCopyError, onDeleteSuccess, onDeleteError,
+    addedContent, changeCallback, onCopySuccess, onCopyError, onDeleteSuccess, onDeleteError, listenerId,
     onScanSuccess, onScanError;
 
 add_result_callback(function (result) {
@@ -52,7 +53,7 @@ t.step(function () {
     //cleanup after TC
     add_result_callback(function () {
         try {
-            tizen.content.unsetChangeListener();
+            tizen.content.removeChangeListener(listenerId);
         } catch (err) {}
     });
 
@@ -100,7 +101,7 @@ t.step(function () {
         assert_unreached("Failed to copy a file to " + addedImagePath);
     });
 
-    tizen.content.setChangeListener(changeCallback);
+    listenerId = tizen.content.addChangeListener(changeCallback);
     tizen.filesystem.resolve(
         "file://" + CONTENT_PATH,
         function (directory) {
index ccbacd016865111d3fc921159daee30b08e0a82f..dd004b532da66d2d17fb7cb1ce49328f74141565 100644 (file)
@@ -16,6 +16,7 @@ limitations under the License.
 
 Authors:
         Krzysztof Lachacz <k.lachacz@samsung.com>
+        Xiaoyan Qian <xy.qian@samsung.com>
 
 -->
 
@@ -39,13 +40,13 @@ Authors:
 setup({timeout: 30000});
 
 var t = async_test(document.title, {timeout: 30000}),
-    changeCallback, testDescription = "TEST DESCRIPTION", onSuccess, onError;
+    changeCallback, testDescription = "TEST DESCRIPTION", onSuccess, onError, listenerId;
 
 t.step(function () {
     //cleanup after TC
     add_result_callback(function () {
         try {
-            tizen.content.unsetChangeListener();
+            tizen.content.removeChangeListener(listenerId);
         } catch (err) {}
     });
 
@@ -69,7 +70,7 @@ t.step(function () {
         assert_unreached("Find() Error callback was invoked: " + error.name + " msg: " + error.message);
     });
 
-    tizen.content.setChangeListener(changeCallback);
+    listenerId = tizen.content.addChangeListener(changeCallback);
     tizen.content.find(onSuccess, onError);
 });
 
diff --git a/common/tct-content-tizen-tests/content/ContentManager_addChangeListener.html b/common/tct-content-tizen-tests/content/ContentManager_addChangeListener.html
new file mode 100755 (executable)
index 0000000..e4f669b
--- /dev/null
@@ -0,0 +1,88 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Xiaoyan Qian <xy.qian@samsung.com>
+
+
+-->
+
+<html>
+<head>
+<title>ContentManager_addChangeListener</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+<script src="support/content_common.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: ContentManager_addChangeListener
+//==== LABEL Check if addChangeListener method works properly
+//==== ONLOAD_DELAY 30
+//==== SPEC Tizen Web API:Content:Content:ContentManager:addChangeListener M
+//==== SPEC_URL TBD
+//==== PRIORITY P1
+//==== TEST_CRITERIA MMINA MAST MR
+
+setup({timeout: 30000});
+
+var t = async_test(document.title, {timeout: 30000}), onSuccess, onError,
+    changeCallback, returnedValue = null, filter, description = "changeCallback_"+ new Date().getTime();
+
+t.step(function () {
+    add_result_callback(function () {
+        try {
+            tizen.content.removeChangeListener(returnedValue);
+        } catch (err) {}
+    });
+
+    changeCallback = {
+        oncontentadded: t.step_func(function (content) {
+
+        }),
+
+        oncontentupdated: t.step_func(function (content) {
+            assert_equals(content.description, description, "updated content has wrong value.");
+            assert_type(returnedValue, "long", "addChangeListener should return long type.");
+            t.done();
+        }),
+
+        oncontentremoved: t.step_func(function (id) {
+
+        })
+    };
+
+    onSuccess = t.step_func(function (contents) {
+        assert_type(contents, "array", "contents should be an array");
+        assert_greater_than(contents.length, 0, "media item is not found");
+
+        contents[0].description = description;
+        tizen.content.update(contents[0]);
+    });
+
+    onError = t.step_func(function (error) {
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);
+    });
+
+    returnedValue = tizen.content.addChangeListener(changeCallback);
+    filter = new tizen.AttributeFilter("description", "EXISTS");
+    tizen.content.find(onSuccess, onError, null, filter);
+});
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-content-tizen-tests/content/ContentManager_addChangeListener_changeCallback_TypeMismatch.html b/common/tct-content-tizen-tests/content/ContentManager_addChangeListener_changeCallback_TypeMismatch.html
new file mode 100755 (executable)
index 0000000..c138bd6
--- /dev/null
@@ -0,0 +1,61 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Xiaoyan Qian <xy.qian@samsung.com>
+
+-->
+
+<html>
+<head>
+<title>ContentManager_addChangeListener_changeCallback_TypeMismatch</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+<script src="support/content_common.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: ContentManager_addChangeListener_changeCallback_TypeMismatch
+//==== LABEL Check if addChangeListener throws exception when changeCallback is incorrect
+//==== PRIORITY: P2
+//==== ONLOAD_DELAY 30
+//==== SPEC Tizen Web API:Content:Content:ContentManager:addChangeListener M
+//==== SPEC_URL TBD
+//==== TEST_CRITERIA MC
+
+setup({timeout: 30000});
+
+var t = async_test(document.title, {timeout: 30000}), conversionTable, changeCallback, exceptionName, i;
+
+t.step(function () {
+    conversionTable = getTypeConversionExceptions("object", false);
+
+    for (i = 0; i < conversionTable.length; i++) {
+        changeCallback = conversionTable[i][0];
+        exceptionName = conversionTable[i][1];
+
+        assert_throws({name: exceptionName},
+            function () {
+                tizen.content.addChangeListener(changeCallback);
+            }, "Given incorrect changeCallback.");
+    }
+    t.done();
+});
+
+</script>
+</body>
+</html>
diff --git a/common/tct-content-tizen-tests/content/ContentManager_addChangeListener_changeCallback_invalid_cb.html b/common/tct-content-tizen-tests/content/ContentManager_addChangeListener_changeCallback_invalid_cb.html
new file mode 100755 (executable)
index 0000000..e151615
--- /dev/null
@@ -0,0 +1,59 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Xiaoyan Qian <xy.qian@samsung.com>
+
+-->
+
+<html>
+<head>
+<title>ContentManager_addChangeListener_changeCallback_invalid_cb</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+<script src="support/content_common.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: ContentManager_addChangeListener_changeCallback_invalid_cb
+//==== LABEL Check if addChangeListener throws exception when changeCallback is invalid listener
+//==== PRIORITY: P2
+//==== ONLOAD_DELAY 30
+//==== SPEC Tizen Web API:Content:Content:ContentManager:addChangeListener M
+//==== SPEC_URL TBD
+//==== TEST_CRITERIA MTL
+
+setup({timeout: 30000});
+
+var t = async_test(document.title, {timeout: 30000}), exceptionName, incorrectListeners, i, changeCallback;
+
+t.step(function () {
+    incorrectListeners = getListenerConversionExceptions(["oncontentadded", "oncontentupdated", "oncontentremoved", "oncontentdiradded", "oncontentdirupdated", "oncontentdirremoved"]);
+    for(i = 0; i < incorrectListeners.length; i++) {
+        changeCallback  = incorrectListeners[i][0];
+        exceptionName = incorrectListeners[i][1];
+        assert_throws({name: exceptionName},
+            function () {
+                tizen.content.addChangeListener(changeCallback);
+            }, "Given invalid changeCallback.");
+    }
+    t.done();
+});
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-content-tizen-tests/content/ContentManager_addChangeListener_exist.html b/common/tct-content-tizen-tests/content/ContentManager_addChangeListener_exist.html
new file mode 100755 (executable)
index 0000000..fb44c57
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Xiaoyan Qian <xy.qian@samsung.com>
+
+-->
+
+<html>
+<head>
+<title>ContentManager_addChangeListener_exist</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+<script src="support/content_common.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: ContentManager_addChangeListener_exist
+//==== LABEL Check if addChangeListener exists
+//==== SPEC Tizen Web API:Content:Content:ContentManager:addChangeListener M
+//==== SPEC_URL TBD
+//==== PRIORITY P0
+//==== TEST_CRITERIA ME
+
+test(function () {
+    assert_true("addChangeListener" in tizen.content, "ContentManager should have addChangeListener method");
+    check_method_exists(tizen.content, "addChangeListener");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-content-tizen-tests/content/ContentManager_addChangeListener_misarg.html b/common/tct-content-tizen-tests/content/ContentManager_addChangeListener_misarg.html
new file mode 100755 (executable)
index 0000000..9d775ff
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Xiaoyan Qian <xy.qian@samsung.com>
+
+-->
+
+<html>
+<head>
+<title>ContentManager_addChangeListener_misarg</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+<script src="support/content_common.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: ContentManager_addChangeListener_misarg
+//==== LABEL Check if addChangeListener method called with missing non-optional argument throws an exception
+//==== SPEC Tizen Web API:Content:Content:ContentManager:addChangeListener M
+//==== SPEC_URL TBD
+//==== PRIORITY P2
+//==== TEST_CRITERIA MMA
+
+test(function () {
+    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
+        tizen.content.addChangeListener();
+    }, "Invoked without non-optional arguments.");
+}, document.title);
+
+</script>
+</body>
+</html>
diff --git a/common/tct-content-tizen-tests/content/ContentManager_removeChangeListener.html b/common/tct-content-tizen-tests/content/ContentManager_removeChangeListener.html
new file mode 100755 (executable)
index 0000000..27215c6
--- /dev/null
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Xiaoyan Qian <xy.qian@samsung.com>
+
+-->
+
+<html>
+<head>
+<title>ContentManager_removeChangeListener</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+<script src="support/content_common.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: ContentManager_removeChangeListener
+//==== LABEL Check if removeChangeListener method works properly
+//==== ONLOAD_DELAY 30
+//==== SPEC Tizen Web API:Content:Content:ContentManager:removeChangeListener M
+//==== SPEC_URL TBD
+//==== PRIORITY P1
+//==== TEST_CRITERIA MAST MR
+
+setup({timeout: 30000});
+
+var t = async_test(document.title, {timeout: 30000}), onSuccess, onError, listenerId, retVal = null, changeCallback, filter, description = "changeCallback";
+
+t.step(function () {
+    changeCallback= {
+        oncontentadded: t.step_func(function (content) {
+            assert_unreached("Listener oncontentadded invoked.");
+        }),
+        oncontentupdated: t.step_func(function (content) {
+            assert_unreached("Listener oncontentupdated invoked.");
+        }),
+        oncontentremoved: t.step_func(function (id) {
+            assert_unreached("Listener oncontentremoved invoked.");
+        })
+    };
+
+    onSuccess = t.step_func(function (contents) {
+        assert_type(contents, "array", "contents should be an array");
+        assert_greater_than(contents.length, 0, "media item is not found");
+
+        contents[0].description = description;
+        tizen.content.update(contents[0]);
+    });
+
+    onError = t.step_func(function (error) {
+        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);
+    });
+
+    listenerId = tizen.content.addChangeListener(changeCallback);
+    retVal = tizen.content.removeChangeListener(listenerId);
+    assert_equals(retVal, undefined, "removeChangeListener should not return anything");
+
+    filter = new tizen.AttributeFilter("description", "EXISTS");
+    tizen.content.find(onSuccess, onError, null, filter);
+
+    setTimeout(t.step_func(function () {
+        t.done();
+    }), 500);
+});
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/common/tct-content-tizen-tests/content/ContentManager_removeChangeListener_exist.html b/common/tct-content-tizen-tests/content/ContentManager_removeChangeListener_exist.html
new file mode 100755 (executable)
index 0000000..170c5c9
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2016 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+        Xiaoyan <xy.qian@samsung.com>
+
+-->
+
+<html>
+<head>
+<title>ContentManager_removeChangeListener_exist</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+<script src="support/content_common.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: ContentManager_removeChangeListener_exist
+//==== LABEL Check if removeChangeListener exists
+//==== SPEC Tizen Web API:Content:Content:ContentManager:removeChangeListener M
+//==== SPEC_URL TBD
+//==== PRIORITY P0
+//==== TEST_CRITERIA ME
+
+test(function () {
+    assert_true("removeChangeListener" in tizen.content, "ContentManager should have removeChangeListener method");
+    check_method_exists(tizen.content, "removeChangeListener");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
index eb30961ac143e793a7d71ab90bb703b2a1161e8c..e32810a17ae37281ef402e1a15a129b11fcae993 100644 (file)
@@ -16,6 +16,7 @@ limitations under the License.
 
 Authors:
         Krzysztof Lachacz <k.lachacz@samsung.com>
+        Xiaoyan Qian <xy.qian@samsung.com>
 
 -->
 
@@ -38,14 +39,14 @@ Authors:
 //==== TEST_CRITERIA MMINA MAST MR
 setup({timeout: 30000});
 
-var t = async_test(document.title, {timeout: 30000}), returnedValue = null,
+var t = async_test(document.title, {timeout: 30000}), returnedValue = null, listenerId,
     addedImagePath=TEST_CONTENT_PATH + "/ContentChangeCallback_oncontentadded.png", changeCallback, onCopySuccess;
 
 setup_contents(t, t.step_func(function () {
     //cleanup after TC
     add_result_callback(function () {
         try {
-            tizen.content.unsetChangeListener();
+            tizen.content.removeChangeListener(listenerId);
         } catch (err) {}
     });
 
@@ -59,7 +60,7 @@ setup_contents(t, t.step_func(function () {
     };
 
     onCopySuccess = t.step_func(function () {
-        tizen.content.setChangeListener(changeCallback);
+        listenerId = tizen.content.addChangeListener(changeCallback);
         returnedValue = tizen.content.scanFile("file://" + addedImagePath, null,
             function (error) {
                 assert_unreached("Failed to scan a file: " + addedImagePath + " with message: " + error.message);
diff --git a/common/tct-content-tizen-tests/content/ContentManager_setChangeListener.html b/common/tct-content-tizen-tests/content/ContentManager_setChangeListener.html
deleted file mode 100644 (file)
index 419d490..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Tomasz Kusmierz <t.kusmierz@samsung.com>
-
--->
-
-<html>
-<head>
-<title>ContentManager_setChangeListener</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/content_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script type="text/javascript">
-//==== TEST: ContentManager_setChangeListener
-//==== LABEL Check if setChangeListener method works properly
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:Content:Content:ContentManager:setChangeListener M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html
-//==== PRIORITY P1
-//==== TEST_CRITERIA MMINA MAST MR
-
-setup({timeout: 30000});
-
-var t = async_test(document.title, {timeout: 30000}), onSuccess, onError,
-    changeCallback, returnedValue = null, filter, description = "changeCallback_"+ new Date().getTime();
-t.step(function () {
-    //cleanup after TC
-    add_result_callback(function () {
-        try {
-            tizen.content.unsetChangeListener();
-        } catch (err) {}
-    });
-
-    changeCallback = {
-        oncontentadded: t.step_func(function (content) {
-
-        }),
-        oncontentupdated: t.step_func(function (content) {
-            assert_equals(content.description, description,
-                "updated content has wrong value.");
-            assert_equals(returnedValue, undefined,
-                "setChangeListener should return undefined.");
-
-            t.done();
-        }),
-        oncontentremoved: t.step_func(function (id) {
-
-        })
-    };
-    onSuccess = t.step_func(function (contents) {
-        assert_type(contents, "array", "contents should be an array");
-        assert_greater_than(contents.length, 0, "media item is not found");
-
-        contents[0].description = description;
-        tizen.content.update(contents[0]);
-    });
-    onError = t.step_func(function (error) {
-        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-    returnedValue = tizen.content.setChangeListener(changeCallback);
-    filter = new tizen.AttributeFilter("description", "EXISTS");
-    tizen.content.find(onSuccess, onError, null, filter);
-});
-
-</script>
-</body>
-</html>
diff --git a/common/tct-content-tizen-tests/content/ContentManager_setChangeListener_changeCallback_TypeMismatch.html b/common/tct-content-tizen-tests/content/ContentManager_setChangeListener_changeCallback_TypeMismatch.html
deleted file mode 100644 (file)
index 598db7d..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Krzysztof Lachacz <k.lachacz@samsung.com>
-
--->
-
-<html>
-<head>
-<title>ContentManager_setChangeListener_changeCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/content_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script type="text/javascript">
-//==== TEST: ContentManager_setChangeListener_changeCallback_TypeMismatch
-//==== LABEL Check if setChangeListener throws exception when changeCallback is incorrect
-//==== PRIORITY: P2
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:Content:Content:ContentManager:setChangeListener M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html
-//==== TEST_CRITERIA MC
-setup({timeout: 30000});
-
-var t = async_test(document.title, {timeout: 30000}),
-    conversionTable, changeCallback, exceptionName, i;
-
-t.step(function () {
-    conversionTable = getTypeConversionExceptions("object", false);
-
-    for(i = 0; i < conversionTable.length; i++) {
-        changeCallback = conversionTable[i][0];
-        exceptionName = conversionTable[i][1];
-
-        assert_throws({name: exceptionName},
-            function () {
-                tizen.content.setChangeListener(changeCallback);
-            }, "Given incorrect changeCallback.");
-    }
-    t.done();
-});
-
-</script>
-</body>
-</html>
diff --git a/common/tct-content-tizen-tests/content/ContentManager_setChangeListener_changeCallback_invalid_cb.html b/common/tct-content-tizen-tests/content/ContentManager_setChangeListener_changeCallback_invalid_cb.html
deleted file mode 100644 (file)
index 5297137..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Krzysztof Lachacz <k.lachacz@samsung.com>
-
--->
-
-<html>
-<head>
-<title>ContentManager_setChangeListener_changeCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/content_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script type="text/javascript">
-//==== TEST: ContentManager_setChangeListener_changeCallback_invalid_cb
-//==== LABEL Check if setChangeListener throws exception when changeCallback is invalid listener
-//==== PRIORITY: P2
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:Content:Content:ContentManager:setChangeListener M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html
-//==== TEST_CRITERIA MTL
-setup({timeout: 30000});
-
-var t = async_test(document.title, {timeout: 30000}),
-    exceptionName, incorrectListeners, i, changeCallback;
-
-t.step(function () {
-    incorrectListeners = getListenerConversionExceptions(["oncontentadded",
-        "oncontentupdated", "oncontentremoved"]);
-    for(i = 0; i < incorrectListeners.length; i++) {
-        changeCallback  = incorrectListeners[i][0];
-        exceptionName = incorrectListeners[i][1];
-        assert_throws({name: exceptionName},
-            function () {
-                tizen.content.setChangeListener(changeCallback);
-            }, "Given invalid changeCallback.");
-    }
-    t.done();
-});
-
-</script>
-</body>
-</html>
diff --git a/common/tct-content-tizen-tests/content/ContentManager_setChangeListener_exist.html b/common/tct-content-tizen-tests/content/ContentManager_setChangeListener_exist.html
deleted file mode 100644 (file)
index 6b226b5..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Krzysztof Lachacz <k.lachacz@samsung.com>
-
--->
-
-<html>
-<head>
-<title>ContentManager_setChangeListener_exist</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/content_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script type="text/javascript">
-//==== TEST: ContentManager_setChangeListener_exist
-//==== LABEL Check if setChangeListener exists
-//==== SPEC Tizen Web API:Content:Content:ContentManager:setChangeListener M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html
-//==== PRIORITY P0
-//==== TEST_CRITERIA ME
-test(function () {
-    assert_true("setChangeListener" in tizen.content,
-        "ContentManager should have setChangeListener method");
-    check_method_exists(tizen.content, "setChangeListener");
-}, document.title);
-
-</script>
-</body>
-</html>
diff --git a/common/tct-content-tizen-tests/content/ContentManager_setChangeListener_missarg.html b/common/tct-content-tizen-tests/content/ContentManager_setChangeListener_missarg.html
deleted file mode 100644 (file)
index 31ca6e6..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Krzysztof Lachacz <k.lachacz@samsung.com>
-
--->
-
-<html>
-<head>
-<title>ContentManager_setChangeListener_missarg</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/content_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script type="text/javascript">
-//==== TEST: ContentManager_setChangeListener_missarg
-//==== LABEL Check if setChangeListener method called with missing non-optional argument throws an exception
-//==== SPEC Tizen Web API:Content:Content:ContentManager:setChangeListener M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html
-//==== PRIORITY P2
-//==== TEST_CRITERIA MMA
-test(function () {
-    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
-        tizen.content.setChangeListener();
-    }, "Invoked without non-optional arguments.");
-}, document.title);
-
-</script>
-</body>
-</html>
diff --git a/common/tct-content-tizen-tests/content/ContentManager_unsetChangeListener.html b/common/tct-content-tizen-tests/content/ContentManager_unsetChangeListener.html
deleted file mode 100644 (file)
index 465712e..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Krzysztof Lachacz <k.lachacz@samsung.com>
-
--->
-
-<html>
-<head>
-<title>ContentManager_unsetChangeListener</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/content_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script type="text/javascript">
-//==== TEST: ContentManager_unsetChangeListener
-//==== LABEL Check if unsetChangeListener method called with non-optional arguments does what it should
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:Content:Content:ContentManager:unsetChangeListener M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html
-//==== PRIORITY P1
-//==== TEST_CRITERIA MNA MNAST MR
-
-setup({timeout: 30000});
-
-var t = async_test(document.title, {timeout: 30000}), onSuccess, onError, retVal = null,
-    changeCallback, filter, description = "changeCallback";
-t.step(function () {
-    changeCallback= {
-        oncontentadded: t.step_func(function (content) {
-            assert_unreached("Listener oncontentadded invoked.");
-        }),
-        oncontentupdated: t.step_func(function (content) {
-            assert_unreached("Listener oncontentupdated invoked.");
-        }),
-        oncontentremoved: t.step_func(function (id) {
-            assert_unreached("Listener oncontentremoved invoked.");
-        })
-    };
-    onSuccess = t.step_func(function (contents) {
-        assert_type(contents, "array", "contents should be an array");
-        assert_greater_than(contents.length, 0, "media item is not found");
-
-        contents[0].description = description;
-        tizen.content.update(contents[0]);
-    });
-    onError = t.step_func(function (error) {
-        assert_unreached("find() error callback was invoked: " + error.name + " msg: " + error.message);
-    });
-
-    tizen.content.setChangeListener(changeCallback);
-    retVal = tizen.content.unsetChangeListener();
-    assert_equals(retVal, undefined, "unsetChangeListener should not return anything");
-
-    filter = new tizen.AttributeFilter("description", "EXISTS");
-    tizen.content.find(onSuccess, onError, null, filter);
-
-    setTimeout(t.step_func(function () {
-        t.done();
-    }), 500);
-});
-
-</script>
-</body>
-</html>
diff --git a/common/tct-content-tizen-tests/content/ContentManager_unsetChangeListener_exist.html b/common/tct-content-tizen-tests/content/ContentManager_unsetChangeListener_exist.html
deleted file mode 100644 (file)
index ee6d18b..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Krzysztof Lachacz <k.lachacz@samsung.com>
-
--->
-
-<html>
-<head>
-<title>ContentManager_unsetChangeListener_exist</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/content_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script type="text/javascript">
-//==== TEST: ContentManager_unsetChangeListener_exist
-//==== LABEL Check if unsetChangeListener exists
-//==== SPEC Tizen Web API:Content:Content:ContentManager:unsetChangeListener M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html
-//==== PRIORITY P0
-//==== TEST_CRITERIA ME
-test(function () {
-    assert_true("unsetChangeListener" in tizen.content,
-        "ContentManager should have unsetChangeListener method");
-    check_method_exists(tizen.content, "unsetChangeListener");
-}, document.title);
-
-</script>
-</body>
-</html>
diff --git a/common/tct-content-tizen-tests/content/ContentManager_unsetChangeListener_extra_argument.html b/common/tct-content-tizen-tests/content/ContentManager_unsetChangeListener_extra_argument.html
deleted file mode 100644 (file)
index d12dc90..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Authors:
-        Krzysztof Lachacz <k.lachacz@samsung.com>
-
--->
-
-<html>
-<head>
-<title>ContentManager_unsetChangeListener_extra_argument</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/content_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script type="text/javascript">
-//==== TEST: ContentManager_unsetChangeListener_extra_argument
-//==== LABEL Check if unsetChangeListener method can be invoked with extra argument
-//==== SPEC Tizen Web API:Content:Content:ContentManager:unsetChangeListener M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html
-//==== PRIORITY P2
-//==== TEST_CRITERIA MNAEX
-test(function () {
-    checkExtraArgument(tizen.content, "unsetChangeListener");
-}, document.title);
-
-</script>
-</body>
-</html>
index 04507f24418013eaa617d7dab3934c3386b0b912..9cf1ea3fb19b10f9326e4d3663726f3fef8acdcb 100644 (file)
@@ -25,7 +25,15 @@ tct_parser.read(TCT_CONFIG_FILE)
 SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
 #INTERNAL_STORAGE = tct_parser.get('DEVICE', 'DEVICE_STORAGE_30')
 PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
+EXECUTION_MODE_30 = tct_parser.get('DEVICE', 'DEVICE_EXECUTION_MODE_30')
+ADMIN_USER_30 = tct_parser.get('DEVICE', 'DEVICE_ADMIN_USER_30')
 
+def userCheck():
+    global GLOVAL_OPT
+    if ADMIN_USER_30 == EXECUTION_MODE_30:
+        GLOVAL_OPT="--global"
+    else:
+        GLOVAL_OPT=""
 
 #def getInternalStorage1():
 #    if PARAMETERS.mode == "SDB":
@@ -61,8 +69,7 @@ def getInternalStorage():
         shell_mgr = ShellManager()
         shell_mgr.open_shellpipe(PARAMETERS.device.strip())
         #shell_mgr.open_shellpipe('0000d8dd00006200')
-        shell_mgr.write_cmd('export `tzplatform-get TZ_SYS_DEFAULT_USER`', '', None)
-        shell_mgr.write_cmd('export `tzplatform-get --user $TZ_SYS_DEFAULT_USER TZ_USER_CONTENT`','', None)
+        shell_mgr.write_cmd('export `tzplatform-get --user ' +PARAMETERS.user+' TZ_USER_CONTENT`', '', None)
         INTERNAL_STORAGE=shell_mgr.write_cmd('echo $TZ_USER_CONTENT','', None)
         INTERNAL_STORAGE=str(INTERNAL_STORAGE[len(INTERNAL_STORAGE)-1])
         print str(INTERNAL_STORAGE)
@@ -72,6 +79,45 @@ def getInternalStorage():
     finally:
         shell_mgr.close_shellpipe()
 
+def askpolicyremoving():
+    print "0"
+    print "0"
+    print "0"
+    print "0"
+    print "0"
+    for root, dirs, files in os.walk(SCRIPT_DIR):
+        for file in files:
+            if file.endswith(".wgt"):
+                pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
+    
+    print pkg_id
+    print pkg_id
+    print pkg_id
+    print pkg_id
+    print (os.getcwd())
+    print (os.getcwd())
+    print (os.path.dirname(os.path.realpath(__file__)) )
+    print (os.path.dirname(os.path.realpath(__file__)) )
+    if not doRemoteCopy("%s/askpolicy.sh" % SCRIPT_DIR, "%s" % (SRC_DIR)):
+        action_status = False
+    print "1"
+    print "1"
+    print "1"
+    print "1"
+    print "1"
+    if PARAMETERS.mode == "SDB":
+        cmd = "sdb -s %s shell .%s/askpolicy.sh %s" % (PARAMETERS.device, 
+        SRC_DIR, pkg_id)
+        print cmd
+        print cmd
+        print cmd
+        print cmd
+        print cmd
+    return doCMD(cmd)        
+    print "2"
+    print "2"
+    print "2"
+        
 def recordInternalStorage():
     try:
         f = open("/opt/tools/TCT_CONFIG", "a")
@@ -187,7 +233,7 @@ def uninstPKGs():
                     action_status = False
                     continue
                 (return_code, output) = doRemoteCMD(
-                    "pkgcmd -u -t wgt -q -n %s" % pkg_id)
+                    "pkgcmd %s -u -t wgt -q -n %s" % (GLOVAL_OPT, pkg_id))
                 for line in output:
                     if "Failure" in line:
                         action_status = False
@@ -220,7 +266,7 @@ def instPKGs():
                 if not doRemoteCopy(os.path.join(root, file), "%s/%s" % (SRC_DIR, file)):
                     action_status = False
                 (return_code, output) = doRemoteCMD(
-                    "pkgcmd -i -t wgt -q -p %s/%s" % (SRC_DIR, file))
+                    "pkgcmd %s -i -t wgt -q -p %s/%s" % (GLOVAL_OPT, SRC_DIR, file))
                 doRemoteCMD("rm -rf %s/%s" % (SRC_DIR, file))
                 for line in output:
                     if "Failure" in line:
@@ -262,7 +308,7 @@ def main():
         sys.exit(1)
 
     if not PARAMETERS.user:
-        PARAMETERS.user = "owner"
+        PARAMETERS.user = EXECUTION_MODE_30
     if not PARAMETERS.mode:
         PARAMETERS.mode = "SDB"
 
@@ -279,6 +325,9 @@ def main():
     if not PARAMETERS.device:
         print "No device provided"
         sys.exit(1)
+
+    userCheck()
+
     getInternalStorage()
     #recordInternalStorage()
     user_info = getUSERID()
@@ -299,6 +348,12 @@ def main():
             sys.exit(1)
     else:
         if not instPKGs():
+            print "inst"
+            print "inst"
+            print "inst"
+            print "inst"
+            print "inst"
+            #askpolicyremoving()
             sys.exit(1)
 
 if __name__ == "__main__":
index f1e554590d32723096b01eff8b4432e7d2727701..1a72f5e8e3807fb6027197dc3cde43cef0541b46 100644 (file)
@@ -19,6 +19,7 @@
                 "inst.wgt.py": "inst.py",
                 "shellmanager.py": "shellmanager.py",
                 "Queue.py": "Queue.py",
+                "askpolicy.sh": "askpolicy.sh",
                 "media": "media",
                 "tests.xml": "tests.xml"
             },
index 4ced6107e524db2c78684cca1bf7ae28a4289a08..cb852fd9cfd145907070ad248d4c8051e72496c2 100644 (file)
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="Check if setChangeListener exists" type="compliance" status="approved" component="Tizen Device APIs/Content/Content" execution_type="auto" priority="P0" id="ContentManager_setChangeListener_exist">
+      <testcase purpose="Check if addChangeListener exists" type="compliance" status="approved" component="Tizen Device APIs/Content/Content" execution_type="auto" priority="P0" id="ContentManager_addChangeListener_exist">
         <description>
-          <test_script_entry>/opt/tct-content-tizen-tests/content/ContentManager_setChangeListener_exist.html</test_script_entry>
+          <test_script_entry>/opt/tct-content-tizen-tests/content/ContentManager_addChangeListener_exist.html</test_script_entry>
         </description>
         <specs>
           <spec>
-            <spec_assertion interface="ContentManager" element_type="method" element_name="setChangeListener" specification="Content" section="Content" category="Tizen Device API Specifications"/>
-            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html</spec_url>
+            <spec_assertion interface="ContentManager" element_type="method" element_name="addChangeListener" specification="Content" section="Content" category="Tizen Device API Specifications"/>
+            <spec_url>TBD</spec_url>
             <spec_statement>TBD</spec_statement>
           </spec>
         </specs>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="Check if setChangeListener method called with missing non-optional argument throws an exception" type="compliance" status="approved" component="Tizen Device APIs/Content/Content" execution_type="auto" priority="P2" id="ContentManager_setChangeListener_missarg">
+      <testcase purpose="Check if addChangeListener method called with missing non-optional argument throws an exception" type="compliance" status="approved" component="Tizen Device APIs/Content/Content" execution_type="auto" priority="P2" id="ContentManager_addChangeListener_misarg">
         <description>
-          <test_script_entry>/opt/tct-content-tizen-tests/content/ContentManager_setChangeListener_missarg.html</test_script_entry>
+          <test_script_entry>/opt/tct-content-tizen-tests/content/ContentManager_addChangeListener_misarg.html</test_script_entry>
         </description>
         <specs>
           <spec>
-            <spec_assertion interface="ContentManager" element_type="method" element_name="setChangeListener" specification="Content" section="Content" category="Tizen Device API Specifications"/>
-            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html</spec_url>
+            <spec_assertion interface="ContentManager" element_type="method" element_name="addChangeListener" specification="Content" section="Content" category="Tizen Device API Specifications"/>
+            <spec_url>TBD</spec_url>
             <spec_statement>TBD</spec_statement>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="Check if setChangeListener throws exception when changeCallback is incorrect" type="compliance" onload_delay="30" status="approved" component="Tizen Device APIs/Content/Content" execution_type="auto" priority="P2" id="ContentManager_setChangeListener_changeCallback_TypeMismatch">
+      <testcase purpose="Check if addChangeListener throws exception when changeCallback is incorrect" type="compliance" onload_delay="30" status="approved" component="Tizen Device APIs/Content/Content" execution_type="auto" priority="P2" id="ContentManager_addChangeListener_changeCallback_TypeMismatch">
         <description>
-          <test_script_entry>/opt/tct-content-tizen-tests/content/ContentManager_setChangeListener_changeCallback_TypeMismatch.html</test_script_entry>
+          <test_script_entry>/opt/tct-content-tizen-tests/content/ContentManager_addChangeListener_changeCallback_TypeMismatch.html</test_script_entry>
         </description>
         <specs>
           <spec>
-            <spec_assertion interface="ContentManager" element_type="method" element_name="setChangeListener" specification="Content" section="Content" category="Tizen Device API Specifications"/>
-            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html</spec_url>
+            <spec_assertion interface="ContentManager" element_type="method" element_name="addChangeListener" specification="Content" section="Content" category="Tizen Device API Specifications"/>
+            <spec_url>TBD</spec_url>
             <spec_statement>TBD</spec_statement>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="Check if setChangeListener throws exception when changeCallback is invalid listener" type="compliance" onload_delay="30" status="approved" component="Tizen Device APIs/Content/Content" execution_type="auto" priority="P2" id="ContentManager_setChangeListener_changeCallback_invalid_cb">
+      <testcase purpose="Check if addChangeListener throws exception when changeCallback is invalid listener" type="compliance" onload_delay="30" status="approved" component="Tizen Device APIs/Content/Content" execution_type="auto" priority="P2" id="ContentManager_addChangeListener_changeCallback_invalid_cb">
         <description>
-          <test_script_entry>/opt/tct-content-tizen-tests/content/ContentManager_setChangeListener_changeCallback_invalid_cb.html</test_script_entry>
+          <test_script_entry>/opt/tct-content-tizen-tests/content/ContentManager_addChangeListener_changeCallback_invalid_cb.html</test_script_entry>
         </description>
         <specs>
           <spec>
-            <spec_assertion interface="ContentManager" element_type="method" element_name="setChangeListener" specification="Content" section="Content" category="Tizen Device API Specifications"/>
-            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html</spec_url>
+            <spec_assertion interface="ContentManager" element_type="method" element_name="addChangeListener" specification="Content" section="Content" category="Tizen Device API Specifications"/>
+            <spec_url>TBD</spec_url>
             <spec_statement>TBD</spec_statement>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="Check if unsetChangeListener exists" type="compliance" status="approved" component="Tizen Device APIs/Content/Content" execution_type="auto" priority="P0" id="ContentManager_unsetChangeListener_exist">
+      <testcase purpose="Check if removeChangeListener exists" type="compliance" status="approved" component="Tizen Device APIs/Content/Content" execution_type="auto" priority="P0" id="ContentManager_removeChangeListener_exist">
         <description>
-          <test_script_entry>/opt/tct-content-tizen-tests/content/ContentManager_unsetChangeListener_exist.html</test_script_entry>
+          <test_script_entry>/opt/tct-content-tizen-tests/content/ContentManager_removeChangeListener_exist.html</test_script_entry>
         </description>
         <specs>
           <spec>
-            <spec_assertion interface="ContentManager" element_type="method" element_name="unsetChangeListener" specification="Content" section="Content" category="Tizen Device API Specifications"/>
-            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html</spec_url>
+            <spec_assertion interface="ContentManager" element_type="method" element_name="removeChangeListener" specification="Content" section="Content" category="Tizen Device API Specifications"/>
+            <spec_url>TBD</spec_url>
             <spec_statement>TBD</spec_statement>
           </spec>
         </specs>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="Check if unsetChangeListener method can be invoked with extra argument" type="compliance" status="approved" component="Tizen Device APIs/Content/Content" execution_type="auto" priority="P2" id="ContentManager_unsetChangeListener_extra_argument">
-        <description>
-          <test_script_entry>/opt/tct-content-tizen-tests/content/ContentManager_unsetChangeListener_extra_argument.html</test_script_entry>
-        </description>
-        <specs>
-          <spec>
-            <spec_assertion interface="ContentManager" element_type="method" element_name="unsetChangeListener" specification="Content" section="Content" category="Tizen Device API Specifications"/>
-            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html</spec_url>
-            <spec_statement>TBD</spec_statement>
-          </spec>
-        </specs>
-      </testcase>
       <testcase purpose="Check if ContentArraySuccessCallback onsuccess is called and if its arguments have proper type" type="compliance" onload_delay="30" status="approved" component="Tizen Device APIs/Content/Content" execution_type="auto" priority="P1" id="ContentArraySuccessCallback_onsuccess">
         <description>
           <test_script_entry>/opt/tct-content-tizen-tests/content/ContentArraySuccessCallback_onsuccess.html</test_script_entry>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="Check if unsetChangeListener method called with non-optional arguments does what it should" type="compliance" onload_delay="30" status="approved" component="Tizen Device APIs/Content/Content" execution_type="auto" priority="P1" id="ContentManager_unsetChangeListener">
+      <testcase purpose="Check if removeChangeListener method called with non-optional arguments does what it should" type="compliance" onload_delay="30" status="approved" component="Tizen Device APIs/Content/Content" execution_type="auto" priority="P1" id="ContentManager_removeChangeListener">
         <description>
-          <test_script_entry>/opt/tct-content-tizen-tests/content/ContentManager_unsetChangeListener.html</test_script_entry>
+          <test_script_entry>/opt/tct-content-tizen-tests/content/ContentManager_removeChangeListener.html</test_script_entry>
         </description>
         <specs>
           <spec>
-            <spec_assertion interface="ContentManager" element_type="method" element_name="unsetChangeListener" specification="Content" section="Content" category="Tizen Device API Specifications"/>
-            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html</spec_url>
+            <spec_assertion interface="ContentManager" element_type="method" element_name="removeChangeListener" specification="Content" section="Content" category="Tizen Device API Specifications"/>
+            <spec_url>TBD</spec_url>
             <spec_statement>TBD</spec_statement>
           </spec>
         </specs>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="Check if setChangeListener method works properly" type="compliance" onload_delay="30" status="approved" component="Tizen Device APIs/Content/Content" execution_type="auto" priority="P1" id="ContentManager_setChangeListener">
+      <testcase purpose="Check if addChangeListener method works properly" type="compliance" onload_delay="30" status="approved" component="Tizen Device APIs/Content/Content" execution_type="auto" priority="P1" id="ContentManager_addChangeListener">
         <description>
-          <test_script_entry>/opt/tct-content-tizen-tests/content/ContentManager_setChangeListener.html</test_script_entry>
+          <test_script_entry>/opt/tct-content-tizen-tests/content/ContentManager_addChangeListener.html</test_script_entry>
         </description>
         <specs>
           <spec>
-            <spec_assertion interface="ContentManager" element_type="method" element_name="setChangeListener" specification="Content" section="Content" category="Tizen Device API Specifications"/>
-            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html</spec_url>
+            <spec_assertion interface="ContentManager" element_type="method" element_name="addChangeListener" specification="Content" section="Content" category="Tizen Device API Specifications"/>
+            <spec_url>TBD</spec_url>
             <spec_statement>TBD</spec_statement>
           </spec>
         </specs>
index 32e444042e6fe8f359bcf527e664c51a357f8b5a..68af449ab508c7384cd3a283c96c5f1e7e3d2ed5 100644 (file)
           <test_script_entry>/opt/tct-content-tizen-tests/content/ContentManager_scanFile_errorCallback_invalid_cb.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="Check if setChangeListener exists" component="Tizen Device APIs/Content/Content" execution_type="auto" priority="P0" id="ContentManager_setChangeListener_exist">
+      <testcase purpose="Check if addChangeListener exists" component="Tizen Device APIs/Content/Content" execution_type="auto" priority="P0" id="ContentManager_addChangeListener_exist">
         <description>
-          <test_script_entry>/opt/tct-content-tizen-tests/content/ContentManager_setChangeListener_exist.html</test_script_entry>
+          <test_script_entry>/opt/tct-content-tizen-tests/content/ContentManager_addChangeListener_exist.html</test_script_entry>
         </description>
       </testcase>
       <testcase purpose="Check if ContentArraySuccessCallback cannot be called in new expression and as a function or in new expression" component="Tizen Device APIs/Content/Content" execution_type="auto" priority="P3" id="ContentArraySuccessCallback_notexist">
           <test_script_entry>/opt/tct-content-tizen-tests/content/AudioContent_notexist.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="Check if setChangeListener method called with missing non-optional argument throws an exception" component="Tizen Device APIs/Content/Content" execution_type="auto" priority="P2" id="ContentManager_setChangeListener_missarg">
+      <testcase purpose="Check if addChangeListener method called with missing non-optional argument throws an exception" component="Tizen Device APIs/Content/Content" execution_type="auto" priority="P2" id="ContentManager_addChangeListener_misarg">
         <description>
-          <test_script_entry>/opt/tct-content-tizen-tests/content/ContentManager_setChangeListener_missarg.html</test_script_entry>
+          <test_script_entry>/opt/tct-content-tizen-tests/content/ContentManager_addChangeListener_misarg.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="Check if setChangeListener throws exception when changeCallback is incorrect" onload_delay="30" component="Tizen Device APIs/Content/Content" execution_type="auto" priority="P2" id="ContentManager_setChangeListener_changeCallback_TypeMismatch">
+      <testcase purpose="Check if addChangeListener throws exception when changeCallback is incorrect" onload_delay="30" component="Tizen Device APIs/Content/Content" execution_type="auto" priority="P2" id="ContentManager_addChangeListener_changeCallback_TypeMismatch">
         <description>
-          <test_script_entry>/opt/tct-content-tizen-tests/content/ContentManager_setChangeListener_changeCallback_TypeMismatch.html</test_script_entry>
+          <test_script_entry>/opt/tct-content-tizen-tests/content/ContentManager_addChangeListener_changeCallback_TypeMismatch.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="Check if setChangeListener throws exception when changeCallback is invalid listener" onload_delay="30" component="Tizen Device APIs/Content/Content" execution_type="auto" priority="P2" id="ContentManager_setChangeListener_changeCallback_invalid_cb">
+      <testcase purpose="Check if addChangeListener throws exception when changeCallback is invalid listener" onload_delay="30" component="Tizen Device APIs/Content/Content" execution_type="auto" priority="P2" id="ContentManager_addChangeListener_changeCallback_invalid_cb">
         <description>
-          <test_script_entry>/opt/tct-content-tizen-tests/content/ContentManager_setChangeListener_changeCallback_invalid_cb.html</test_script_entry>
+          <test_script_entry>/opt/tct-content-tizen-tests/content/ContentManager_addChangeListener_changeCallback_invalid_cb.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="Check if unsetChangeListener exists" component="Tizen Device APIs/Content/Content" execution_type="auto" priority="P0" id="ContentManager_unsetChangeListener_exist">
+      <testcase purpose="Check if removeChangeListener exists" component="Tizen Device APIs/Content/Content" execution_type="auto" priority="P0" id="ContentManager_removeChangeListener_exist">
         <description>
-          <test_script_entry>/opt/tct-content-tizen-tests/content/ContentManager_unsetChangeListener_exist.html</test_script_entry>
+          <test_script_entry>/opt/tct-content-tizen-tests/content/ContentManager_removeChangeListener_exist.html</test_script_entry>
         </description>
       </testcase>
       <testcase purpose="Check if ImageContent can have new properties added" onload_delay="30" component="Tizen Device APIs/Content/Content" execution_type="auto" priority="P3" id="ImageContent_extend">
           <test_script_entry>/opt/tct-content-tizen-tests/content/ContentManager_find_sortMode_invalid_obj.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="Check if unsetChangeListener method can be invoked with extra argument" component="Tizen Device APIs/Content/Content" execution_type="auto" priority="P2" id="ContentManager_unsetChangeListener_extra_argument">
-        <description>
-          <test_script_entry>/opt/tct-content-tizen-tests/content/ContentManager_unsetChangeListener_extra_argument.html</test_script_entry>
-        </description>
-      </testcase>
       <testcase purpose="Check if ContentArraySuccessCallback onsuccess is called and if its arguments have proper type" onload_delay="30" component="Tizen Device APIs/Content/Content" execution_type="auto" priority="P1" id="ContentArraySuccessCallback_onsuccess">
         <description>
           <test_script_entry>/opt/tct-content-tizen-tests/content/ContentArraySuccessCallback_onsuccess.html</test_script_entry>
           <test_script_entry>/opt/tct-content-tizen-tests/content/ContentManager_scanFile_with_successCallback.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="Check if unsetChangeListener method called with non-optional arguments does what it should" onload_delay="30" component="Tizen Device APIs/Content/Content" execution_type="auto" priority="P1" id="ContentManager_unsetChangeListener">
+      <testcase purpose="Check if removeChangeListener method called with non-optional arguments does what it should" onload_delay="30" component="Tizen Device APIs/Content/Content" execution_type="auto" priority="P1" id="ContentManager_removeChangeListener">
         <description>
-          <test_script_entry>/opt/tct-content-tizen-tests/content/ContentManager_unsetChangeListener.html</test_script_entry>
+          <test_script_entry>/opt/tct-content-tizen-tests/content/ContentManager_removeChangeListener.html</test_script_entry>
         </description>
       </testcase>
       <testcase purpose="Check if VideoContent can have new properties added" onload_delay="30" component="Tizen Device APIs/Content/Content" execution_type="auto" priority="P3" id="VideoContent_extend">
           <test_script_entry>/opt/tct-content-tizen-tests/content/ContentManager_updateBatch_image_orientation.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="Check if setChangeListener method works properly" onload_delay="30" component="Tizen Device APIs/Content/Content" execution_type="auto" priority="P1" id="ContentManager_setChangeListener">
+      <testcase purpose="Check if addChangeListener method works properly" onload_delay="30" component="Tizen Device APIs/Content/Content" execution_type="auto" priority="P1" id="ContentManager_addChangeListener">
         <description>
-          <test_script_entry>/opt/tct-content-tizen-tests/content/ContentManager_setChangeListener.html</test_script_entry>
+          <test_script_entry>/opt/tct-content-tizen-tests/content/ContentManager_addChangeListener.html</test_script_entry>
         </description>
       </testcase>
       <testcase purpose="Check if updateBatch called without callback is invoked properly" onload_delay="30" component="Tizen Device APIs/Content/Content" execution_type="auto" priority="P1" id="ContentManager_updateBatch_without_callback">