</spec>
</specs>
</testcase>
- <testcase purpose="Check CaptionMenuChangeCallback onchange method" type="compliance" onload_delay="90" status="approved" component="TizenAPI/TBD/TVInfo" execution_type="manual" priority="P1" id="CaptionMenuChangeCallback_onchange">
+ <testcase purpose="Check CaptionMenuChangeCallback onchange method" type="compliance" onload_delay="90" status="approved" component="TizenAPI/TBD/TVInfo" execution_type="auto" priority="P1" id="CaptionMenuChangeCallback_onchange">
<description>
- <pre_condition>TV is running normally</pre_condition>
- <steps>
- <step order="1">
- <step_desc>After press Run button, change the caption state (ON to OFF or OFF to ON) using the command 'vconftool set -t int db/menu/caption/caption "1" -f' to
-enable captions or the command 'vconftool set -t int db/menu/caption/caption "0" -f' to disable captions.</step_desc>
- <expected>PASS</expected>
- </step>
- </steps>
<test_script_entry>/opt/tct-tv-info-tizen-tests/tv-info/CaptionMenuChangeCallback_onchange.html</test_script_entry>
</description>
<specs>
</spec>
</specs>
</testcase>
- <testcase purpose="Check if addCaptionValueChangeListener works properly" type="compliance" onload_delay="90" status="approved" component="TizenAPI/TBD/TVInfo" execution_type="manual" priority="P1" id="TVInfoManager_addCaptionValueChangeListener">
+ <testcase purpose="Check if addCaptionValueChangeListener works properly" type="compliance" onload_delay="90" status="approved" component="TizenAPI/TBD/TVInfo" execution_type="auto" priority="P1" id="TVInfoManager_addCaptionValueChangeListener">
<description>
- <pre_condition>TV is running normally</pre_condition>
- <steps>
- <step order="1">
- <step_desc>After press Run button, change the caption state (ON to OFF or OFF to ON) using the command 'vconftool set -t int db/menu/caption/caption "1" -f' to
-enable captions or the command 'vconftool set -t int db/menu/caption/caption "0" -f' to disable captions.</step_desc>
- <expected>PASS</expected>
- </step>
- </steps>
<test_script_entry>/opt/tct-tv-info-tizen-tests/tv-info/TVInfoManager_addCaptionValueChangeListener.html</test_script_entry>
</description>
<specs>
</spec>
</specs>
</testcase>
- <testcase purpose="Check if removeCaptionValueChangeListener works properly" type="compliance" onload_delay="90" status="approved" component="TizenAPI/TBD/TVInfo" execution_type="manual" priority="P1" id="TVInfoManager_removeCaptionValueChangeListener">
+ <testcase purpose="Check if removeCaptionValueChangeListener works properly" type="compliance" onload_delay="90" status="approved" component="TizenAPI/TBD/TVInfo" execution_type="auto" priority="P1" id="TVInfoManager_removeCaptionValueChangeListener">
<description>
- <pre_condition>TV is running normally</pre_condition>
- <steps>
- <step order="1">
- <step_desc>After press Run button, change the caption state (ON to OFF or OFF to ON) using the command 'vconftool set -t int db/menu/caption/caption "1" -f' to
-enable captions or the command 'vconftool set -t int db/menu/caption/caption "0" -f' to disable captions.</step_desc>
- <expected>PASS</expected>
- </step>
- </steps>
<test_script_entry>/opt/tct-tv-info-tizen-tests/tv-info/TVInfoManager_removeCaptionValueChangeListener.html</test_script_entry>
</description>
<specs>
<test_script_entry>/opt/tct-tv-info-tizen-tests/tv-info/CaptionMenuChangeCallback_notexist.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="Check CaptionMenuChangeCallback onchange method" onload_delay="90" component="TizenAPI/TBD/TVInfo" execution_type="manual" priority="P1" id="CaptionMenuChangeCallback_onchange">
- <description>
- <pre_condition>TV is running normally</pre_condition>
- <steps>
- <step order="1">
- <step_desc>After press Run button, change the caption state (ON to OFF or OFF to ON) using the command 'vconftool set -t int db/menu/caption/caption "1" -f' to
-enable captions or the command 'vconftool set -t int db/menu/caption/caption "0" -f' to disable captions.</step_desc>
- <expected>PASS</expected>
- </step>
- </steps>
+ <testcase purpose="Check CaptionMenuChangeCallback onchange method" onload_delay="90" component="TizenAPI/TBD/TVInfo" execution_type="auto" priority="P1" id="CaptionMenuChangeCallback_onchange">
+ <description>
<test_script_entry>/opt/tct-tv-info-tizen-tests/tv-info/CaptionMenuChangeCallback_onchange.html</test_script_entry>
</description>
</testcase>
<test_script_entry>/opt/tct-tv-info-tizen-tests/tv-info/TVInfoManagerObject_notexist.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="Check if addCaptionValueChangeListener works properly" onload_delay="90" component="TizenAPI/TBD/TVInfo" execution_type="manual" priority="P1" id="TVInfoManager_addCaptionValueChangeListener">
+ <testcase purpose="Check if addCaptionValueChangeListener works properly" onload_delay="90" component="TizenAPI/TBD/TVInfo" execution_type="auto" priority="P1" id="TVInfoManager_addCaptionValueChangeListener">
<description>
- <pre_condition>TV is running normally</pre_condition>
- <steps>
- <step order="1">
- <step_desc>After press Run button, change the caption state (ON to OFF or OFF to ON) using the command 'vconftool set -t int db/menu/caption/caption "1" -f' to
-enable captions or the command 'vconftool set -t int db/menu/caption/caption "0" -f' to disable captions.</step_desc>
- <expected>PASS</expected>
- </step>
- </steps>
<test_script_entry>/opt/tct-tv-info-tizen-tests/tv-info/TVInfoManager_addCaptionValueChangeListener.html</test_script_entry>
</description>
</testcase>
<test_script_entry>/opt/tct-tv-info-tizen-tests/tv-info/TVInfoManager_notexist.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="Check if removeCaptionValueChangeListener works properly" onload_delay="90" component="TizenAPI/TBD/TVInfo" execution_type="manual" priority="P1" id="TVInfoManager_removeCaptionValueChangeListener">
+ <testcase purpose="Check if removeCaptionValueChangeListener works properly" onload_delay="90" component="TizenAPI/TBD/TVInfo" execution_type="auto" priority="P1" id="TVInfoManager_removeCaptionValueChangeListener">
<description>
- <pre_condition>TV is running normally</pre_condition>
- <steps>
- <step order="1">
- <step_desc>After press Run button, change the caption state (ON to OFF or OFF to ON) using the command 'vconftool set -t int db/menu/caption/caption "1" -f' to
-enable captions or the command 'vconftool set -t int db/menu/caption/caption "0" -f' to disable captions.</step_desc>
- <expected>PASS</expected>
- </step>
- </steps>
<test_script_entry>/opt/tct-tv-info-tizen-tests/tv-info/TVInfoManager_removeCaptionValueChangeListener.html</test_script_entry>
</description>
</testcase>
<title>CaptionMenuChangeCallback_onchange</title>
<meta charset="utf-8"/>
<script src="support/unitcommon.js"></script>
+<script src="support/tv-info_common.js"></script>
</head>
<body>
<div id="log"></div>
var t = async_test(document.title, {timeout: 90000}), watcherId, callback, oldValue;
t.step(function () {
- callback = t.step_func(function (key, value){
+ callback = t.step_func(function (key, value) {
assert_equals(key, "CAPTION_ONOFF_KEY", "Incorrect watched key");
- if (oldValue == "CAPTION_ON"){
+ if (oldValue == "CAPTION_ON") {
assert_equals(value, "CAPTION_OFF", "Incorrect value of watched key");
} else {
assert_equals(value, "CAPTION_ON", "Incorrect value of watched key");
oldValue = tizen.tvinfo.getCaptionValue("CAPTION_ONOFF_KEY");
watcherId = tizen.tvinfo.addCaptionValueChangeListener("CAPTION_ONOFF_KEY", callback);
+ if (oldValue == "CAPTION_ON") {
+ executeCommand(DISABLE_CAPTION);
+ } else {
+ executeCommand(ENABLE_CAPTION);
+ }
});
</script>
<title>TVInfoManager_addCaptionValueChangeListener</title>
<meta charset="utf-8"/>
<script src="support/unitcommon.js"></script>
+<script src="support/tv-info_common.js"></script>
</head>
<body>
<div id="log"></div>
var t = async_test(document.title, {timeout: 90000}), oldValue, watcherId, callback;
t.step(function () {
- callback = t.step_func(function (key, value){
+ callback = t.step_func(function (key, value) {
assert_not_equals(watcherId, null, "id should be not null");
assert_type(watcherId, "long", "watcherId should be type of number");
assert_equals(key, "CAPTION_ONOFF_KEY", "Incorrect watched key");
- if (oldValue == "CAPTION_ON"){
+ if (oldValue == "CAPTION_ON") {
assert_equals(value, "CAPTION_OFF", "Incorrect value of watched key");
} else {
assert_equals(value, "CAPTION_ON", "Incorrect value of watched key");
oldValue = tizen.tvinfo.getCaptionValue("CAPTION_ONOFF_KEY");
watcherId = tizen.tvinfo.addCaptionValueChangeListener("CAPTION_ONOFF_KEY", callback);
+ if (oldValue == "CAPTION_ON") {
+ executeCommand(DISABLE_CAPTION);
+ } else {
+ executeCommand(ENABLE_CAPTION);
+ }
});
</script>
<title>TVInfoManager_removeCaptionValueChangeListener</title>
<meta charset="utf-8"/>
<script src="support/unitcommon.js"></script>
+<script src="support/tv-info_common.js"></script>
</head>
<body>
<div id="log"></div>
setup({timeout: 90000});
-var t = async_test(document.title, {timeout: 90000}), watcherId, callback, retValue = null;
+var t = async_test(document.title, {timeout: 90000}), oldValue, watcherId, callback, retValue = null;
t.step(function () {
- callback = t.step_func(function (key, value){
+ callback = t.step_func(function (key, value) {
retValue = tizen.tvinfo.removeCaptionValueChangeListener(watcherId);
assert_equals(retValue, undefined, "removeCaptionValueChangeListener returns wrong value");
t.done();
});
watcherId = tizen.tvinfo.addCaptionValueChangeListener("CAPTION_ONOFF_KEY", callback);
+ oldValue = tizen.tvinfo.getCaptionValue("CAPTION_ONOFF_KEY");
+ if (oldValue == "CAPTION_ON") {
+ executeCommand(DISABLE_CAPTION);
+ } else {
+ executeCommand(ENABLE_CAPTION);
+ }
});
</script>
var EDGE_TYPE_VALUE = ["CAPTION_EDGE_NONE", "CAPTION_EDGE_RAISED", "CAPTION_EDGE_DEPRESSED", "CAPTION_EDGE_UNIFORM",
"CAPTION_EDGE_DROP_SHADOWED"];
var CAPTION_STYLE_VALUE = ["CAPTION_STYLE_DEFAULT", "CAPTION_STYLE_BOLD", "CAPTION_STYLE_ITALIC"];
+
+DISABLE_CAPTION = 'vconftool set -t int db/menu/caption/caption "0" -f';
+ENABLE_CAPTION = 'vconftool set -t int db/menu/caption/caption "1" -f';
+
+function executeCommand(command) {
+ var toSend = {'cmd' : command};
+ var response = $.ajax({
+ type: "POST",
+ url: 'http://127.0.0.1:8000/execute_command',
+ async: false,
+ dataType: 'json',
+ data: toSend
+ });
+ //This log provides console output after executing shell command.
+ console.log(JSON.stringify(response));
+}
+
+document.write('<script src="../webrunner/jquery-1.10.2.min.js"></script>');