[controlbar] fix TC build error
[framework/uifw/elementary.git] / TC / elm_ts / controlbar / utc_UIFW_elm_controlbar_tool_item_insert_before_func.c
index e77ce4b..facbf22 100644 (file)
@@ -1,5 +1,6 @@
 #include <tet_api.h>
 #include <Elementary.h>
+#define ICON_DIR "usr/share/elementary/images"
 
 // Definitions
 // For checking the result of the positive test case.
@@ -55,8 +56,8 @@ static void startup(void)
        tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
        elm_init(0, NULL);
        main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
-       evas_object_show(main_win);     
-       
+       evas_object_show(main_win);
+
        controlbar = elm_controlbar_add(main_win);
 }
 
@@ -70,7 +71,7 @@ static void cleanup(void)
                evas_object_del(controlbar);
                controlbar = NULL;
        }
-       
+
        elm_shutdown();
        tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
 }
@@ -80,10 +81,13 @@ static void cleanup(void)
  */
 static void utc_UIFW_elm_controlbar_tool_item_insert_before_func_01(void)
 {
+       char buf[255];
+
        Elm_Controlbar_Item *item = NULL;
        Elm_Controlbar_Item *item2 = NULL;
-       item = elm_controlbar_tool_item_append(controlbar, CONTROLBAR_SYSTEM_ICON_SONGS, "Songs", NULL, NULL);
-       item2 = elm_controlbar_tool_item_insert_before(controlbar, item, CONTROLBAR_SYSTEM_ICON_SONGS, "Songs", NULL, NULL);
+       snprintf(buf, sizeof(buf), "%s/logo_small.png", ICON_DIR);
+       item = elm_controlbar_tool_item_append(controlbar, buf, "Songs", NULL, NULL);
+       item2 = elm_controlbar_tool_item_insert_before(controlbar, item, buf, "Songs", NULL, NULL);
 
        if (!item2) {
                tet_infoline("elm_controlbar_tool_item_insert_before() failed in positive test case");
@@ -98,11 +102,14 @@ static void utc_UIFW_elm_controlbar_tool_item_insert_before_func_01(void)
  */
 static void utc_UIFW_elm_controlbar_tool_item_insert_before_func_02(void)
 {
+       char buf[255];
+
        Elm_Controlbar_Item *item = NULL;
        Elm_Controlbar_Item *item2 = NULL;
-       item = elm_controlbar_tool_item_append(controlbar, CONTROLBAR_SYSTEM_ICON_SONGS, "Songs", NULL, NULL);
-       item2 = elm_controlbar_tool_item_insert_before(controlbar, NULL, CONTROLBAR_SYSTEM_ICON_SONGS, "Songs", NULL, NULL);
-       
+       snprintf(buf, sizeof(buf), "%s/logo_small.png", ICON_DIR);
+       item = elm_controlbar_tool_item_append(controlbar, buf, "Songs", NULL, NULL);
+       item2 = elm_controlbar_tool_item_insert_before(controlbar, NULL, buf, "Songs", NULL, NULL);
+
        if (item2) {
                tet_infoline("elm_controlbar_tool_item_insert_before() failed in negative test case");
                tet_result(TET_FAIL);