bfc3be5b6ffb09b6f2f5eebfa8b044d0369b8115
[test/tct/web/api.git] /
1 <!DOCTYPE html>
2 <!--
3
4 Copyright (c) 2017 Samsung Electronics Co., Ltd.
5
6 Licensed under the Apache License, Version 2.0 (the License);
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10     http://www.apache.org/licenses/LICENSE-2.0
11
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17
18
19
20 Authors:
21         Xiaoyan Qian <xy.qian@samsung.com>
22
23 -->
24 <html>
25
26 <head>
27 <title>UserNotification_constructor_progessValue_0_PERCENTAGE</title>
28 <script src="support/unitcommon.js"></script>
29 <script src="support/notification_common.js"></script>
30 </head>
31 <body>
32 <div id="log"></div>
33 <script>
34
35 //==== TEST: UserNotification_constructor_progessValue_0_PERCENTAGE
36 //==== LABEL Check if UserNotification's constructor works for progressValue=0 and progressType=PERCENTAGE
37 //==== SPEC Tizen Web API:User Interface:Notification:UserNotification:constructor C
38 //==== SPEC_URL TBD
39 //==== PRIORITY P1
40 //==== TEST_CRITERIA CONSTRM CONSTRA
41
42 test(function () {
43     var notificationDict, userNotification, userNotificationType = "PROGRESS",
44         titleToSet = "Title", progressValueToSet = 0, progressTypeToSet = "PERCENTAGE";
45
46     notificationDict = {
47         textContents:
48         {
49             progressValue : progressValueToSet,
50             progressType: progressTypeToSet
51         }
52     };
53     userNotification = new tizen.UserNotification(userNotificationType, titleToSet, notificationDict);
54
55     assert_true(userNotification instanceof tizen.UserNotification, "StatusNotification instanceOf.");
56
57     assert_equals(userNotification.textContents.progressType, progressTypeToSet, "progressType attribute.");
58     assert_equals(userNotification.textContents.progressValue, progressValueToSet, "progressValue attribute.");
59 }, document.title);
60
61 </script>
62 </body>
63 </html>