<script type="text/javascript">
//==== TEST: PowerManager_turnScreenOff_successful
//==== LABEL Check if turnScreenOff method works correctly
-//==== EXECUTION_TYPE manual
-//==== STEP Click 'Run'
-//==== EXPECT The screen should be turned off
-//==== STEP Unlock the screen and display the test application
-//==== EXPECT The result should be 'Pass'
//==== 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
//==== PRIORITY P1
var t = async_test(document.title, {timeout: 90000}), powerMgr = tizen.power, isScreenOn, changeCallback;
t.step(function () {
changeCallback = t.step_func(function (previousState, changedState) {
+ isScreenOn = powerMgr.isScreenOn();
assert_not_equals(previousState, changedState, "Screen States should be different.");
assert_false(isScreenOn, "The screen should be turned off");
t.done();
powerMgr.turnScreenOn();
setTimeout(t.step_func(function () {
powerMgr.setScreenStateChangeListener(changeCallback);
+ powerMgr.turnScreenOff();
}), 500);
- powerMgr.turnScreenOff();
- isScreenOn = powerMgr.isScreenOn();
});
</script>
<script type="text/javascript">
//==== TEST: PowerManager_turnScreenOn_successful
//==== LABEL Check if turnScreenOn method works correctly
-//==== EXECUTION_TYPE manual
-//==== STEP Click 'Run'
-//==== EXPECT The screen should be turned locked
-//==== STEP Unlock the screen and display the test application
-//==== EXPECT The result should be 'Pass'
//==== 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
//==== PRIORITY P1
t.step(function () {
changeCallback = t.step_func(function (previousState, changedState) {
+ isScreenOn = tizen.power.isScreenOn();
assert_not_equals(previousState, changedState, "Screen States should be different.");
assert_true(isScreenOn, "The screen should be turned on");
t.done();
tizen.power.turnScreenOff();
setTimeout(t.step_func(function () {
tizen.power.setScreenStateChangeListener(changeCallback);
+ tizen.power.turnScreenOn();
}), 500);
- tizen.power.turnScreenOn();
- isScreenOn = tizen.power.isScreenOn();
});
</script>
<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="Tizen Device APIs/System/Power" execution_type="manual" priority="P1" id="PowerManager_turnScreenOn_successful">
+ <testcase purpose="Check if turnScreenOn method works correctly" component="Tizen Device APIs/System/Power" execution_type="auto" priority="P1" id="PowerManager_turnScreenOn_successful">
<description>
- <steps>
- <step order="1">
- <step_desc>Click 'Run'</step_desc>
- <expected>The screen should be turned locked</expected>
- </step>
- <step order="2">
- <step_desc>Unlock the screen and display the test application</step_desc>
- <expected>The result should be 'Pass'</expected>
- </step>
- </steps>
<test_script_entry>/opt/tct-power-tizen-tests/power/PowerManager_turnScreenOn_successful.html</test_script_entry>
</description>
</testcase>
<test_script_entry>/opt/tct-power-tizen-tests/power/PowerManager_turnScreenOff_extra_argument.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="Check if turnScreenOff method works correctly" component="Tizen Device APIs/System/Power" execution_type="manual" priority="P1" id="PowerManager_turnScreenOff_successful">
+ <testcase purpose="Check if turnScreenOff method works correctly" component="Tizen Device APIs/System/Power" execution_type="auto" priority="P1" id="PowerManager_turnScreenOff_successful">
<description>
- <steps>
- <step order="1">
- <step_desc>Click 'Run'</step_desc>
- <expected>The screen should be turned off</expected>
- </step>
- <step order="2">
- <step_desc>Unlock the screen and display the test application</step_desc>
- <expected>The result should be 'Pass'</expected>
- </step>
- </steps>
<test_script_entry>/opt/tct-power-tizen-tests/power/PowerManager_turnScreenOff_successful.html</test_script_entry>
</description>
</testcase>