Authors:
- Jakub Siewierski <j.siewierski@samsung.com>
+ Jakub Siewierski <j.siewierski@samsung.com>
-->
-<html lang="en">
+<html>
<head>
<title>PowerManagerObject_notexist</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
//==== LABEL Check if interface PowerManagerObject exists, it should not.
//==== PRIORITY P3
//==== SPEC Tizen Web API:System:Power:PowerManagerObject:PowerManagerObject U
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA NIO
test(function () {
check_no_interface_object("PowerManagerObject");
-}, "PowerManagerObject_notexist");
+}, document.title);
</script>
</body>
Authors:
- Marcin Kaminski <marcin.ka@samsung.com>
+ Marcin Kaminski <marcin.ka@samsung.com>
-->
<html>
<head>
<title>PowerManager_extend</title>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/unitcommon.js"></script>
</head>
<body>
//==== LABEL Check if tizen.power can have new properties added, it should not.
//==== PRIORITY P3
//==== SPEC Tizen Web API:System:Power:PowerManager:PowerManager U
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA OBX
test(function () {
check_extensibility(tizen.power);
-}, "PowerManager_extend");
+}, document.title);
</script>
</body>
<html>
<head>
<title>PowerManager_getScreenBrightness</title>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/unitcommon.js"></script>
</head>
<body>
//==== TEST: PowerManager_getScreenBrightness
//==== LABEL Check if getScreenBrightness method called with non-optional arguments does what it should
//==== SPEC Tizen Web API:System:Power:PowerManager:getScreenBrightness M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA MNA MR
test(function () {
var retVal = tizen.power.getScreenBrightness();
- assert_type(retVal, "number");
+ assert_type(retVal, "number", "Method getScreenBrightness returns wrong type");
assert_true(retVal <= 1 && retVal >= 0, "brigthness should be in range from 0 to 1, but was: " + retVal);
-}, "PowerManager_getScreenBrightness");
+}, document.title);
+
</script>
</body>
</html>
Authors:
- Krzysztof Lachacz <k.lachacz@samsung.com>
+ Krzysztof Lachacz <k.lachacz@samsung.com>
-->
-<html lang="en">
+<html>
<head>
<title>PowerManager_getScreenBrightness_check_change</title>
<meta charset="utf-8">
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
<script type="text/javascript" src="support/power_common.js"></script>
</head>
<script type="text/javascript">
//==== TEST: PowerManager_getScreenBrightness_check_change
-//==== LABEL check whether getScreenBrightness() method gets the screen brightness level correctly
+//==== LABEL Check whether getScreenBrightness() method gets the screen brightness level correctly
//==== SPEC Tizen Web API:System:Power:PowerManager:getScreenBrightness M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== PRIORITY P1
//==== TEST_CRITERIA MNA
var initialValue, defaultValue, currentValue;
currentValue = tizen.power.getScreenBrightness();
assert_not_equals(currentValue, defaultValue, "screen brightness was not changed");
-}, "PowerManager_getScreenBrightness_check_change");
+}, document.title);
</script>
-
</body>
-
</html>
-
<html>
<head>
<title>PowerManager_getScreenBrightness_exist</title>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/unitcommon.js"></script>
</head>
<body>
//==== TEST: PowerManager_getScreenBrightness_exist
//==== LABEL Check if getScreenBrightness method exists and can be overriden
//==== SPEC Tizen Web API:System:Power:PowerManager:getScreenBrightness M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA ME
test(function () {
assert_true("getScreenBrightness" in tizen.power, "getScreenBrightness method sould be implemented");
check_method_exists(tizen.power, "getScreenBrightness");
-}, "PowerManager_getScreenBrightness_exist");
+}, document.title);
+
</script>
</body>
</html>
<html>
<head>
<title>PowerManager_getScreenBrightness_extra_argument</title>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/unitcommon.js"></script>
</head>
<body>
//==== SPEC Tizen Web API:System:Power:PowerManager:getScreenBrightness M
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA MNAEX
-test(function() {
+test(function () {
checkExtraArgument(tizen.power, "getScreenBrightness");
-}, "PowerManager_getScreenBrightness_extra_argument");
+}, document.title);
+
</script>
</body>
</html>
Authors:
- Piotr Szydelko <p.szydelko@samsung.com>
+ Piotr Szydelko <p.szydelko@samsung.com>
-->
-<html lang="en">
+<html>
<head>
<title>PowerManager_in_tizen</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
//==== LABEL Check if Tizen implements interface PowerManagerObject and has attribute power
//==== PRIORITY P3
//==== SPEC Tizen Web API:System:Power:PowerManager:PowerManager U
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA OBME
test(function () {
assert_own_property(tizen, "power", "Tizen should implement PowerManagerObject");
assert_equals(typeof(tizen.power), "object", "tizen.power should be object");
-}, "PowerManager_in_tizen");
+}, document.title);
</script>
</body>
<html>
<head>
<title>PowerManager_isScreenOn</title>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/unitcommon.js"></script>
</head>
<body>
//==== TEST: PowerManager_isScreenOn
//==== LABEL Check if isScreenOn method called with non-optional arguments does what it should
//==== SPEC Tizen Web API:System:Power:PowerManager:isScreenOn M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA MNA MR
-test(function() {
+test(function () {
var retVal = tizen.power.isScreenOn();
- assert_type(retVal, "boolean");
-}, "PowerManager_isScreenOn");
+ assert_type(retVal, "boolean", "Method isScreenOn returns wrong type");
+}, document.title);
+
</script>
</body>
</html>
Authors:
- Krzysztof Lachacz <k.lachacz@samsung.com>
+ Krzysztof Lachacz <k.lachacz@samsung.com>
-->
-<html lang="en">
+<html>
<head>
<title>PowerManager_isScreenOn_check_change</title>
<meta charset="utf-8">
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
<script type="text/javascript" src="support/power_common.js"></script>
</head>
<script type="text/javascript">
//==== TEST: PowerManager_isScreenOn_check_change
-//==== LABEL check whether isScreenOn() method gets the screen state correctly
+//==== LABEL Check whether isScreenOn() method gets the screen state correctly
//==== SPEC Tizen Web API:System:Power:PowerManager:isScreenOn M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== PRIORITY P1
//==== TEST_CRITERIA MNA MR
test(function () {
isScreenOn = tizen.power.isScreenOn();
assert_type(isScreenOn, "boolean", "isScreenOn() return type check");
assert_false(isScreenOn, "Check if screen is off");
-}, "PowerManager_isScreenOn_check_change");
+}, document.title);
</script>
-
</body>
-
</html>
-
<html>
<head>
<title>PowerManager_isScreenOn_exist</title>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/unitcommon.js"></script>
</head>
<body>
//==== TEST: PowerManager_isScreenOn_exist
//==== LABEL Check if isScreenOn method exists and can be overriden
//==== SPEC Tizen Web API:System:Power:PowerManager:isScreenOn M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA ME
test(function () {
assert_true("isScreenOn" in tizen.power, "isScreenOn method sould be implemented");
check_method_exists(tizen.power, "isScreenOn");
-}, "PowerManager_isScreenOn_exist");
+}, document.title);
+
</script>
</body>
</html>
<html>
<head>
<title>PowerManager_isScreenOn_extra_argument</title>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/unitcommon.js"></script>
</head>
<body>
//==== SPEC Tizen Web API:System:Power:PowerManager:isScreenOn M
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA MNAEX
-test(function() {
+test(function () {
checkExtraArgument(tizen.power, "isScreenOn");
-}, "PowerManager_isScreenOn_extra_argument");
+}, document.title);
+
</script>
</body>
</html>
Authors:
- Jakub Siewierski <j.siewierski@samsung.com>
+ Jakub Siewierski <j.siewierski@samsung.com>
-->
-<html lang="en">
+<html>
<head>
<title>PowerManager_notexist</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
//==== LABEL Check if interface PowerManager exists, it should not.
//==== PRIORITY P3
//==== SPEC Tizen Web API:System:Power:PowerManager:PowerManager U
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA NIO
test(function () {
check_no_interface_object("PowerManager");
-}, "PowerManager_notexist");
+}, document.title);
</script>
</body>
Marcin Kaminski <marcin.ka@samsung.com>
-->
-<html lang="en">
+<html>
<head>
-<title>Messaging/UTC_power</title>
+<title>PowerManager_release</title>
<meta charset="utf-8">
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
<script type="text/javascript" src="support/power_common.js"></script>
</head>
//==== TEST: PowerManager_release
//==== LABEL Check if release() method called with proper argument does not throw exceptions
//==== SPEC Tizen Web API:System:Power:PowerManager:release M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html#releaseid2576878
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA MMINA MR
var ret1Value = null, ret2Value = null;
assert_equals(ret1Value, undefined, "release returns wrong value");
assert_equals(ret2Value, undefined, "release returns wrong value");
- }, "PowerManager_release");
+ }, document.title);
+
</script>
</body>
</html>
-
<title>PowerManager_release_correct_check</title>
<meta name="flags" content="" />
<meta name="assert" content="Check if PowerManager's release method works" />
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
<div id="log"></div>
//==== EXPECT Pass
//==== PRE Please set backlight time to 15 seconds
//==== SPEC Tizen Web API:System:Power:PowerManager:release M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html#releaseid2576878
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA MMINA MAST
setup({timeout: 90000});
-var t = async_test("PowerManager_release_correct_check", {timeout:90000});
-
-function onScreenStateChanged(previousState, changedState) {
- t.step(function() {
+var t = async_test(document.title, {timeout: 90000});
+t.step(function () {
+ function onScreenStateChanged(previousState, changedState) {
assert_not_equals(previousState, changedState, "Screen state should be changed.");
- });
- t.done();
-}
+
+ t.done();
+ }
-try {
tizen.power.release("SCREEN");
tizen.power.release("CPU");
tizen.power.release("SCREEN");
setTimeout(function () {
t.step(function () {
- assert_unreached("tizen.power.release failure," +
+ assert_unreached("tizen.power.release failure, " +
"screen state change has not been detected!");
});
}, 20000);
-} catch (e) {
- t.step(function() {
- assert_unreached("tizen.power.setScreenStateChangeListener exception: " + e.message);
- });
-}
+});
</script>
</body>
</html>
<title>PowerManager_release_exist</title>
<meta name="flags" content="" />
<meta name="assert" content="Check if release method exists" />
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
<div id="log"></div>
//==== TEST: PowerManager_release_exist
//==== LABEL Check if method release of PowerManager exists and can be overriden
//==== SPEC Tizen Web API:System:Power:PowerManager:release M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA ME
-test(function() {
+test(function () {
assert_true("request" in tizen.power, "No release method in tizen.power.");
check_method_exists(tizen.power, "request");
-}, "PowerManager_release_exist");
+}, document.title);
</script>
</body>
Marcin Kaminski <marcin.ka@samsung.com>
-->
-<html lang="en">
+<html>
<head>
<title>PowerManager_release_missarg</title>
<meta charset="utf-8">
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
<script type="text/javascript" src="support/power_common.js"></script>
</head>
//==== TEST: PowerManager_release_missarg
//==== LABEL Check if release() method called without all obligatory arguments throws an exception
//==== SPEC Tizen Web API:System:Power:PowerManager:release M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html#requestid2576680
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA MMA
test(function () {
- assert_throws({
- name: TYPE_MISMATCH_ERR
- }, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
tizen.power.release();
});
-}, "PowerManager_release_missarg");
+}, document.title);
</script>
-
</body>
-
</html>
-
<title>PowerManager_release_resource_TypeMismatch</title>
<meta name="flags" content="" />
<meta name="assert" content="Check if tizen.power.release throws TYPE_MISMATCH_ERR" />
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
<div id="log"></div>
//==== LABEL Check if release() method throws TypeMismatchException when incorrect resource given
//==== PRIORITY: P2
//==== SPEC Tizen Web API:System:Power:PowerManager:release M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html#requestid2576680
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA MC
-test(function() {
- assert_throws("TYPE_MISMATCH_ERR", function() {
+test(function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
tizen.power.release(true);
});
- assert_throws("TYPE_MISMATCH_ERR", function() {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
tizen.power.release(1);
});
- assert_throws("TYPE_MISMATCH_ERR", function() {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
tizen.power.release(null);
});
- assert_throws("TYPE_MISMATCH_ERR", function() {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
tizen.power.release(undefined);
});
-}, "PowerManager_release_resource_TypeMismatch");
+}, document.title);
+
</script>
</body>
</html>
<head>
<title>PowerManager_request</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
<div id="log"></div>
//==== SPEC Tizen Web API:System:Power:PowerManager:request M
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA MMINA MAST MR
-setup({timeout:90000});
-var t = async_test("PowerManager_request", {timeout:90000}), timeout, retValue = null;
+setup({timeout: 90000});
+var t = async_test(document.title, {timeout: 90000}), timeout, retValue = null;
-t.step(function() {
+t.step(function () {
tizen.power.release("SCREEN");
tizen.power.release("CPU");
-->
-<html lang="en">
+<html>
<head>
-<title>PowerManager_request_PowerManager_request_CPU_AWAKE</title>
+<title>PowerManager_request_CPU_AWAKE</title>
<meta charset="utf-8">
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
//==== TEST: PowerManager_request_CPU_AWAKE
//==== LABEL Check whether request() method with CPU resource and CPU_AWAKE state does not throw exception
//==== SPEC Tizen Web API:System:Power:PowerManager:request M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html#requestid2576680
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA MMINA
test(function () {
tizen.power.request("CPU", "CPU_AWAKE");
tizen.power.release("CPU");
- }, "PowerManager_request_CPU_AWAKE");
+ }, document.title);
+
</script>
</body>
</html>
-
-->
-<html lang="en">
+<html>
<head>
<title>PowerManager_request_SCREEN_DIM</title>
<meta charset="utf-8">
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
//==== TEST: PowerManager_request_SCREEN_DIM
//==== LABEL Check whether request() method with SCREEN resource and SCREEN_DIM state does not throw exception
//==== SPEC Tizen Web API:System:Power:PowerManager:request M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html#requestid2576680
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA MMINA
test(function () {
tizen.power.request("SCREEN", "SCREEN_DIM" );
tizen.power.release("SCREEN");
- }, "PowerManager_request_SCREEN_DIM");
+ }, document.title);
+
</script>
</body>
</html>
-
-->
-<html lang="en">
+<html>
<head>
<title>PowerManager_request_SCREEN_NORMAL</title>
<meta charset="utf-8">
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
//==== TEST: PowerManager_request_SCREEN_NORMAL
//==== LABEL Check whether request() method with SCREEN resource and SCREEN_NORMAL state does not throw exception
//==== SPEC Tizen Web API:System:Power:PowerManager:request M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html#requestid2576680
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA MMINA
test(function () {
tizen.power.request("SCREEN", "SCREEN_NORMAL");
tizen.power.release("SCREEN");
- }, "PowerManager_request_SCREEN_NORMAL");
+ }, document.title);
+
</script>
</body>
</html>
-
Authors:
- Marcin Kaminski <marcin.ka@samsung.com>
+ Marcin Kaminski <marcin.ka@samsung.com>
-->
<link rel="help" href="https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html" />
<meta name="flags" content="" />
<meta name="assert" content="Check if request method exists" />
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
<div id="log"></div>
//==== TEST: PowerManager_request_exist
//==== LABEL Check if method request of PowerManager exists and can be overriden
//==== SPEC Tizen Web API:System:Power:PowerManager:request M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA ME
-test(function() {
+test(function () {
assert_true("request" in tizen.power, "No request method in tizen.power.");
check_method_exists(tizen.power, "request");
-}, "PowerManager_request_exist");
+}, document.title);
</script>
</body>
Marcin Kaminski <marcin.ka@samsung.com>
-->
-<html lang="en">
+<html>
<head>
<title>PowerManager_request_missarg</title>
<meta charset="utf-8">
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
<script type="text/javascript" src="support/power_common.js"></script>
</head>
//==== TEST: PowerManager_request_missarg
//==== LABEL Check if request() method called without all obligatory arguments throws an exception
//==== SPEC Tizen Web API:System:Power:PowerManager:request M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html#requestid2576680
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA MMA
test(function () {
- assert_throws({
- name: TYPE_MISMATCH_ERR
- }, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
tizen.power.request();
});
- assert_throws({
- name: TYPE_MISMATCH_ERR
- }, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
tizen.power.request("SCREEN");
});
- assert_throws({
- name: TYPE_MISMATCH_ERR
- }, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
tizen.power.request("CPU");
});
-}, "PowerManager_request_missarg");
+}, document.title);
</script>
-
</body>
-
</html>
-
<title>PowerManager_request_resource_TypeMismatch</title>
<meta name="flags" content="" />
<meta name="assert" content="Check if request throws TYPE_MISMATCH_ERR" />
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
<script type="text/javascript" src="support/power_common.js"></script>
</head>
<body>
//==== LABEL Check if request() method throws TypeMismatchException when incorrect resource given
//==== PRIORITY: P2
//==== SPEC Tizen Web API:System:Power:PowerManager:request M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html#requestid2576680
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA MC
var i;
-test(function() {
- assert_throws("TYPE_MISMATCH_ERR",function() {
+test(function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
tizen.power.request(true, "SCREEN_NORMAL");
});
for (i = 0; i< PowerScreenStates.length; i++) {
- assert_throws({
- name: TYPE_MISMATCH_ERR
- }, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
tizen.power.request(1, PowerScreenStates[i]);
});
}
- assert_throws({
- name: TYPE_MISMATCH_ERR
- }, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
tizen.power.request(1, "CPU_AWAKE");
});
for (i = 0; i< PowerScreenStates.length; i++) {
- assert_throws({
- name: TYPE_MISMATCH_ERR
- }, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
tizen.power.request(null, PowerScreenStates[i]);
});
}
- assert_throws({
- name: TYPE_MISMATCH_ERR
- }, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
tizen.power.request(null, "CPU_AWAKE");
});
for (i = 0; i< PowerScreenStates.length; i++) {
- assert_throws({
- name: TYPE_MISMATCH_ERR
- }, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
tizen.power.request(undefined, PowerScreenStates[i]);
});
}
- assert_throws({
- name: TYPE_MISMATCH_ERR
- }, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
tizen.power.request(undefined, "CPU_AWAKE");
});
-}, "PowerManager_request_resource_TypeMismatch");
+}, document.title);
+
</script>
</body>
</html>
<title>PowerManager_request_state_TypeMismatch</title>
<meta name="flags" content="" />
<meta name="assert" content="Check if request throws TYPE_MISMATCH_ERR" />
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
<script type="text/javascript" src="support/power_common.js"></script>
</head>
<body>
//==== LABEL Check if request() method throws TypeMismatchException when incorrect state given
//==== PRIORITY: P2
//==== SPEC Tizen Web API:System:Power:PowerManager:request M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html#requestid2576680
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA MC
-test(function() {
- assert_throws("TYPE_MISMATCH_ERR",function() {
+test(function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
tizen.power.request(true, "SCREEN_NORMAL");
});
- assert_throws({
- name: TYPE_MISMATCH_ERR
- }, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
tizen.power.request("SCREEN", 1);
});
- assert_throws({
- name: TYPE_MISMATCH_ERR
- }, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
tizen.power.request("CPU", 1);
});
- assert_throws({
- name: TYPE_MISMATCH_ERR
- }, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
tizen.power.request("SCREEN", null);
});
- assert_throws({
- name: TYPE_MISMATCH_ERR
- }, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
tizen.power.request("CPU", null);
});
- assert_throws({
- name: TYPE_MISMATCH_ERR
- }, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
tizen.power.request("SCREEN", undefined);
});
- assert_throws({
- name: TYPE_MISMATCH_ERR
- }, function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
tizen.power.request("CPU", undefined);
});
-}, "PowerManager_request_state_TypeMismatch");
+}, document.title);
+
</script>
</body>
</html>
<html>
<head>
<title>PowerManager_restoreScreenBrightness</title>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/unitcommon.js"></script>
</head>
<body>
//==== TEST: PowerManager_restoreScreenBrightness
//==== LABEL Check if restoreScreenBrightness method called with non-optional arguments does what it should
//==== SPEC Tizen Web API:System:Power:PowerManager:restoreScreenBrightness M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA MNA MR
-test(function() {
+test(function () {
var retVal = tizen.power.restoreScreenBrightness();
assert_equals(retVal, undefined, "method should return nothing");
-}, "PowerManager_restoreScreenBrightness");
+}, document.title);
+
</script>
</body>
</html>
Authors:
- Krzysztof Lachacz <k.lachacz@samsung.com>
+ Krzysztof Lachacz <k.lachacz@samsung.com>
-->
-<html lang="en">
+<html>
<head>
<title>PowerManager_restoreScreenBrightness_check_effect</title>
<meta charset="utf-8">
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
<script type="text/javascript" src="support/power_common.js"></script>
</head>
<script type="text/javascript">
//==== TEST: PowerManager_restoreScreenBrightness_check_effect
-//==== LABEL check if restoreScreenBrightness() method restores the screen brightness to the system default setting value
+//==== LABEL Check if restoreScreenBrightness() method restores the screen brightness to the system default setting value
//==== SPEC Tizen Web API:System:Power:PowerManager:restoreScreenBrightness M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== STEP Check if restoreScreenBrightness method called with non-optional arguments does what it should
//==== EXPECT method does what it should to do
//==== EXECUTION_TYPE manual
tizen.power.restoreScreenBrightness();
restoredValue = tizen.power.getScreenBrightness();
- assert_not_equals(restoredValue, defaultValue, "screen brightness was not restored");
-}, "PowerManager_restoreScreenBrightness_check_effect");
+ assert_equals(restoredValue, defaultValue, "screen brightness was not restored");
+}, document.title);
+
</script>
</body>
</html>
<html>
<head>
<title>PowerManager_restoreScreenBrightness_exist</title>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/unitcommon.js"></script>
</head>
<body>
//==== TEST: PowerManager_restoreScreenBrightness_exist
//==== LABEL Check if restoreScreenBrightness method exists and can be overriden
//==== SPEC Tizen Web API:System:Power:PowerManager:restoreScreenBrightness M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA ME
test(function () {
assert_true("restoreScreenBrightness" in tizen.power, "restoreScreenBrightness method sould be implemented");
check_method_exists(tizen.power, "restoreScreenBrightness");
-}, "PowerManager_restoreScreenBrightness_exist");
+}, document.title);
+
</script>
</body>
</html>
<html>
<head>
<title>PowerManager_restoreScreenBrightness_extra_argument</title>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/unitcommon.js"></script>
</head>
<body>
//==== SPEC Tizen Web API:System:Power:PowerManager:restoreScreenBrightness M
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA MNAEX
-test(function() {
+test(function () {
checkExtraArgument(tizen.power, "restoreScreenBrightness");
-}, "PowerManager_restoreScreenBrightness_extra_argument");
+}, document.title);
+
</script>
</body>
</html>
<html>
<head>
<title>PowerManager_setScreenBrightness</title>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/unitcommon.js"></script>
</head>
<body>
//==== TEST: PowerManager_setScreenBrightness
//==== LABEL Check if setScreenBrightness method called with non-optional arguments does what it should
//==== SPEC Tizen Web API:System:Power:PowerManager:setScreenBrightness M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA MMINA MAST MR
var initialValue, defaultValue, currentValue, returnedValue;
currentValue = tizen.power.getScreenBrightness();
assert_equals(currentValue, defaultValue, "screen brightness was not changed");
-}, "PowerManager_setScreenBrightness");
+}, document.title);
+
</script>
</body>
</html>
<html>
<head>
<title>PowerManager_setScreenBrightness_brightness_TypeMismatch</title>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/unitcommon.js"></script>
</head>
<body>
//==== LABEL Check if setScreenBrightness throws exception when brightness is incorrect
//==== PRIORITY: P2
//==== SPEC Tizen Web API:System:Power:PowerManager:setScreenBrightness M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA MC
test(function () {
var conversionTable, brightness, exceptionName, i;
tizen.power.setScreenBrightness(brightness);
}, exceptionName + " should be thrown.");
}
-}, "PowerManager_setScreenBrightness_brightness_TypeMismatch");
+}, document.title);
+
</script>
</body>
</html>
Authors:
- Krzysztof Lachacz <k.lachacz@samsung.com>
+ Krzysztof Lachacz <k.lachacz@samsung.com>
-->
-<html lang="en">
+<html>
<head>
-<title>Messaging/UTC_power</title>
+<title>PowerManager_setScreenBrightness_brightness_invalid_val</title>
<meta charset="utf-8">
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
<script type="text/javascript" src="support/power_common.js"></script>
</head>
<script type="text/javascript">
//==== TEST: PowerManager_setScreenBrightness_brightness_invalid_val
-//==== LABEL check if setScreenBrightness() method doesn't set out of range screen brightness
+//==== LABEL Check if setScreenBrightness() method doesn't set out of range screen brightness
//==== SPEC Tizen Web API:System:Power:PowerManager:setScreenBrightness M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api/tizen/application.html
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== PRIORITY P2
//==== TEST_CRITERIA
test(function () {
}, "exception should be thrown");
assert_not_equals(tizen.power.getScreenBrightness(), -1, "check if screen brightness was set out of range");
-}, "PowerManager_setScreenBrightness_brightness_invalid_val");
+}, document.title);
</script>
</body>
<html>
<head>
<title>PowerManager_setScreenBrightness_exist</title>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/unitcommon.js"></script>
</head>
<body>
//==== TEST: PowerManager_setScreenBrightness_exist
//==== LABEL Check if setScreenBrightness method exists and can be overriden
//==== SPEC Tizen Web API:System:Power:PowerManager:setScreenBrightness M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA ME
test(function () {
assert_true("setScreenBrightness" in tizen.power, "setScreenBrightness method sould be implemented");
check_method_exists(tizen.power, "setScreenBrightness");
-}, "PowerManager_setScreenBrightness_exist");
+}, document.title);
+
</script>
</body>
</html>
<html>
<head>
<title>PowerManager_setScreenBrightness_missarg</title>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/unitcommon.js"></script>
</head>
<body>
//==== TEST: PowerManager_setScreenBrightness_missarg
//==== LABEL Check if setScreenBrightness method called with missing non-optional argument throws an exception
//==== SPEC Tizen Web API:System:Power:PowerManager:setScreenBrightness M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA MMA
-test(function() {
- assert_throws({ name: "TypeMismatchError" }, function () {
+test(function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
tizen.power.setScreenBrightness();
}, "Method should throw an exception");
-}, "PowerManager_setScreenBrightness_missarg");
+}, document.title);
+
</script>
</body>
</html>
<html>
<head>
<title>PowerManager_setScreenStateChangeListener</title>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/unitcommon.js"></script>
</head>
<body>
//==== LABEL Check if setScreenStateChangeListener method called with non-optional arguments does what it should
//==== ONLOAD_DELAY 90
//==== SPEC Tizen Web API:System:Power:PowerManager:setScreenStateChangeListener M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA MMINA MAST MR
setup({timeout: 90000});
-var t = async_test("PowerManager_setScreenStateChangeListener", {timeout: 90000}), changeCallback, retValue = null;
+var t = async_test(document.title, {timeout: 90000}), changeCallback, retValue = null;
-t.step(function() {
+t.step(function () {
changeCallback = t.step_func(function (previousState, changedState) {
assert_not_equals(previousState, changedState, "Screen States should be different.");
assert_equals(retValue, undefined, "setScreenStateChangeListener returns wrong value");
tizen.power.turnScreenOn();
}
});
+
</script>
</body>
</html>
<html>
<head>
<title>PowerManager_setScreenStateChangeListener_exist</title>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/unitcommon.js"></script>
</head>
<body>
//==== TEST: PowerManager_setScreenStateChangeListener_exist
//==== LABEL Check if setScreenStateChangeListener method exists and can be overriden
//==== SPEC Tizen Web API:System:Power:PowerManager:setScreenStateChangeListener M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA ME
test(function () {
assert_true("setScreenStateChangeListener" in tizen.power, "setScreenStateChangeListener method sould be implemented");
check_method_exists(tizen.power, "setScreenStateChangeListener");
-}, "PowerManager_setScreenStateChangeListener_exist");
+}, document.title);
+
</script>
</body>
</html>
<html>
<head>
<title>PowerManager_setScreenStateChangeListener_listener_TypeMismatch</title>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/unitcommon.js"></script>
</head>
<body>
//==== LABEL Check if setScreenStateChangeListener throws exception when listener is incorrect
//==== PRIORITY: P2
//==== SPEC Tizen Web API:System:Power:PowerManager:setScreenStateChangeListener M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA MC
test(function () {
var conversionTable, changeCallback, exceptionName, i;
tizen.power.setScreenStateChangeListener(changeCallback);
}, exceptionName + " should be thrown.");
}
-}, "PowerManager_setScreenStateChangeListener_listener_TypeMismatch");
+}, document.title);
+
</script>
</body>
</html>
<html>
<head>
<title>PowerManager_setScreenStateChangeListener_listener_invalid_cb</title>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/unitcommon.js"></script>
</head>
<body>
//==== PRIORITY: P2
//==== ONLOAD_DELAY 90
//==== SPEC Tizen Web API:System:Power:PowerManager:setScreenStateChangeListener M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA MTCB
setup({timeout: 90000});
-var t = async_test("PowerManager_setScreenStateChangeListener_listener_invalid_cb", {timeout: 90000}),
+var t = async_test(document.title, {timeout: 90000}),
exceptionName = "TypeMismatchError", incorrectCallback;
t.step(function () {
})
};
- assert_throws({name : exceptionName},
+ assert_throws({name: exceptionName},
function () {
tizen.power.setScreenStateChangeListener(incorrectCallback);
}, exceptionName + " should be thrown - given incorrect success callback.");
t.done();
});
+
</script>
</body>
</html>
<html>
<head>
<title>PowerManager_setScreenStateChangeListener_missarg</title>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/unitcommon.js"></script>
</head>
<body>
//==== TEST: PowerManager_setScreenStateChangeListener_missarg
//==== LABEL Check if setScreenStateChangeListener method called with missing non-optional argument throws an exception
//==== SPEC Tizen Web API:System:Power:PowerManager:setScreenStateChangeListener M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA MMA
-test(function() {
- assert_throws({ name: "TypeMismatchError" }, function () {
+test(function () {
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
tizen.power.setScreenStateChangeListener();
}, "Method should throw an exception");
-}, "PowerManager_setScreenStateChangeListener_missarg");
+}, document.title);
+
</script>
</body>
</html>
<html>
<head>
<title>PowerManager_turnScreenOff</title>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/unitcommon.js"></script>
</head>
<body>
//==== TEST: PowerManager_turnScreenOff
//==== LABEL Check if turnScreenOff method called with non-optional arguments does what it should
//==== SPEC Tizen Web API:System:Power:PowerManager:turnScreenOff M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA MNA MR
-test(function() {
+test(function () {
var retVal = tizen.power.turnScreenOff();
assert_equals(retVal, undefined, "method should return nothing");
-}, "PowerManager_turnScreenOff");
+}, document.title);
+
</script>
</body>
</html>
<html>
<head>
<title>PowerManager_turnScreenOff_exist</title>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/unitcommon.js"></script>
</head>
<body>
//==== TEST: PowerManager_turnScreenOff_exist
//==== LABEL Check if turnScreenOff method exists and can be overriden
//==== SPEC Tizen Web API:System:Power:PowerManager:turnScreenOff M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA ME
test(function () {
assert_true("turnScreenOff" in tizen.power, "turnScreenOff method sould be implemented");
check_method_exists(tizen.power, "turnScreenOff");
-}, "PowerManager_turnScreenOff_exist");
+}, document.title);
+
</script>
</body>
</html>
<html>
<head>
<title>PowerManager_turnScreenOff_extra_argument</title>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/unitcommon.js"></script>
</head>
<body>
//==== SPEC Tizen Web API:System:Power:PowerManager:turnScreenOff M
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA MNAEX
-test(function() {
+test(function () {
checkExtraArgument(tizen.power, "turnScreenOff");
-}, "PowerManager_turnScreenOff_extra_argument");
+}, document.title);
+
</script>
</body>
</html>
<html>
<head>
-<title>Power Test: PowerManager_turnScreenOff_successful</title>
+<title>PowerManager_turnScreenOff_successful</title>
<link rel="author" title="Intel" href="http://www.intel.com" />
<link rel="help" href="https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html" />
<meta name="flags" content="" />
<div id="log"></div>
<script type="text/javascript">
//==== TEST: PowerManager_turnScreenOff_successful
-//==== LABEL check if turnScreenOff method works correctly
+//==== LABEL Check if turnScreenOff method works correctly
//==== EXECUTION_TYPE manual
//==== STEP Click 'Run'
//==== EXPECT The screen should be turned off
//==== TEST_CRITERIA MNA MNAST
var powerMgr = tizen.power, isScreenOn;
-test(function() {
+test(function () {
powerMgr.turnScreenOn();
powerMgr.turnScreenOff();
isScreenOn = powerMgr.isScreenOn();
assert_false(isScreenOn, "The screen should be turned off.");
-}, "PowerManager_turnScreenOff_successful");
+}, document.title);
+
</script>
</body>
</html>
<html>
<head>
<title>PowerManager_turnScreenOn</title>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/unitcommon.js"></script>
</head>
<body>
//==== TEST: PowerManager_turnScreenOn
//==== LABEL Check if turnScreenOn method called with non-optional arguments does what it should
//==== SPEC Tizen Web API:System:Power:PowerManager:turnScreenOn M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA MNA MR
-test(function() {
+test(function () {
var retVal = tizen.power.turnScreenOn();
assert_equals(retVal, undefined, "method should return nothing");
-}, "PowerManager_turnScreenOn");
+}, document.title);
+
</script>
</body>
</html>
<html>
<head>
<title>PowerManager_turnScreenOn_exist</title>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/unitcommon.js"></script>
</head>
<body>
//==== TEST: PowerManager_turnScreenOn_exist
//==== LABEL Check if turnScreenOn method exists and can be overriden
//==== SPEC Tizen Web API:System:Power:PowerManager:turnScreenOn M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA ME
test(function () {
assert_true("turnScreenOn" in tizen.power, "turnScreenOn method sould be implemented");
check_method_exists(tizen.power, "turnScreenOn");
-}, "PowerManager_turnScreenOn_exist");
+}, document.title);
+
</script>
</body>
</html>
<html>
<head>
<title>PowerManager_turnScreenOn_extra_argument</title>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/unitcommon.js"></script>
</head>
<body>
//==== SPEC Tizen Web API:System:Power:PowerManager:turnScreenOn M
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA MNAEX
-test(function() {
+test(function () {
checkExtraArgument(tizen.power, "turnScreenOn");
-}, "PowerManager_turnScreenOn_extra_argument");
+}, document.title);
+
</script>
</body>
</html>
<html>
<head>
-<title>Power Test: PowerManager_turnScreenOn_method_exists</title>
+<title>PowerManager_turnScreenOn_method_exists</title>
<link rel="author" title="Intel" href="http://www.intel.com" />
<link rel="help" href="https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html" />
<meta name="flags" content="" />
<div id="log"></div>
<script type="text/javascript">
//==== TEST: PowerManager_turnScreenOn_method_exists
-//==== LABEL check if turnScreenOn method exists
+//==== LABEL Check if turnScreenOn method exists
//==== SPEC Tizen Web API:System:Power:PowerManager:turnScreenOn M
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA ME
var powerMgr;
-test(function() {
+test(function () {
powerMgr = tizen.power;
assert_true("turnScreenOn" in powerMgr, "turnScreenOn method sould be implemented");
-}, "PowerManager_turnScreenOn_method_exists");
+}, document.title);
+
</script>
</body>
</html>
<html>
<head>
-<title>Power Test: PowerManager_turnScreenOn_successul</title>
+<title>PowerManager_turnScreenOn_successful</title>
<link rel="author" title="Intel" href="http://www.intel.com" />
<link rel="help" href="https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html" />
<meta name="flags" content="" />
<div id="log"></div>
<script type="text/javascript">
//==== TEST: PowerManager_turnScreenOn_successful
-//==== LABEL check if turnScreenOn method works correctly
+//==== LABEL Check if turnScreenOn method works correctly
//==== EXECUTION_TYPE manual
//==== STEP Click 'Run'
//==== EXPECT The screen should be turned locked
//==== TEST_CRITERIA MNA MNAST
setup({timeout: 90000});
-var t = async_test("PowerManager_turnScreenOn_successful", {timeout: 90000});
-
-try {
+var t = async_test(document.title, {timeout: 90000}), isScreenOn = tizen.power.isScreenOn();
+t.step(function () {
tizen.power.turnScreenOff();
tizen.power.turnScreenOn();
- setTimeout(t.step_func(function() {
- var isScreenOn = tizen.power.isScreenOn();
+ setTimeout(t.step_func(function () {
assert_true(isScreenOn, "The screen should be turned on");
t.done();
}), 500);
-} catch(e) {
- test(function() {
- assert_false(true, "tizen.power.turnScreenOn " +
- "Exception: " + e.message);
- });
-}
+});
</script>
</body>
</html>
<html>
<head>
<title>PowerManager_unsetScreenStateChangeListener</title>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/unitcommon.js"></script>
</head>
<body>
//==== TEST: PowerManager_unsetScreenStateChangeListener
//==== LABEL Check if unsetScreenStateChangeListener method called with non-optional arguments does what it should
//==== SPEC Tizen Web API:System:Power:PowerManager:unsetScreenStateChangeListener M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA MNA MR
test(function () {
var retVal = tizen.power.unsetScreenStateChangeListener();
assert_equals(retVal, undefined, "unsetScreenStateChangeListener should not return anything");
-}, "PowerManager_unsetScreenStateChangeListener");
+}, document.title);
+
</script>
</body>
</html>
<html>
<head>
<title>PowerManager_unsetScreenStateChangeListener_exist</title>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/unitcommon.js"></script>
</head>
<body>
//==== TEST: PowerManager_unsetScreenStateChangeListener_exist
//==== LABEL Check if unsetScreenStateChangeListener method exists and can be overriden
//==== SPEC Tizen Web API:System:Power:PowerManager:unsetScreenStateChangeListener M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA ME
test(function () {
assert_true("unsetScreenStateChangeListener" in tizen.power, "unsetScreenStateChangeListener method sould be implemented");
check_method_exists(tizen.power, "unsetScreenStateChangeListener");
-}, "PowerManager_unsetScreenStateChangeListener_exist");
+}, document.title);
+
</script>
</body>
</html>
<html>
<head>
<title>PowerManager_unsetScreenStateChangeListener_extra_argument</title>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/unitcommon.js"></script>
</head>
<body>
//==== SPEC Tizen Web API:System:Power:PowerManager:unsetScreenStateChangeListener M
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA MNAEX
-test(function() {
+test(function () {
checkExtraArgument(tizen.power, "unsetScreenStateChangeListener");
-}, "PowerManager_unsetScreenStateChangeListener_extra_argument");
+}, document.title);
+
</script>
</body>
</html>
<html>
<head>
-<title>Power Test: PowerManager_unsetScreenStateChangeListener_success</title>
+<title>PowerManager_unsetScreenStateChangeListener_successful</title>
<link rel="author" title="Intel" href="http://www.intel.com" />
<link rel="help" href="https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html" />
<meta name="flags" content="" />
<div id="log"></div>
<script type="text/javascript">
//==== TEST: PowerManager_unsetScreenStateChangeListener_successful
-//==== LABEL check if unsetScreenStateChangeListener method works correctly
+//==== LABEL Check if unsetScreenStateChangeListener method works correctly
//==== EXECUTION_TYPE manual
//==== STEP Make sure that backlight time is 15 seconds (Settings, Display).
//==== EXPECT (None)
//==== TEST_CRITERIA MNA MNAST
setup({timeout: 90000});
-var t = async_test("PowerManager_unsetScreenStateChangeListener_successful", { timeout:90000 });
-var changeDetected = false;
-
-function onScreenStateChanged(previousState, changedState) {
- t.step(function() {
- changeDetected = true;
- assert_unreached("OnScreenStateChanged callback shouldn't " +
- "be invoked!");
- });
-}
+var t = async_test(document.title, {timeout: 90000}), changeDetected = false;
+t.step(function () {
+ function onScreenStateChanged(previousState, changedState) {
+ t.step(function () {
+ changeDetected = true;
+ assert_unreached("OnScreenStateChanged callback shouldn't " +
+ "be invoked!");
+ });
+ }
-try {
tizen.power.release("SCREEN");
tizen.power.release("CPU");
tizen.power.setScreenStateChangeListener(onScreenStateChanged);
tizen.power.unsetScreenStateChangeListener();
tizen.power.turnScreenOn();
- setTimeout(function() {
- t.step(function() {
+ setTimeout(function () {
+ t.step(function () {
assert_false(changeDetected, "screen state change shouldn't be " +
"detected.");
});
t.done();
}, 20000);
-} catch(e) {
- test(function() {
- assert_false(true, "tizen.power.setScreenStateChangeListener " +
- "Exception: " + e.message);
- });
-}
+});
</script>
</body>
</html>
Authors:
- Jakub Siewierski <j.siewierski@samsung.com>
- Marcin Kaminski <marcin.ka@samsung.com>
+ Jakub Siewierski <j.siewierski@samsung.com>
+ Marcin Kaminski <marcin.ka@samsung.com>
-->
-<html lang="en">
+<html>
<head>
<title>ScreenStateChangeCallback_notexist</title>
<meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
</head>
<body>
//==== LABEL Check if interface ScreenStateChangeCallback exists, it should not.
//==== PRIORITY P3
//==== SPEC Tizen Web API:System:Power:ScreenStateChangeCallback:ScreenStateChangeCallback U
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA CBNIO
test(function () {
check_no_interface_object("ScreenStateChangeCallback");
-}, "ScreenStateChangeCallback_notexist");
+}, document.title);
</script>
</body>
<html>
<head>
<title>ScreenStateChangeCallback_onchanged</title>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/unitcommon.js"></script>
<script src="support/power_common.js"></script>
</head>
//==== LABEL Check if ContentScanSuccessCallback onchanged is called and if its arguments have proper type
//==== ONLOAD_DELAY 90
//==== SPEC Tizen Web API:System:Power:ScreenStateChangeCallback:onchanged M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html
//==== TEST_CRITERIA CBT CBOA
setup({timeout: 90000});
-var t = async_test("ScreenStateChangeCallback_onchanged", {timeout: 90000}), changeCallback;
+var t = async_test(document.title, {timeout: 90000}), changeCallback;
-t.step(function() {
+t.step(function () {
changeCallback = t.step_func(function (previousState, changedState) {
assert_type(previousState, "string", "previousState has wrong type");
assert_type(changedState, "string", "changedState has wrong type");
tizen.power.turnScreenOn();
}
});
+
</script>
</body>
</html>
--- /dev/null
+/*
+
+Copyright (c) 2013 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+
+Authors:
+
+ */
+
+
+MIN_BYTE = -128;
+MAX_BYTE = 127;
+MIN_OCTET = 0;
+MAX_OCTET = 255;
+MIN_SHORT = -32768;
+MAX_SHORT = 32767;
+MIN_UNSIGNED_SHORT = 0;
+MAX_UNSIGNED_SHORT = 65535;
+MIN_LONG = -2147483648;
+MAX_LONG = 2147483647;
+MIN_UNSIGNED_LONG = 0;
+MAX_UNSIGNED_LONG = 4294967295;
+MIN_LONG_LONG = -9223372036854775808;
+MAX_LONG_LONG = 9223372036854775807;
+MIN_UNSIGNED_LONG_LONG = 0;
+MAX_UNSIGNED_LONG_LONG = 18446744073709551615;
+
+TYPE_MISMATCH_EXCEPTION = {name: 'TypeMismatchError'};
+NOT_FOUND_EXCEPTION = {name: 'NotFoundError'};
+INVALID_VALUES_EXCEPTION = {name: 'InvalidValuesError'};
+IO_EXCEPTION = {name: 'IOError'};
+SECURITY_EXCEPTION = {name: 'SecurityError'};
+
+
+(function () {
+ var head_src = document.head.innerHTML;
+ if (head_src.search(/\/testharness.js\W/) === -1) {
+ document.write('<script language="javascript" src="../resources/testharness.js"></script>\n');
+ }
+ if (head_src.search(/\/testharnessreport.js\W/) === -1) {
+ document.write('<script language="javascript" src="../resources/testharnessreport.js"></script>\n');
+ }
+})();
+
+var _registered_types = {};
+
+function _resolve_registered_type(type) {
+ while (type in _registered_types) {
+ type = _registered_types[type];
+ }
+ return type;
+}
+
+/**
+ * Method checks extra argument for none argument method.
+ * The only check is that method will not throw an exception.
+ * Example usage:
+ * checkExtraArgument(tizen.notification, "removeAll");
+ *
+ * @param object object
+ * @param methodName string - name of the method
+ */
+function checkExtraArgument(object, methodName) {
+ var extraArgument = [
+ null,
+ undefined,
+ "Tizen",
+ 1,
+ false,
+ ["one", "two"],
+ {argument: 1},
+ function () {}
+ ], i;
+
+ for (i = 0; i < extraArgument.length; i++) {
+ object[methodName](extraArgument[i]);
+ }
+}
+
+/**
+ * Method to validate conversion.
+ * Example usage:
+ * conversionTable = getTypeConversionExceptions("functionObject", true);
+ * for(i = 0; i < conversionTable.length; i++) {
+ * errorCallback = conversionTable[i][0];
+ * exceptionName = conversionTable[i][1];
+ *
+ * assert_throws({name : exceptionName},
+ * function () {
+ * tizen.systemsetting.setProperty("HOME_SCREEN",
+ * propertyValue, successCallback, errorCallback);
+ * }, exceptionName + " should be thrown - given incorrect errorCallback.");
+ * }
+ *
+ * @param conversionType
+ * @param isOptional
+ * @returns table of tables which contain value (index 0) and exceptionName (index 1)
+ *
+ */
+function getTypeConversionExceptions(conversionType, isOptional) {
+ var exceptionName = "TypeMismatchError",
+ conversionTable;
+ switch (conversionType) {
+ case "enum":
+ conversionTable = [
+ [undefined, exceptionName],
+ [null, exceptionName],
+ [0, exceptionName],
+ [true, exceptionName],
+ ["dummyInvalidEnumValue", exceptionName],
+ [{ }, exceptionName]
+ ];
+ break;
+ case "double":
+ conversionTable = [
+ [undefined, exceptionName],
+ [NaN, exceptionName],
+ [Number.POSITIVE_INFINITY, exceptionName],
+ [Number.NEGATIVE_INFINITY, exceptionName],
+ ["TIZEN", exceptionName],
+ [{ name : "TIZEN" }, exceptionName],
+ [function () { }, exceptionName]
+ ];
+ break;
+ case "object":
+ conversionTable = [
+ [true, exceptionName],
+ [false, exceptionName],
+ [NaN, exceptionName],
+ [0, exceptionName],
+ ["", exceptionName],
+ ["TIZEN", exceptionName],
+ [undefined, exceptionName]
+ ];
+ if (!isOptional) {
+ conversionTable.push([null, exceptionName]);
+ }
+ break;
+ case "functionObject":
+ conversionTable = [
+ [true, exceptionName],
+ [false, exceptionName],
+ [NaN, exceptionName],
+ [0, exceptionName],
+ ["", exceptionName],
+ ["TIZEN", exceptionName],
+ [[], exceptionName],
+ [{ }, exceptionName],
+ [undefined, exceptionName]
+ ];
+ if (!isOptional) {
+ conversionTable.push([null, exceptionName]);
+ }
+ break;
+ case "array":
+ conversionTable = [
+ [true, exceptionName],
+ [false, exceptionName],
+ [NaN, exceptionName],
+ [0, exceptionName],
+ ["", exceptionName],
+ ["TIZEN", exceptionName],
+ [{ }, exceptionName],
+ [function () { }, exceptionName],
+ [undefined, exceptionName]
+ ];
+ if (!isOptional) {
+ conversionTable.push([null, exceptionName]);
+ }
+ break;
+ case "dictionary":
+ conversionTable = [
+ [true, exceptionName],
+ [false, exceptionName],
+ [NaN, exceptionName],
+ [0, exceptionName],
+ ["", exceptionName],
+ ["TIZEN", exceptionName],
+ [undefined, exceptionName]
+ ];
+ if (!isOptional) {
+ conversionTable.push([null, exceptionName]);
+ }
+ break;
+ default:
+ assert_unreached("Fix your test. Wrong conversionType '" + conversionType + "'.");
+ };
+
+ return conversionTable;
+}
+
+
+function assert_type(obj, type, description) {
+ var org_type = type, prop_name, prop_type, prop_value;
+
+ type = _resolve_registered_type(type);
+
+ if (typeof (type) === 'string') {
+ type = type.toLowerCase();
+ switch (type) {
+ case 'object':
+ case 'string':
+ case 'number':
+ case 'function':
+ case 'boolean':
+ case 'undefined':
+ case 'xml':
+ assert_equals(typeof (obj), type, description);
+ break;
+ case 'null':
+ assert_true(obj === null, description);
+ break;
+ case 'array':
+ assert_true(Array.isArray(obj), description);
+ break;
+ case 'date':
+ assert_true(obj instanceof Date, description);
+ break;
+ case 'byte':
+ assert_equals(typeof (obj), 'number', description);
+ assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
+ assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
+ break;
+ case 'octet':
+ assert_equals(typeof (obj), 'number', description);
+ assert_greater_than_equal(obj, MIN_OCTET, description + " - value too low.");
+ assert_less_than_equal(obj, MAX_OCTET, description + " - value too high.");
+ assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ break;
+ case 'short':
+ assert_equals(typeof (obj), 'number', description);
+ assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
+ assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
+ break;
+ case 'unsigned short':
+ assert_equals(typeof (obj), 'number', description);
+ assert_greater_than_equal(obj, MIN_UNSIGNED_SHORT, description + " - value too low.");
+ assert_less_than_equal(obj, MAX_UNSIGNED_SHORT, description + " - value too high.");
+ assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ break;
+ case 'long':
+ assert_equals(typeof (obj), 'number', description);
+ assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
+ assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
+ break;
+ case 'unsigned long':
+ assert_equals(typeof (obj), 'number', description);
+ assert_greater_than_equal(obj, MIN_UNSIGNED_LONG, description + " - value too low.");
+ assert_less_than_equal(obj, MAX_UNSIGNED_LONG, description + " - value too high.");
+ assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ break;
+ case 'long long':
+ assert_equals(typeof (obj), 'number', description);
+ assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
+ assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
+ break;
+ case 'unsigned long long':
+ assert_equals(typeof (obj), 'number', description);
+ assert_greater_than_equal(obj, MIN_UNSIGNED_LONG_LONG, description + " - value too low.");
+ assert_less_than_equal(obj, MAX_UNSIGNED_LONG_LONG, description + " - value too high.");
+ assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ break;
+ default:
+ assert_unreached('Fix your test. Wrong type \'' + org_type + '\'');
+ }
+ } else if (typeof (type) === 'function') {
+ assert_true(obj instanceof type, description);
+ } else if (typeof (type) === 'object') {
+ for (prop_name in type) {
+ prop_type = type[prop_name];
+ if (prop_type === 'function') {
+ assert_inherits(obj, prop_name);
+ assert_equals(typeof obj[prop_name], prop_type, 'Object should have method ' + prop_name);
+ } else {
+ assert_own_property(obj, prop_name);
+ }
+ }
+ } else {
+ assert_unreached('Fix your test. Wrong type ' + org_type);
+ }
+}
+
+function register_type(alias, type_spec) {
+ _registered_types[alias] = type_spec;
+}
+
+/**
+ * Method to check if attribute is const.
+ * Example usage:
+ * check_const(tizen.bluetooth.deviceMinor, 'TOY_DOLL', 0x03, 'number', 0x29B);
+ *
+ * @param obj object to test which has const attribute
+ * @param attributeName attribute name.
+ * @param expectedValue expected value of provided attribute name
+ * @param expectedType expected type of provided attribute name
+ * @param valueToAssign value to assign in order to check if attribute value can be modified
+ */
+function check_const(obj, attributeName, expectedValue, expectedType, valueToAssign) {
+ var tmp;
+ if (expectedValue === valueToAssign) {
+ assert_unreached("Fix your test. The same values given for " + attributeName +
+ " in 'value' and 'valueToSet' arguments.");
+ }
+ if (typeof (attributeName) === "string") {
+ assert_true(attributeName in obj, "Name " + attributeName + " doesn't exist in provided object.");
+ assert_equals(obj[attributeName], expectedValue, "Value of " + attributeName + " is diffrent.");
+ if (typeof (expectedType) !== "undefined") {
+ if (expectedValue === null) {
+ assert_type(obj[attributeName], "object", "Type of " + attributeName + " is different.");
+ } else {
+ assert_type(obj[attributeName], expectedType, "Type of " + attributeName + " is different.");
+ }
+ } else {
+ assert_unreached("Fix your test. Wrong type " + expectedType);
+ }
+ tmp = obj[attributeName];
+ obj[attributeName] = valueToAssign;
+ assert_equals(obj[attributeName], tmp, attributeName + " can be modified.");
+ } else {
+ assert_unreached("Fix your test. Wrong type of name " + typeof (attributeName));
+ }
+}
+
+/**
+ * Method to check if attribute is readonly.
+ * Example usage:
+ * check_readonly(statusNotification, "postedTime", null, 'object', new Date());
+ *
+ * @param obj object to test which has readonly attribute
+ * @param attributeName attribute name.
+ * @param expectedValue expected value of provided attribute name
+ * @param expectedType expected type of provided attribute name
+ * @param valueToAssign value to assign in order to check if attribute value can be modified
+ */
+function check_readonly(obj, attributeName, expectedValue, expectedType, valueToAssign) {
+ check_const(obj, attributeName, expectedValue, expectedType, valueToAssign);
+}
+
+/**
+ * Method to check if attribute can be set to null.
+ * Example usage:
+ * check_not_nullable(syncInfo, "mode");
+ *
+ * @param obj object to test which has not nullable attribute
+ * @param attributeName attribute name.
+ */
+function check_not_nullable(obj, attributeName)
+{ var old_value = obj[attributeName];
+ obj[attributeName] = null;
+ assert_not_equals(obj[attributeName], null, "Attribute " + attributeName + " can be set to null.");
+ obj[attributeName] = old_value;
+}
+
+/**
+ * Method to check NoInterfaceObject
+ * Example usage:
+ * check_no_interface_object("BluetoothAdapter")
+ *
+ * @param interfaceName interface name
+ */
+function check_no_interface_object(interfaceName) {
+ assert_throws({name: "TypeError"}, function () {
+ tizen[interfaceName]();
+ },"Wrong call as a function");
+ assert_throws({name: "TypeError"}, function () {
+ new tizen[interfaceName]();
+ },"Wrong call as a new function");
+ assert_throws({name: "TypeError"}, function () {
+ ({}) instanceof tizen[interfaceName];
+ },"instanceof exception");
+ assert_equals(tizen[interfaceName], undefined, interfaceName + " is not undefined.");
+}
+
+
+/**
+ * Method to check Constructors
+ * Example usage:
+ * check_constructor("BluetoothAdapter")
+ *
+ * @param constructorName constructor name
+ */
+
+function check_constructor(constructorName) {
+ assert_true(constructorName in tizen, "No " + constructorName + " in tizen.");
+ assert_false({} instanceof tizen[constructorName],"Custom object is not instance of " + constructorName);
+ assert_throws({
+ name: "TypeError"
+ }, function () {
+ tizen[constructorName]();
+ }, "Constructor called as function.");
+}
+
+/**
+ * Method to check if given method can be overridden in a given object - (TEMPORARY REMOVED).
+ * That method also checks if given method exists in a given object.
+ * Example usage:
+ * check_method_exists(tizen.notification, "get");
+ *
+ * @param obj object with method
+ * @param methodName name of the method to check.
+ */
+function check_method_exists(obj, methodName) {
+ assert_type(obj[methodName], 'function', "Method does not exist.");
+}
+
+/**
+ * Method to check extensibility of given object.
+ * Method checks if new attribute and method can be added.
+ * Example usage:
+ * check_extensibility(tizen.notification);
+ *
+ * @param obj object to check
+ */
+function check_extensibility(obj) {
+ var dummyAttribute = "dummyAttributeValue", dummyMethodResult = "dummyMethodResultValue";
+ obj.newDummyMethod = function() {
+ return dummyMethodResult;
+ }
+ assert_equals(obj.newDummyMethod(), dummyMethodResult, "Incorrect result from added method.");
+
+ obj.newDummyAttribute = dummyAttribute;
+ assert_equals(obj.newDummyAttribute, dummyAttribute, "Incorrect result from added attribute.");
+}
+
+/**
+ * Method to check if attribute can be modify.
+ * Example usage:
+ * check_attr(downloadRequest, "fileName", default_val, "string", "file_name.html");
+ *
+ * @param obj object to test which has not readonly attribute
+ * @param attributeName attribute name.
+ * @param expectedValue expected value of provided attribute name
+ * @param expectedType expected type of provided attribute name
+ * @param valueToAssign value to assign in order to check if attribute value can be modified
+ */
+function check_attribute(obj, attributeName, expectedValue, expectedType, valueToAssign) {
+ if (expectedValue === valueToAssign) {
+ assert_unreached("Fix your test. The same values given for " + attributeName +
+ " in 'value' and 'valueToSet' arguments.");
+ }
+ if (typeof (attributeName) === "string") {
+ assert_true(attributeName in obj, "Name " + attributeName + " doesn't exist in provided object.");
+ assert_equals(obj[attributeName], expectedValue, "Value of " + attributeName + " is diffrent.");
+ if (typeof (expectedType) !== "undefined") {
+ if (expectedValue === null) {
+ assert_type(obj[attributeName], "object", "Type of " + attributeName + " is different.");
+ } else {
+ assert_type(obj[attributeName], expectedType, "Type of " + attributeName + " is different.");
+ }
+ } else {
+ assert_unreached("Fix your test. Wrong type " + expectedType);
+ }
+ obj[attributeName] = valueToAssign;
+ assert_equals(obj[attributeName], valueToAssign, attributeName + " can be modified.");
+ } else {
+ assert_unreached("Fix your test. Wrong type of name " + typeof (attributeName));
+ }
+}
+
+/**
+ * Method to check if whole array can be overwritten with an invalid value.
+ * Sample usage:
+ * check_invalid_array_assignments(message, "to", false);
+ *
+ * @param obj object which has the array as its property
+ * @param array name of the array to check
+ * @param isNullable indicates if the array can be null
+ */
+function check_invalid_array_assignments(obj, array, isNullable) {
+ var args = [undefined, true, false, NaN, 0, "TIZEN", {}, function () {}],
+ val = obj[array], i;
+
+ if (!isNullable) {
+ obj[array] = null;
+ assert_not_equals(obj[array], null, "Non-nullable array was set to null");
+ assert_type(obj[array], "array", "Non-nullable array type changed after assigning null");
+ assert_equals(obj[array].toString(), val.toString(), "Non-nullable array contents changed after assigning null");
+ }
+
+ for (i = 0 ; i < args.length ; i++) {
+ obj[array] = args[i];
+ assert_type(obj[array], "array", "Array type changed after assigning an invalid value");
+ assert_equals(obj[array].toString(), val.toString(), "Array contents changed after assigning an invalid value");
+ }
+}
+
+/**
+ * Method to check if an object can be overwritten with an invalid value.
+ * Sample usage:
+ * check_invalid_object_assignments(message, "body", false);
+ *
+ * @param parentObj object which has the 'obj' object as its property
+ * @param obj name of the object to check
+ * @param isNullable indicates if the object can be null
+ */
+function check_invalid_obj_assignments(parentObj, obj, isNullable) {
+ var args = [undefined, true, false, NaN, 0, "TIZEN", function () {}],
+ val = parentObj[obj], i;
+
+ if (!isNullable) {
+ parentObj[obj] = null;
+ assert_equals(parentObj[obj], val, "Non-nullable obj was modified after assigning null");
+ }
+
+ for (i = 0 ; i < args.length ; i++) {
+ parentObj[obj] = args[i];
+ assert_equals(parentObj[obj], val, "The object was set to " + args[i]);
+ }
+}
+
+/**
+ * Method to validate conversion for listeners.
+ * Example usage:
+ * incorrectListeners = getListenerConversionExceptions(["oninstalled", "onupdated", "onuninstalled"]);
+ * for(i = 0; i < incorrectListeners.length; i++) {
+ * packageInformationEventCallback = incorrectListeners[i][0];
+ * exceptionName = incorrectListeners[i][1];
+ * assert_throws({name : exceptionName},
+ * function () {
+ * tizen.package.setPackageInfoEventListener(packageInformationEventCallback);
+ * }, exceptionName + " should be thrown - given incorrect successCallback.");
+ * }
+ *
+ *
+ * @param callbackNames Array with names
+ * @returns {Array} table of tables which contain incorrect listener (index 0) and exceptionName (index 1)
+ *
+ */
+function getListenerConversionExceptions(callbackNames) {
+ var result = [], conversionTable, i, j, listenerName;
+ conversionTable = getTypeConversionExceptions("functionObject", false);
+
+ for (i = 0; i < callbackNames.length; i++) {
+ for (j = 0; j < conversionTable.length; j++) {
+ listenerName = {};
+ listenerName[callbackNames[i]] = conversionTable[j][0];
+ result.push([listenerName, conversionTable[j][1]]);
+ }
+ }
+
+ return result;
+}
+++ /dev/null
-/*
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-
- */
-
-
-MIN_BYTE = -128;
-MAX_BYTE = 127;
-MIN_OCTET = 0;
-MAX_OCTET = 255;
-MIN_SHORT = -32768;
-MAX_SHORT = 32767;
-MIN_UNSIGNED_SHORT = 0;
-MAX_UNSIGNED_SHORT = 65535;
-MIN_LONG = -2147483648;
-MAX_LONG = 2147483647;
-MIN_UNSIGNED_LONG = 0;
-MAX_UNSIGNED_LONG = 4294967295;
-MIN_LONG_LONG = -9223372036854775808;
-MAX_LONG_LONG = 9223372036854775807;
-MIN_UNSIGNED_LONG_LONG = 0;
-MAX_UNSIGNED_LONG_LONG = 18446744073709551615;
-
-TYPE_MISMATCH_EXCEPTION = {name: 'TypeMismatchError'};
-NOT_FOUND_EXCEPTION = {name: 'NotFoundError'};
-INVALID_VALUES_EXCEPTION = {name: 'InvalidValuesError'};
-IO_EXCEPTION = {name: 'IOError'};
-SECURITY_EXCEPTION = {name: 'SecurityError'};
-
-
-(function () {
- var head_src = document.head.innerHTML;
- if (head_src.search(/\/testharness.js\W/) === -1) {
- document.write('<script language="javascript" src="../resources/testharness.js"></script>\n');
- }
- if (head_src.search(/\/testharnessreport.js\W/) === -1) {
- document.write('<script language="javascript" src="../resources/testharnessreport.js"></script>\n');
- }
-})();
-
-var _registered_types = {};
-
-function _resolve_registered_type(type) {
- while (type in _registered_types) {
- type = _registered_types[type];
- }
- return type;
-}
-
-/**
- * Method checks extra argument for none argument method.
- * The only check is that method will not throw an exception.
- * Example usage:
- * checkExtraArgument(tizen.notification, "removeAll");
- *
- * @param object object
- * @param methodName string - name of the method
- */
-function checkExtraArgument(object, methodName) {
- var extraArgument = [
- null,
- undefined,
- "Tizen",
- 1,
- false,
- ["one", "two"],
- {argument: 1},
- function () {}
- ], i;
-
- for (i = 0; i < extraArgument.length; i++) {
- object[methodName](extraArgument[i]);
- }
-}
-
-/**
- * Method to validate conversion.
- * Example usage:
- * conversionTable = getTypeConversionExceptions("functionObject", true);
- * for(i = 0; i < conversionTable.length; i++) {
- * errorCallback = conversionTable[i][0];
- * exceptionName = conversionTable[i][1];
- *
- * assert_throws({name : exceptionName},
- * function () {
- * tizen.systemsetting.setProperty("HOME_SCREEN",
- * propertyValue, successCallback, errorCallback);
- * }, exceptionName + " should be thrown - given incorrect errorCallback.");
- * }
- *
- * @param conversionType
- * @param isOptional
- * @returns table of tables which contain value (index 0) and exceptionName (index 1)
- *
- */
-function getTypeConversionExceptions(conversionType, isOptional) {
- var exceptionName = "TypeMismatchError",
- conversionTable;
- switch (conversionType) {
- case "enum":
- conversionTable = [
- [undefined, exceptionName],
- [null, exceptionName],
- [0, exceptionName],
- [true, exceptionName],
- ["dummyInvalidEnumValue", exceptionName],
- [{ }, exceptionName]
- ];
- break;
- case "double":
- conversionTable = [
- [undefined, exceptionName],
- [NaN, exceptionName],
- [Number.POSITIVE_INFINITY, exceptionName],
- [Number.NEGATIVE_INFINITY, exceptionName],
- ["TIZEN", exceptionName],
- [{ name : "TIZEN" }, exceptionName],
- [function () { }, exceptionName]
- ];
- break;
- case "object":
- conversionTable = [
- [true, exceptionName],
- [false, exceptionName],
- [NaN, exceptionName],
- [0, exceptionName],
- ["", exceptionName],
- ["TIZEN", exceptionName],
- [undefined, exceptionName]
- ];
- if (!isOptional) {
- conversionTable.push([null, exceptionName]);
- }
- break;
- case "functionObject":
- conversionTable = [
- [true, exceptionName],
- [false, exceptionName],
- [NaN, exceptionName],
- [0, exceptionName],
- ["", exceptionName],
- ["TIZEN", exceptionName],
- [[], exceptionName],
- [{ }, exceptionName],
- [undefined, exceptionName]
- ];
- if (!isOptional) {
- conversionTable.push([null, exceptionName]);
- }
- break;
- case "array":
- conversionTable = [
- [true, exceptionName],
- [false, exceptionName],
- [NaN, exceptionName],
- [0, exceptionName],
- ["", exceptionName],
- ["TIZEN", exceptionName],
- [{ }, exceptionName],
- [function () { }, exceptionName],
- [undefined, exceptionName]
- ];
- if (!isOptional) {
- conversionTable.push([null, exceptionName]);
- }
- break;
- case "dictionary":
- conversionTable = [
- [true, exceptionName],
- [false, exceptionName],
- [NaN, exceptionName],
- [0, exceptionName],
- ["", exceptionName],
- ["TIZEN", exceptionName],
- [undefined, exceptionName]
- ];
- if (!isOptional) {
- conversionTable.push([null, exceptionName]);
- }
- break;
- default:
- assert_unreached("Fix your test. Wrong conversionType '" + conversionType + "'.");
- };
-
- return conversionTable;
-}
-
-
-function assert_type(obj, type, description) {
- var org_type = type, prop_name, prop_type, prop_value;
-
- type = _resolve_registered_type(type);
-
- if (typeof (type) === 'string') {
- type = type.toLowerCase();
- switch (type) {
- case 'object':
- case 'string':
- case 'number':
- case 'function':
- case 'boolean':
- case 'undefined':
- case 'xml':
- assert_equals(typeof (obj), type, description);
- break;
- case 'null':
- assert_true(obj === null, description);
- break;
- case 'array':
- assert_true(Array.isArray(obj), description);
- break;
- case 'date':
- assert_true(obj instanceof Date, description);
- break;
- case 'byte':
- assert_equals(typeof (obj), 'number', description);
- assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
- assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
- assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
- break;
- case 'octet':
- assert_equals(typeof (obj), 'number', description);
- assert_greater_than_equal(obj, MIN_OCTET, description + " - value too low.");
- assert_less_than_equal(obj, MAX_OCTET, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
- break;
- case 'short':
- assert_equals(typeof (obj), 'number', description);
- assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
- assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
- assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
- break;
- case 'unsigned short':
- assert_equals(typeof (obj), 'number', description);
- assert_greater_than_equal(obj, MIN_UNSIGNED_SHORT, description + " - value too low.");
- assert_less_than_equal(obj, MAX_UNSIGNED_SHORT, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
- break;
- case 'long':
- assert_equals(typeof (obj), 'number', description);
- assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
- assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
- assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
- break;
- case 'unsigned long':
- assert_equals(typeof (obj), 'number', description);
- assert_greater_than_equal(obj, MIN_UNSIGNED_LONG, description + " - value too low.");
- assert_less_than_equal(obj, MAX_UNSIGNED_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
- break;
- case 'long long':
- assert_equals(typeof (obj), 'number', description);
- assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
- assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
- assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
- break;
- case 'unsigned long long':
- assert_equals(typeof (obj), 'number', description);
- assert_greater_than_equal(obj, MIN_UNSIGNED_LONG_LONG, description + " - value too low.");
- assert_less_than_equal(obj, MAX_UNSIGNED_LONG_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
- break;
- default:
- assert_unreached('Fix your test. Wrong type \'' + org_type + '\'');
- }
- } else if (typeof (type) === 'function') {
- assert_true(obj instanceof type, description);
- } else if (typeof (type) === 'object') {
- for (prop_name in type) {
- prop_type = type[prop_name];
- if (prop_type === 'function') {
- assert_inherits(obj, prop_name);
- assert_equals(typeof obj[prop_name], prop_type, 'Object should have method ' + prop_name);
- } else {
- assert_own_property(obj, prop_name);
- }
- }
- } else {
- assert_unreached('Fix your test. Wrong type ' + org_type);
- }
-}
-
-function register_type(alias, type_spec) {
- _registered_types[alias] = type_spec;
-}
-
-/**
- * Method to check if attribute is const.
- * Example usage:
- * check_const(tizen.bluetooth.deviceMinor, 'TOY_DOLL', 0x03, 'number', 0x29B);
- *
- * @param obj object to test which has const attribute
- * @param attributeName attribute name.
- * @param expectedValue expected value of provided attribute name
- * @param expectedType expected type of provided attribute name
- * @param valueToAssign value to assign in order to check if attribute value can be modified
- */
-function check_const(obj, attributeName, expectedValue, expectedType, valueToAssign) {
- var tmp;
- if (expectedValue === valueToAssign) {
- assert_unreached("Fix your test. The same values given for " + attributeName +
- " in 'value' and 'valueToSet' arguments.");
- }
- if (typeof (attributeName) === "string") {
- assert_true(attributeName in obj, "Name " + attributeName + " doesn't exist in provided object.");
- assert_equals(obj[attributeName], expectedValue, "Value of " + attributeName + " is diffrent.");
- if (typeof (expectedType) !== "undefined") {
- if (expectedValue === null) {
- assert_type(obj[attributeName], "object", "Type of " + attributeName + " is different.");
- } else {
- assert_type(obj[attributeName], expectedType, "Type of " + attributeName + " is different.");
- }
- } else {
- assert_unreached("Fix your test. Wrong type " + expectedType);
- }
- tmp = obj[attributeName];
- obj[attributeName] = valueToAssign;
- assert_equals(obj[attributeName], tmp, attributeName + " can be modified.");
- } else {
- assert_unreached("Fix your test. Wrong type of name " + typeof (attributeName));
- }
-}
-
-/**
- * Method to check if attribute is readonly.
- * Example usage:
- * check_readonly(statusNotification, "postedTime", null, 'object', new Date());
- *
- * @param obj object to test which has readonly attribute
- * @param attributeName attribute name.
- * @param expectedValue expected value of provided attribute name
- * @param expectedType expected type of provided attribute name
- * @param valueToAssign value to assign in order to check if attribute value can be modified
- */
-function check_readonly(obj, attributeName, expectedValue, expectedType, valueToAssign) {
- check_const(obj, attributeName, expectedValue, expectedType, valueToAssign);
-}
-
-/**
- * Method to check if attribute can be set to null.
- * Example usage:
- * check_not_nullable(syncInfo, "mode");
- *
- * @param obj object to test which has not nullable attribute
- * @param attributeName attribute name.
- */
-function check_not_nullable(obj, attributeName)
-{ var old_value = obj[attributeName];
- obj[attributeName] = null;
- assert_not_equals(obj[attributeName], null, "Attribute " + attributeName + " can be set to null.");
- obj[attributeName] = old_value;
-}
-
-/**
- * Method to check NoInterfaceObject
- * Example usage:
- * check_no_interface_object("BluetoothAdapter")
- *
- * @param interfaceName interface name
- */
-function check_no_interface_object(interfaceName) {
- assert_throws({name: "TypeError"}, function () {
- tizen[interfaceName]();
- },"Wrong call as a function");
- assert_throws({name: "TypeError"}, function () {
- new tizen[interfaceName]();
- },"Wrong call as a new function");
- assert_throws({name: "TypeError"}, function () {
- ({}) instanceof tizen[interfaceName];
- },"instanceof exception");
- assert_equals(tizen[interfaceName], undefined, interfaceName + " is not undefined.");
-}
-
-
-/**
- * Method to check Constructors
- * Example usage:
- * check_constructor("BluetoothAdapter")
- *
- * @param constructorName constructor name
- */
-
-function check_constructor(constructorName) {
- assert_true(constructorName in tizen, "No " + constructorName + " in tizen.");
- assert_false({} instanceof tizen[constructorName],"Custom object is not instance of " + constructorName);
- assert_throws({
- name: "TypeError"
- }, function () {
- tizen[constructorName]();
- }, "Constructor called as function.");
-}
-
-/**
- * Method to check if given method can be overridden in a given object - (TEMPORARY REMOVED).
- * That method also checks if given method exists in a given object.
- * Example usage:
- * check_method_exists(tizen.notification, "get");
- *
- * @param obj object with method
- * @param methodName name of the method to check.
- */
-function check_method_exists(obj, methodName) {
- assert_type(obj[methodName], 'function', "Method does not exist.");
-}
-
-/**
- * Method to check extensibility of given object.
- * Method checks if new attribute and method can be added.
- * Example usage:
- * check_extensibility(tizen.notification);
- *
- * @param obj object to check
- */
-function check_extensibility(obj) {
- var dummyAttribute = "dummyAttributeValue", dummyMethodResult = "dummyMethodResultValue";
- obj.newDummyMethod = function() {
- return dummyMethodResult;
- }
- assert_equals(obj.newDummyMethod(), dummyMethodResult, "Incorrect result from added method.");
-
- obj.newDummyAttribute = dummyAttribute;
- assert_equals(obj.newDummyAttribute, dummyAttribute, "Incorrect result from added attribute.");
-}
-
-/**
- * Method to check if attribute can be modify.
- * Example usage:
- * check_attr(downloadRequest, "fileName", default_val, "string", "file_name.html");
- *
- * @param obj object to test which has not readonly attribute
- * @param attributeName attribute name.
- * @param expectedValue expected value of provided attribute name
- * @param expectedType expected type of provided attribute name
- * @param valueToAssign value to assign in order to check if attribute value can be modified
- */
-function check_attribute(obj, attributeName, expectedValue, expectedType, valueToAssign) {
- if (expectedValue === valueToAssign) {
- assert_unreached("Fix your test. The same values given for " + attributeName +
- " in 'value' and 'valueToSet' arguments.");
- }
- if (typeof (attributeName) === "string") {
- assert_true(attributeName in obj, "Name " + attributeName + " doesn't exist in provided object.");
- assert_equals(obj[attributeName], expectedValue, "Value of " + attributeName + " is diffrent.");
- if (typeof (expectedType) !== "undefined") {
- if (expectedValue === null) {
- assert_type(obj[attributeName], "object", "Type of " + attributeName + " is different.");
- } else {
- assert_type(obj[attributeName], expectedType, "Type of " + attributeName + " is different.");
- }
- } else {
- assert_unreached("Fix your test. Wrong type " + expectedType);
- }
- obj[attributeName] = valueToAssign;
- assert_equals(obj[attributeName], valueToAssign, attributeName + " can be modified.");
- } else {
- assert_unreached("Fix your test. Wrong type of name " + typeof (attributeName));
- }
-}
-
-/**
- * Method to check if whole array can be overwritten with an invalid value.
- * Sample usage:
- * check_invalid_array_assignments(message, "to", false);
- *
- * @param obj object which has the array as its property
- * @param array name of the array to check
- * @param isNullable indicates if the array can be null
- */
-function check_invalid_array_assignments(obj, array, isNullable) {
- var args = [undefined, true, false, NaN, 0, "TIZEN", {}, function () {}],
- val = obj[array], i;
-
- if (!isNullable) {
- obj[array] = null;
- assert_not_equals(obj[array], null, "Non-nullable array was set to null");
- assert_type(obj[array], "array", "Non-nullable array type changed after assigning null");
- assert_equals(obj[array].toString(), val.toString(), "Non-nullable array contents changed after assigning null");
- }
-
- for (i = 0 ; i < args.length ; i++) {
- obj[array] = args[i];
- assert_type(obj[array], "array", "Array type changed after assigning an invalid value");
- assert_equals(obj[array].toString(), val.toString(), "Array contents changed after assigning an invalid value");
- }
-}
-
-/**
- * Method to check if an object can be overwritten with an invalid value.
- * Sample usage:
- * check_invalid_object_assignments(message, "body", false);
- *
- * @param parentObj object which has the 'obj' object as its property
- * @param obj name of the object to check
- * @param isNullable indicates if the object can be null
- */
-function check_invalid_obj_assignments(parentObj, obj, isNullable) {
- var args = [undefined, true, false, NaN, 0, "TIZEN", function () {}],
- val = parentObj[obj], i;
-
- if (!isNullable) {
- parentObj[obj] = null;
- assert_equals(parentObj[obj], val, "Non-nullable obj was modified after assigning null");
- }
-
- for (i = 0 ; i < args.length ; i++) {
- parentObj[obj] = args[i];
- assert_equals(parentObj[obj], val, "The object was set to " + args[i]);
- }
-}
-
-/**
- * Method to validate conversion for listeners.
- * Example usage:
- * incorrectListeners = getListenerConversionExceptions(["oninstalled", "onupdated", "onuninstalled"]);
- * for(i = 0; i < incorrectListeners.length; i++) {
- * packageInformationEventCallback = incorrectListeners[i][0];
- * exceptionName = incorrectListeners[i][1];
- * assert_throws({name : exceptionName},
- * function () {
- * tizen.package.setPackageInfoEventListener(packageInformationEventCallback);
- * }, exceptionName + " should be thrown - given incorrect successCallback.");
- * }
- *
- *
- * @param callbackNames Array with names
- * @returns {Array} table of tables which contain incorrect listener (index 0) and exceptionName (index 1)
- *
- */
-function getListenerConversionExceptions(callbackNames) {
- var result = [], conversionTable, i, j, listenerName;
- conversionTable = getTypeConversionExceptions("functionObject", false);
-
- for (i = 0; i < callbackNames.length; i++) {
- for (j = 0; j < conversionTable.length; j++) {
- listenerName = {};
- listenerName[callbackNames[i]] = conversionTable[j][0];
- result.push([listenerName, conversionTable[j][1]]);
- }
- }
-
- return result;
-}
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="release" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html#releaseid2576878</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
</spec>
</specs>
</testcase>
- <testcase purpose="check if turnScreenOff method works correctly" type="compliance" status="approved" component="TizenAPI/System/Power" execution_type="manual" priority="P1" id="PowerManager_turnScreenOff_successful">
+ <testcase purpose="Check if turnScreenOff method works correctly" type="compliance" status="approved" component="TizenAPI/System/Power" execution_type="manual" priority="P1" id="PowerManager_turnScreenOff_successful">
<description>
<steps>
<step order="1">
</spec>
</specs>
</testcase>
- <testcase purpose="check if turnScreenOn method exists" type="compliance" status="approved" component="TizenAPI/System/Power" execution_type="auto" priority="P1" id="PowerManager_turnScreenOn_method_exists">
+ <testcase purpose="Check if turnScreenOn method exists" type="compliance" status="approved" component="TizenAPI/System/Power" execution_type="auto" priority="P1" id="PowerManager_turnScreenOn_method_exists">
<description>
<test_script_entry>/opt/tct-power-tizen-tests/power/PowerManager_turnScreenOn_method_exists.html</test_script_entry>
</description>
</spec>
</specs>
</testcase>
- <testcase purpose="check if turnScreenOn method works correctly" type="compliance" status="approved" component="TizenAPI/System/Power" execution_type="manual" priority="P1" id="PowerManager_turnScreenOn_successful">
+ <testcase purpose="Check if turnScreenOn method works correctly" type="compliance" status="approved" component="TizenAPI/System/Power" execution_type="manual" priority="P1" id="PowerManager_turnScreenOn_successful">
<description>
<steps>
<step order="1">
</spec>
</specs>
</testcase>
- <testcase purpose="check if unsetScreenStateChangeListener method works correctly" type="compliance" status="approved" component="TizenAPI/System/Power" execution_type="manual" priority="P1" id="PowerManager_unsetScreenStateChangeListener_successful">
+ <testcase purpose="Check if unsetScreenStateChangeListener method works correctly" type="compliance" status="approved" component="TizenAPI/System/Power" execution_type="manual" priority="P1" id="PowerManager_unsetScreenStateChangeListener_successful">
<description>
<steps>
<step order="1">
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="request" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html#requestid2576680</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="PowerManagerObject" usage="true" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="PowerManager" usage="true" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="ScreenStateChangeCallback" usage="true" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="PowerManager" usage="true" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="PowerManager" usage="true" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="request" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="request" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html#requestid2576680</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="request" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html#requestid2576680</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="request" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html#requestid2576680</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="request" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html#requestid2576680</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="request" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html#requestid2576680</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="release" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html#releaseid2576878</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="release" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="release" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html#requestid2576680</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="release" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html#requestid2576680</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="getScreenBrightness" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="getScreenBrightness" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="isScreenOn" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="isScreenOn" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="restoreScreenBrightness" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="restoreScreenBrightness" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="setScreenBrightness" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="setScreenBrightness" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="setScreenBrightness" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="setScreenBrightness" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="setScreenStateChangeListener" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="setScreenStateChangeListener" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="setScreenStateChangeListener" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="setScreenStateChangeListener" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="setScreenStateChangeListener" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="turnScreenOff" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="turnScreenOff" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="turnScreenOn" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="turnScreenOn" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="unsetScreenStateChangeListener" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/content.html</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="unsetScreenStateChangeListener" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<specs>
<spec>
<spec_assertion interface="ScreenStateChangeCallback" element_type="method" element_name="onchanged" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
</testcase>
- <testcase purpose="check if setScreenBrightness() method doesn't set out of range screen brightness" type="compliance" status="approved" component="TizenAPI/System/Power" execution_type="auto" priority="P2" id="PowerManager_setScreenBrightness_brightness_invalid_val">
+ <testcase purpose="Check if setScreenBrightness() method doesn't set out of range screen brightness" type="compliance" status="approved" component="TizenAPI/System/Power" execution_type="auto" priority="P2" id="PowerManager_setScreenBrightness_brightness_invalid_val">
<description>
<test_script_entry>/opt/tct-power-tizen-tests/power/PowerManager_setScreenBrightness_brightness_invalid_val.html</test_script_entry>
</description>
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="setScreenBrightness" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api/tizen/application.html</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
</testcase>
- <testcase purpose="check whether getScreenBrightness() method gets the screen brightness level correctly" type="compliance" status="approved" component="TizenAPI/System/Power" execution_type="auto" priority="P1" id="PowerManager_getScreenBrightness_check_change">
+ <testcase purpose="Check whether getScreenBrightness() method gets the screen brightness level correctly" type="compliance" status="approved" component="TizenAPI/System/Power" execution_type="auto" priority="P1" id="PowerManager_getScreenBrightness_check_change">
<description>
<test_script_entry>/opt/tct-power-tizen-tests/power/PowerManager_getScreenBrightness_check_change.html</test_script_entry>
</description>
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="getScreenBrightness" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
</testcase>
- <testcase purpose="check whether isScreenOn() method gets the screen state correctly" type="compliance" status="approved" component="TizenAPI/System/Power" execution_type="auto" priority="P1" id="PowerManager_isScreenOn_check_change">
+ <testcase purpose="Check whether isScreenOn() method gets the screen state correctly" type="compliance" status="approved" component="TizenAPI/System/Power" execution_type="auto" priority="P1" id="PowerManager_isScreenOn_check_change">
<description>
<test_script_entry>/opt/tct-power-tizen-tests/power/PowerManager_isScreenOn_check_change.html</test_script_entry>
</description>
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="isScreenOn" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
</testcase>
- <testcase purpose="check if restoreScreenBrightness() method restores the screen brightness to the system default setting value" type="compliance" status="approved" component="TizenAPI/System/Power" execution_type="manual" priority="P1" id="PowerManager_restoreScreenBrightness_check_effect">
+ <testcase purpose="Check if restoreScreenBrightness() method restores the screen brightness to the system default setting value" type="compliance" status="approved" component="TizenAPI/System/Power" execution_type="manual" priority="P1" id="PowerManager_restoreScreenBrightness_check_effect">
<description>
<steps>
<step order="1">
<specs>
<spec>
<spec_assertion interface="PowerManager" element_type="method" element_name="restoreScreenBrightness" specification="Power" section="System" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/power.html</spec_url>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/power.html</spec_url>
<spec_statement>TBD</spec_statement>
</spec>
</specs>
<test_script_entry>/opt/tct-power-tizen-tests/power/PowerManager_request.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="check if turnScreenOff method works correctly" component="TizenAPI/System/Power" execution_type="manual" id="PowerManager_turnScreenOff_successful">
+ <testcase purpose="Check if turnScreenOff method works correctly" component="TizenAPI/System/Power" execution_type="manual" id="PowerManager_turnScreenOff_successful">
<description>
<steps>
<step order="1">
<test_script_entry>/opt/tct-power-tizen-tests/power/PowerManager_turnScreenOff_successful.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="check if turnScreenOn method exists" component="TizenAPI/System/Power" execution_type="auto" id="PowerManager_turnScreenOn_method_exists">
+ <testcase purpose="Check if turnScreenOn method exists" component="TizenAPI/System/Power" execution_type="auto" id="PowerManager_turnScreenOn_method_exists">
<description>
<test_script_entry>/opt/tct-power-tizen-tests/power/PowerManager_turnScreenOn_method_exists.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="check if turnScreenOn method works correctly" component="TizenAPI/System/Power" execution_type="manual" id="PowerManager_turnScreenOn_successful">
+ <testcase purpose="Check if turnScreenOn method works correctly" component="TizenAPI/System/Power" execution_type="manual" id="PowerManager_turnScreenOn_successful">
<description>
<steps>
<step order="1">
<test_script_entry>/opt/tct-power-tizen-tests/power/PowerManager_turnScreenOn_successful.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="check if unsetScreenStateChangeListener method works correctly" component="TizenAPI/System/Power" execution_type="manual" id="PowerManager_unsetScreenStateChangeListener_successful">
+ <testcase purpose="Check if unsetScreenStateChangeListener method works correctly" component="TizenAPI/System/Power" execution_type="manual" id="PowerManager_unsetScreenStateChangeListener_successful">
<description>
<steps>
<step order="1">
<test_script_entry>/opt/tct-power-tizen-tests/power/ScreenStateChangeCallback_onchanged.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="check if setScreenBrightness() method doesn't set out of range screen brightness" component="TizenAPI/System/Power" execution_type="auto" id="PowerManager_setScreenBrightness_brightness_invalid_val">
+ <testcase purpose="Check if setScreenBrightness() method doesn't set out of range screen brightness" component="TizenAPI/System/Power" execution_type="auto" id="PowerManager_setScreenBrightness_brightness_invalid_val">
<description>
<test_script_entry>/opt/tct-power-tizen-tests/power/PowerManager_setScreenBrightness_brightness_invalid_val.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="check whether getScreenBrightness() method gets the screen brightness level correctly" component="TizenAPI/System/Power" execution_type="auto" id="PowerManager_getScreenBrightness_check_change">
+ <testcase purpose="Check whether getScreenBrightness() method gets the screen brightness level correctly" component="TizenAPI/System/Power" execution_type="auto" id="PowerManager_getScreenBrightness_check_change">
<description>
<test_script_entry>/opt/tct-power-tizen-tests/power/PowerManager_getScreenBrightness_check_change.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="check whether isScreenOn() method gets the screen state correctly" component="TizenAPI/System/Power" execution_type="auto" id="PowerManager_isScreenOn_check_change">
+ <testcase purpose="Check whether isScreenOn() method gets the screen state correctly" component="TizenAPI/System/Power" execution_type="auto" id="PowerManager_isScreenOn_check_change">
<description>
<test_script_entry>/opt/tct-power-tizen-tests/power/PowerManager_isScreenOn_check_change.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="check if restoreScreenBrightness() method restores the screen brightness to the system default setting value" component="TizenAPI/System/Power" execution_type="manual" id="PowerManager_restoreScreenBrightness_check_effect">
+ <testcase purpose="Check if restoreScreenBrightness() method restores the screen brightness to the system default setting value" component="TizenAPI/System/Power" execution_type="manual" id="PowerManager_restoreScreenBrightness_check_effect">
<description>
<steps>
<step order="1">