apply FSL(Flora Software License)
[framework/messaging/msg-service.git] / TC / msgTC / MapiMessage / utc_msg_mms_set_rootlayout.c
1  /*
2   * Copyright 2012  Samsung Electronics Co., Ltd
3   *
4   * Licensed under the Flora License, Version 1.0 (the "License");
5   * you may not use this file except in compliance with the License.
6   * You may obtain a copy of the License at
7   *
8   *    http://www.tizenopensource.org/license
9   *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16
17 #include "utc_msg_mms_set_rootlayout.h"
18
19 static MSG_HANDLE_T msgHandle = NULL;
20 msg_message_t msgInfo;
21 MMS_MESSAGE_DATA_S*      mms_data;
22
23 void startup(void)
24 {
25         MSG_ERROR_T err = MSG_SUCCESS;
26         MMS_PAGE_S*     page[2];
27         MMS_MEDIA_S*    media[5];
28
29         err = msg_open_msg_handle(&msgHandle);
30         if (err != MSG_SUCCESS)
31         {
32                 tet_result(TET_FAIL);
33                 return;
34         }
35
36         msgInfo = msg_new_message();
37         mms_data = msg_mms_create_message();
38 }
39 void cleanup(void)
40 {
41         msg_mms_destroy_message(mms_data);
42         msg_close_msg_handle(&msgHandle);
43 }
44
45 void utc_msg_mms_set_rootlayout_001()
46 {
47         MSG_ERROR_T err = MSG_SUCCESS;
48
49         MMS_SMIL_ROOTLAYOUT* pLayout = msg_mms_set_rootlayout(mms_data, 100, 100, 0xffffff);
50         if (pLayout == NULL)
51         {
52                 tet_result(TET_FAIL);
53                 return;
54         }
55
56         tet_result(TET_PASS);
57 }
58
59 void utc_msg_mms_set_rootlayout_002()
60 {
61         MSG_ERROR_T err = MSG_SUCCESS;
62
63         MMS_SMIL_ROOTLAYOUT* pLayout = msg_mms_set_rootlayout(NULL, 100, 100, 0xffffff);
64         if (pLayout == NULL)
65         {
66                 tet_result(TET_PASS);
67                 return;
68         }
69
70         tet_result(TET_FAIL);
71 }