5 Copyright (c) 2017 Samsung Electronics Co., Ltd.
7 Licensed under the Apache License, Version 2.0 (the License);
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
11 http://www.apache.org/licenses/LICENSE-2.0
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
20 Xiaoyan Qian <xy.qian@samsung.com>
26 <title>NotificationManager_createNotificationFromTemplate</title>
27 <meta charset="utf-8">
28 <script src="support/unitcommon.js"></script>
34 //==== TEST: NotificationManager_createNotificationFromTemplate
35 //==== LABEL Check if NotificationManager createNotificationFromTemplate method works properly
36 //==== SPEC Tizen Web API:Application:Notification:NotificationManager:createNotificationFromTemplate M
39 //==== TEST_CRITERIA MR
42 add_result_callback(function () {
44 tizen.notification.removeAll();
46 // do nothing in case removeAll throw an exception
50 var notificationDict, notification, retVal;
52 content: "This is a simple notification.",
53 iconPath: "images/webapi-tizen-notification-test_image1.jpg",
54 soundPath: "music/webapi-tizen-notification-test_noise1.mp3"
56 notification = new tizen.StatusNotification("SIMPLE", "Simple notification", notificationDict);
57 tizen.notification.saveNotificationAsTemplate("SIMPLE_TEMPLATE", notification);
58 retVal = tizen.notification.createNotificationFromTemplate("SIMPLE_TEMPLATE");
59 assert_true(retVal instanceof tizen.StatusNotification, "object was not get properly");