elm_object: use gengrid instead of list in focus_region_show_mode test 66/201266/1
authorYeongjong Lee <yj34.lee@samsung.com>
Tue, 12 Mar 2019 04:07:05 +0000 (13:07 +0900)
committerYeongjong Lee <yj34.lee@samsung.com>
Tue, 12 Mar 2019 04:12:41 +0000 (13:12 +0900)
elm_object_focus_region_show_mode only works on gengrid.
In order to proper unit test, list widget is replaced with gengrid widget.

Change-Id: Ie19f96f53ada0d9c029ff39e614197fa394e6df7

TC/elementary/elm_object/utc_elm_object_focus_region_show_mode.c

index b0e3a8ba5c5eb8f6a357b9c8ad45f4e3eb13fecb..b0a45c9c2f7cdfd9d2534d0684d31ec71d65c383 100644 (file)
@@ -44,19 +44,19 @@ teardown(void)
  * @{
  * @objective Positive Test case checks if function sets/gets the focus region show mode to a given elemenatry object
  * and without segmentation fault
- * @li the list object
+ * @li the gengrid object
  * @li ELM_FOCUS_REGION_SHOW_WIDGET, ELM_FOCUS_REGION_SHOW_ITEM the mode to show the focus region
  *
  * @procedure
- * @step 1 Create list object
- * @step 2 Append a new item to the list object
- * @step 3 Set focus to the list object
+ * @step 1 Create gengrid object
+ * @step 2 Append a new item to the gengrid object
+ * @step 3 Set focus to the gengrid object
  * @step 4 Call elm_object_focus_region_show_mode_set function to set the focus region show mode
- * ELM_FOCUS_REGION_SHOW_WIDGET a list object
+ * ELM_FOCUS_REGION_SHOW_WIDGET a gengrid object
  * @step 5 Call elm_object_focus_region_show_mode_get function to get the focus region show mode
  * and check on ELM_FOCUS_REGION_SHOW_WIDGET
  * @step 6 Call elm_object_focus_region_show_mode_set function to set the focus region show mode
- * ELM_FOCUS_REGION_SHOW_ITEM a list object
+ * ELM_FOCUS_REGION_SHOW_ITEM a gengrid object
  * @step 7 Call elm_object_focus_region_show_mode_get function to get the focus region show mode
  * and check on ELM_FOCUS_REGION_SHOW_ITEM
  *
@@ -66,23 +66,25 @@ teardown(void)
  */
 START_TEST(utc_elm_object_focus_region_show_mode_p)
 {
-   Evas_Object *list = elm_list_add(main_win);
-   if (!list)
+   Evas_Object *gengrid = elm_gengrid_add(main_win);
+   Elm_Gengrid_Item_Class *gic = elm_gengrid_item_class_new();
+   gic->item_style = "default";
+   if (!gengrid)
      {
         ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
      }
-   evas_object_focus_set(list, EINA_TRUE);
+   evas_object_focus_set(gengrid, EINA_TRUE);
 
-   elm_list_item_append(list, "first", NULL, NULL, NULL, NULL);
+   elm_gengrid_item_append(gengrid, gic, NULL, NULL, NULL);
 
-   elm_object_focus_region_show_mode_set(list, ELM_FOCUS_REGION_SHOW_WIDGET);
-   if (elm_object_focus_region_show_mode_get(list) != ELM_FOCUS_REGION_SHOW_WIDGET)
+   elm_object_focus_region_show_mode_set(gengrid, ELM_FOCUS_REGION_SHOW_WIDGET);
+   if (elm_object_focus_region_show_mode_get(gengrid) != ELM_FOCUS_REGION_SHOW_WIDGET)
      {
         ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
      }
 
-   elm_object_focus_region_show_mode_set(list, ELM_FOCUS_REGION_SHOW_ITEM);
-   if (elm_object_focus_region_show_mode_get(list) != ELM_FOCUS_REGION_SHOW_ITEM)
+   elm_object_focus_region_show_mode_set(gengrid, ELM_FOCUS_REGION_SHOW_ITEM);
+   if (elm_object_focus_region_show_mode_get(gengrid) != ELM_FOCUS_REGION_SHOW_ITEM)
      {
         ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
      }