13534e18af2b88d71e20c4e05c1e5c5df1991db2
[test/tct/web/api.git] /
1 <!DOCTYPE html>
2 <!--
3 Copyright (c) 2018 Samsung Electronics Co., Ltd.
4
5 Licensed under the Apache License, Version 2.0 (the License);
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
8
9     http://www.apache.org/licenses/LICENSE-2.0
10
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16
17 Authors:
18         Zhongyuan Yuan <zy123.yuan@samsung.com>
19
20 -->
21 <html>
22 <head>
23 <title>StressMonitorCallback_onsuccess</title>
24 <meta charset="utf-8"/>
25 <meta name="timeout" content="long"/>
26 <script src="support/unitcommon.js"></script>
27 </head>
28 <body>
29 <div id="log"></div>
30 <script>
31 //==== TEST: StressMonitorCallback_onsuccess
32 //==== LABEL Test whether StressMonitorCallback::onsuccess() is called with argument of proper type
33 //==== SPEC Tizen Web API:Sensor:HumanActivityMonitor:StressMonitorCallback:onsuccess M
34 //==== SPEC_URL TBD
35 //==== PRIORITY P1
36 //==== EXECUTION_TYPE manual
37 //==== STEP
38 //==== EXPECT Pass should be shown in the page
39 //==== TEST_CRITERIA CBT CBOA
40
41 setup({timeout: 90000});
42
43 var t = async_test(document.title, {timeout: 90000}), watchID = null, listener, range, humanActivityType = "STRESS_MONITOR";
44
45 t.step(function () {
46     add_result_callback(function () {
47         tizen.humanactivitymonitor.removeStressMonitorChangeListener(watchID);
48     });
49
50     range = [new tizen.StressMonitorDataRange()];
51
52     listener = t.step_func(function (label) {
53         assert_type(label, "string", "label is not string type");
54         t.done();
55     });
56
57     tizen.humanactivitymonitor.start(humanActivityType);
58     watchID = tizen.humanactivitymonitor.addStressMonitorChangeListener(range, listener);
59 });
60 </script>
61 </body>
62 </html>