<title>cordova_events_addEventListener_pause</title>
<meta charset="utf-8">
<script src="support/unitcommon.js"></script>
+<script src="support/event_common.js"></script>
<script src="../cordova/cordova.js"></script>
</head>
<body>
deviceReady = t.step_func(function() {
document.addEventListener("pause", onPause, true);
+ executeCommand(PAUSE_TEST_APP);
});
document.addEventListener("deviceready", deviceReady, true);
<title>cordova_events_addEventListener_resume</title>
<meta charset="utf-8">
<script src="support/unitcommon.js"></script>
+<script src="support/event_common.js"></script>
<script src="../cordova/cordova.js"></script>
</head>
<body>
deviceReady = t.step_func(function() {
document.addEventListener("resume", onResume, true);
+ executeCommand(RESUME_TEST_APP);
});
document.addEventListener("deviceready", deviceReady, true);
--- /dev/null
+/*
+
+Copyright (c) 2014 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:
+
+ */
+
+var PAUSE_TEST_APP = "aul_test pause events0001.CordovaAPIEvents";
+var RESUME_TEST_APP = "aul_test resume events0001.CordovaAPIEvents";
+
+function executeCommand(command) {
+ var toSend = {'cmd' : command};
+ var response = $.ajax({
+ type: "POST",
+ url: 'http://127.0.0.1:8000/execute_command',
+ async: false,
+ dataType: 'json',
+ data: toSend
+ });
+ //This log provides console output after executing shell command.
+ console.log(JSON.stringify(response));
+}
+
+document.write('<script src="../webrunner/jquery-1.10.2.min.js"></script>');
</specs>
</testcase>
- <testcase purpose="Check if cordova can addEventListener with event pause." type="compliance" status="approved" component="TizenAPI/CordovaPluginAPI/CordovaEvents" execution_type="manual" priority="P1" id="cordova_events_addEventListener_pause">
+ <testcase purpose="Check if cordova can addEventListener with event pause." type="compliance" status="approved" component="TizenAPI/CordovaPluginAPI/CordovaEvents" execution_type="auto" priority="P1" id="cordova_events_addEventListener_pause">
<description>
- <steps>
- <step order="1">
- <step_desc>Run the test and switch to a different application and then return to the test application.</step_desc>
- <expected>Pass.</expected>
- </step>
- </steps>
<test_script_entry>/opt/tct-events-cordova-tests/events/cordova_events_addEventListener_pause.html</test_script_entry>
</description>
<specs>
</specs>
</testcase>
- <testcase purpose="Check if cordova can addEventListener with event resume." type="compliance" status="approved" component="TizenAPI/CordovaPluginAPI/CordovaEvents" onload_delay="60" execution_type="manual" priority="P1" id="cordova_events_addEventListener_resume">
+ <testcase purpose="Check if cordova can addEventListener with event resume." type="compliance" status="approved" component="TizenAPI/CordovaPluginAPI/CordovaEvents" onload_delay="60" execution_type="auto" priority="P1" id="cordova_events_addEventListener_resume">
<description>
- <steps>
- <step order="1">
- <step_desc>Run the test and switch to a different application and then return to the test application.</step_desc>
- <expected>Pass.</expected>
- </step>
- </steps>
<test_script_entry>/opt/tct-events-cordova-tests/events/cordova_events_addEventListener_resume.html</test_script_entry>
</description>
<specs>
<test_script_entry>/opt/tct-events-cordova-tests/events/cordova_events_addEventListener_deviceready.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="Check if cordova can addEventListener with event pause." component="TizenAPI/CordovaPluginAPI/CordovaEvents" execution_type="manual" priority="P1" id="cordova_events_addEventListener_pause">
+ <testcase purpose="Check if cordova can addEventListener with event pause." component="TizenAPI/CordovaPluginAPI/CordovaEvents" execution_type="auto" priority="P1" id="cordova_events_addEventListener_pause">
<description>
- <steps>
- <step order="1">
- <step_desc>Run the test</step_desc>
- <expected>TC is running</expected>
- </step>
- <step order="2">
- <step_desc>Click the "power" button or switch to a different application and then return to the test application.</step_desc>
- <expected>TC is pass</expected>
- </step>
- </steps>
<test_script_entry>/opt/tct-events-cordova-tests/events/cordova_events_addEventListener_pause.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="Check if cordova can addEventListener with event resume." component="TizenAPI/CordovaPluginAPI/CordovaEvents" onload_delay="60" execution_type="manual" priority="P1" id="cordova_events_addEventListener_resume">
+ <testcase purpose="Check if cordova can addEventListener with event resume." component="TizenAPI/CordovaPluginAPI/CordovaEvents" onload_delay="60" execution_type="auto" priority="P1" id="cordova_events_addEventListener_resume">
<description>
- <steps>
- <step order="1">
- <step_desc>Run the test</step_desc>
- <expected>TC is running</expected>
- </step>
- <step order="2">
- <step_desc>Click the "power" button or switch to a different application and then return to the test application.</step_desc>
- <expected>TC is pass</expected>
- </step>
- </steps>
<test_script_entry>/opt/tct-events-cordova-tests/events/cordova_events_addEventListener_resume.html</test_script_entry>
</description>
</testcase>