Add group_feature_all_page_back 85/123585/2 submit/tizen/20170406.110952
authorEunyoung Lee <ey928.lee@samsung.com>
Thu, 6 Apr 2017 07:31:12 +0000 (16:31 +0900)
committerEunyoung Lee <ey928.lee@samsung.com>
Thu, 6 Apr 2017 10:49:33 +0000 (19:49 +0900)
Change-Id: I3fa05d6e1afb5f82aaaffe55bcbc9a7c610cea33

.cproject
inc/app_log.h
src/cluster_view.c
test/feature_test/feature_test.c [new file with mode: 0644]
test/feature_test/feature_test.h [new file with mode: 0644]
test/feature_test/group_feature_all_page_back.c [new file with mode: 0644]
test/test_main.c

index 954c927..6a21214 100755 (executable)
--- a/.cproject
+++ b/.cproject
                                                                <option defaultValue="gnu.cpp.compiler.debugging.level.max" id="sbi.gnu.cpp.compiler.option.debugging.level.core.481743771" name="Debug level" superClass="sbi.gnu.cpp.compiler.option.debugging.level.core" valueType="enumerated"/>
                                                                <option defaultValue="false" id="sbi.gnu.cpp.compiler.option.misc.pic.core.2102599528" name="-fPIC option" superClass="sbi.gnu.cpp.compiler.option.misc.pic.core" valueType="boolean"/>
                                                                <option id="sbi.gnu.cpp.compiler.option.1070320025" name="Tizen-Target" superClass="sbi.gnu.cpp.compiler.option" valueType="userObjs">
-                                                                       <listOptionValue builtIn="false" value="mobile-3.0-emulator.core_llvm37.i386.core.app"/>
+                                                                       <listOptionValue builtIn="false" value="mobile-3.0-emulator.core.private.20170328_1_llvm37.i386.core.app"/>
                                                                </option>
                                                                <option id="sbi.gnu.cpp.compiler.option.frameworks_inc.core.312288874" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.cpp.compiler.option.frameworks_inc.core" valueType="includePath">
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/libxml2&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/EGL&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/GLES&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/GLES2&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/GLES3&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/KHR&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/SDL2&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appcore/&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appcore-agent&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appfw&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/attach-panel&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/aul/&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/auth-fw&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/badge&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/base&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/cairo&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/calendar-service2&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/call-manager&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/cbhm&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/chromium-ewk&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ckm&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efl-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efl-extension&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efreet-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/EGL&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eina-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eina-1/eina&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eio-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eldbus-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/elementary-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/email-service&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/embryo-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/emile-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eo-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/freetype2&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/geofence&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/gio-unix-2.0&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/GLES&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/GLES2&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/GLES3&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/glib-2.0&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/harfbuzz&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/iotcon&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/json-glib-1.0&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/KHR&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/location&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/maps&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/media&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/metadata-editor&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/minicontrol&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/minizip&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/msg-service&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/network&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/notification&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/nsd/&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/phonenumber-utils&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/pkgmgr&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/rua/&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/SDL2&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/sensor&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/service-adaptor&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/shortcut&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/storage&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/system&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/telephony&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/telephony-client&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/tzsh&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ug-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ui&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ui-viewmgr&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/vconf&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/vulkan&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/web&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_service&quot;"/>
                                                                <option defaultValue="gnu.c.debugging.level.max" id="sbi.gnu.c.compiler.option.debugging.level.core.247638963" name="Debug level" superClass="sbi.gnu.c.compiler.option.debugging.level.core" valueType="enumerated"/>
                                                                <option defaultValue="false" id="sbi.gnu.c.compiler.option.misc.pic.core.982331969" name="-fPIC option" superClass="sbi.gnu.c.compiler.option.misc.pic.core" valueType="boolean"/>
                                                                <option id="sbi.gnu.c.compiler.option.1644890019" name="Tizen-Target" superClass="sbi.gnu.c.compiler.option" valueType="userObjs">
-                                                                       <listOptionValue builtIn="false" value="mobile-3.0-emulator.core_llvm37.i386.core.app"/>
+                                                                       <listOptionValue builtIn="false" value="mobile-3.0-emulator.core.private.20170328_1_llvm37.i386.core.app"/>
                                                                </option>
                                                                <option id="sbi.gnu.c.compiler.option.frameworks_inc.core.1483034184" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.c.compiler.option.frameworks_inc.core" valueType="includePath">
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/libxml2&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/EGL&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/GLES&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/GLES2&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/GLES3&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/KHR&quot;"/>
-                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/SDL2&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appcore/&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appcore-agent&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appfw&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/attach-panel&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/aul/&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/auth-fw&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/badge&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/base&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/cairo&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/calendar-service2&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/call-manager&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/cbhm&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/chromium-ewk&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ckm&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efl-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efl-extension&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efreet-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/EGL&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eina-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eina-1/eina&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eio-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eldbus-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/elementary-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/email-service&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/embryo-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/emile-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eo-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/freetype2&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/geofence&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/gio-unix-2.0&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/GLES&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/GLES2&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/GLES3&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/glib-2.0&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/harfbuzz&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/iotcon&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/json-glib-1.0&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/KHR&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/location&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/maps&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/media&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/metadata-editor&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/minicontrol&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/minizip&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/msg-service&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/network&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/notification&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/nsd/&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/phonenumber-utils&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/pkgmgr&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/rua/&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/SDL2&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/sensor&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/service-adaptor&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/shortcut&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/storage&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/system&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/telephony&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/telephony-client&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/tzsh&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ug-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ui&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ui-viewmgr&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/vconf&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/vulkan&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/web&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_service&quot;"/>
index 1388dce..3aca464 100644 (file)
@@ -5,10 +5,9 @@
 
 #include "test.h"
 
-#ifdef  LOG_TAG
-#undef  LOG_TAG
+#ifndef  LOG_TAG
+#define LOG_TAG "HOMESCREEN_EFL"
 #endif
-#define LOG_TAG "TEST_UNIT"
 
 #ifndef __MODULE__
 #define __MODULE__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
@@ -17,6 +16,7 @@
 #define LOG_(prio, tag, fmt, arg...) ({ dlog_print(prio, tag, "%s: %s(%d) > " fmt, __MODULE__, __func__, __LINE__, ##arg); })
 
 #if (TEST_MODE == TEST_UNIT)
+#include "../test/unit/inc/unit.h"
 #define TEST_APP_LOG_TAG "TEST_APP"
 #define TEST_UNIT_LOG_TAG "TEST_UNIT"
 #define __D(format, arg...) LOG_(DLOG_DEBUG, LOG_TAG, format, ##arg)
@@ -25,6 +25,7 @@
 #define __T(format, arg...) ({ dlog_print(DLOG_DEBUG, TEST_APP_LOG_TAG, format, ##arg); unit_write_log(format, ##arg); })
 #define __TU(format, arg...) LOG_(DLOG_DEBUG, TEST_UNIT_LOG_TAG, format, ##arg)
 #elif (TEST_MODE == TEST_APP)
+#include "../test/unit/inc/unit.h"
 #define TEST_APP_LOG_TAG "TEST_APP"
 #define __D(format, arg...) ({ dlog_print(DLOG_DEBUG, LOG_TAG, format, ##arg); unit_write_log(format, ##arg); })
 #define __I(format, arg...) LOG_(DLOG_INFO, LOG_TAG, format, ##arg)
index 0f58972..9b70f7e 100755 (executable)
@@ -21,6 +21,7 @@
 #include "conf.h"
 #include "edc_conf.h"
 #include "util.h"
+#include "app_log.h"
 #include "page_indicator.h"
 #include "widget_viewer.h"
 #include "menu.h"
@@ -100,7 +101,7 @@ static mouse_info_t cluster_mouse_info = {
        .pressed_obj = NULL,
 };
 
-//#define SCROLL_TIMING_ISSUE
+#define SCROLL_TIMING_ISSUE
 #ifdef SCROLL_TIMING_ISSUE
 #define SCROLL_TIMING_INTERVAL 0.001
 
@@ -414,6 +415,19 @@ view_state_t cluster_view_get_state(void)
        return cluster_view_s.view_state;
 }
 
+#ifdef SCROLL_TIMING_ISSUE
+static Eina_Bool __cluster_view_close_all_page(void *data)
+{
+       __cluster_view_destroy_all_page();
+       __cluster_view_scroll_to_page(cluster_view_s.current_page, false);
+
+       evas_object_show(cluster_view_s.scroller);
+
+       __scroll_timing_timer = NULL;
+       return ECORE_CALLBACK_CANCEL;
+}
+#endif
+
 bool cluster_view_set_state(view_state_t state)
 {
        if (cluster_view_s.is_srolling) {
@@ -492,12 +506,13 @@ bool cluster_view_set_state(view_state_t state)
                        elm_win_indicator_mode_set(homescreen_efl_get_win(), ELM_WIN_INDICATOR_SHOW);
                        homescreen_efl_btn_show(HOMESCREEN_VIEW_HOME);
                        page_indicator_show(cluster_view_s.indicator);
-                       evas_object_show(cluster_view_s.scroller);
-                       __cluster_view_destroy_all_page();
+                       evas_object_hide(cluster_view_s.scroller);
+
 
                        Eina_List *find_list = NULL;
 
                        cluster_page_t *page_item = NULL;
+
                        elm_box_unpack_all(cluster_view_s.box);
                        EINA_LIST_FOREACH(cluster_view_s.page_list, find_list, page_item) {
                                if (page_item->page_layout) {
@@ -516,7 +531,19 @@ bool cluster_view_set_state(view_state_t state)
                        if (cluster_view_s.current_page >= cluster_view_s.page_count) {
                                cluster_view_s.current_page = CLUSTER_HOME_PAGE;
                        }
+
+#ifdef SCROLL_TIMING_ISSUE
+                       if (__scroll_timing_timer) {
+                               ecore_timer_del(__scroll_timing_timer);
+                               __scroll_timing_timer = NULL;
+                       }
+                       __scroll_timing_timer = ecore_timer_add(SCROLL_TIMING_INTERVAL, __cluster_view_close_all_page, NULL);
+#else
+                       __cluster_view_destroy_all_page();
                        __cluster_view_scroll_to_page(cluster_view_s.current_page, false);
+
+                       evas_object_show(cluster_view_s.scroller);
+#endif
                }
        } else if (state == VIEW_STATE_ADD_VIEWER) {
                add_widget_viewer_win_create();
@@ -737,42 +764,19 @@ static void __cluster_view_scroll_to_home(void)
        __cluster_view_scroll_to_page(CLUSTER_HOME_PAGE, true);
 }
 
-#ifdef SCROLL_TIMING_ISSUE
-static Eina_Bool __cluster_view_scroll_show_page(void *data)
-{
-       int page_idx = *((int*)data);
-       page_indicator_set_current_page(cluster_view_s.indicator, page_idx);
-       LOGD("show %d page", page_idx);
-       elm_scroller_page_show(cluster_view_s.scroller, page_idx, 0);
-       __cluster_view_scroll_stop(NULL);
-
-       return ECORE_CALLBACK_CANCEL;
-}
-#endif
-
 static void __cluster_view_scroll_to_page(int page_idx, bool animation)
 {
        __cluster_view_scroll_start();
 
        if (animation) {
-               LOGD("bring in %d page", page_idx);
+               __D("bring in %d page", page_idx);
                elm_scroller_page_bring_in(cluster_view_s.scroller, page_idx, 0);
        } else {
-#ifdef SCROLL_TIMING_ISSUE
-               static int __page_idx = 0;
-               __page_idx = page_idx;
-
-               if (__scroll_timing_timer) {
-                       ecore_timer_del(__scroll_timing_timer);
-                       __scroll_timing_timer = NULL;
-               }
-               __scroll_timing_timer = ecore_timer_add(SCROLL_TIMING_INTERVAL, __cluster_view_scroll_show_page, &__page_idx);
-#else
                page_indicator_set_current_page(cluster_view_s.indicator, page_idx);
                LOGD("show %d page", page_idx);
+
                elm_scroller_page_show(cluster_view_s.scroller, page_idx, 0);
                __cluster_view_scroll_stop(NULL);
-#endif
        }
 }
 
@@ -1771,3 +1775,24 @@ static Eina_Bool __cluster_view_scroll_timer_cb(void *data)
        __cluster_view_scroll_to_page(next_page_idx, true);
        return ECORE_CALLBACK_RENEW;
 }
+
+#include "test.h"
+#if TEST_MODE
+void __t__cluster_view_scroll_to_page(int page_idx, bool animation)
+{
+       __cluster_view_scroll_to_page(page_idx, animation);
+}
+int __t__cluster_view_get_current_page(void)
+{
+       return cluster_view_s.current_page;
+}
+Evas_Object * __t__cluster_view_get_scroller(void)
+{
+       return cluster_view_s.scroller;
+}
+cluster_page_t *__t__cluster_view_page_new(void)
+{
+       __cluster_view_page_new();
+}
+
+#endif
diff --git a/test/feature_test/feature_test.c b/test/feature_test/feature_test.c
new file mode 100644 (file)
index 0000000..e7e8be9
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test.h"
+#if TEST_MODE
+
+#include "feature_test.h"
+
+#include <Elementary.h>
+
+static const int TEST_GROUP_COUNT = 1;
+
+static void __complete_group_cb(void);
+static void __run_next_group(void);
+
+static struct {
+       int current_group;
+       char group_name[TEST_GROUP_COUNT + 1][128];
+       void(*group_starter_pool[TEST_GROUP_COUNT + 1])(unit_group_t * group);
+} s_info = {
+       .current_group = 0,
+       .group_name = {
+                                       "group_feature_all_page_back",
+                                       ""
+                               },
+       .group_starter_pool = {
+                                       group_feature_all_page_back,
+                                       NULL,
+                               },
+};
+
+static void __complete_group_cb(void)
+{
+       s_info.current_group += 1;
+
+       __run_next_group();
+}
+
+static void __run_next_group(void)
+{
+       if (s_info.group_starter_pool[s_info.current_group] == NULL) {
+               unit_fini();
+
+               return ;
+       }
+
+       TEST_GROUP(s_info.group_name[s_info.current_group], s_info.group_starter_pool[s_info.current_group], __complete_group_cb);
+}
+
+void feature_test(void)
+{
+       unit_clear_log();
+
+       s_info.current_group = 0;
+
+       __run_next_group();
+}
+
+#endif
+
diff --git a/test/feature_test/feature_test.h b/test/feature_test/feature_test.h
new file mode 100644 (file)
index 0000000..92bd866
--- /dev/null
@@ -0,0 +1,15 @@
+#ifndef __FEATURE_TEST__
+#define __FEATURE_TEST__
+
+#include "test.h"
+#if TEST_MODE
+
+#include "../unit/inc/unit.h"
+
+void feature_test(void);
+void group_feature_all_page_back(unit_group_t * group);
+
+#endif
+
+#endif
+
diff --git a/test/feature_test/group_feature_all_page_back.c b/test/feature_test/group_feature_all_page_back.c
new file mode 100644 (file)
index 0000000..36ae03f
--- /dev/null
@@ -0,0 +1,168 @@
+#include "test.h"
+#if TEST_MODE
+
+#include "feature_test.h"
+#include "cluster_view.h"
+#include "view.h"
+#include "homescreen-efl.h"
+
+#include <Elementary.h>
+#include <string.h>
+
+extern void __t__cluster_view_scroll_to_page(int page_idx, bool animation);
+extern int __t__cluster_view_get_current_page();
+extern Evas_Object * __t__cluster_view_get_scroller(void);
+extern cluster_page_t *__t__cluster_view_page_new(void);
+
+static const int CASE_COUNT = 6;
+static void __case_scroll_to_page(bool * is_passed);
+static void __case_scroll_to_2_page(bool * is_passed);
+static void __case_show_all_page(bool * is_passed);
+static void __case_click_back_key(bool * is_passed);
+
+static struct {
+       Ecore_Timer * group_timer;
+       unit_group_t * group;
+       int current_case;
+       void(*case_pool[CASE_COUNT + 1])(bool * is_passed);
+} s_info = {
+       .group_timer = NULL,
+       .group = NULL,
+       .current_case = 0,
+       .case_pool = {
+                                       __case_scroll_to_page,
+                                       __case_scroll_to_2_page,
+                                       __case_show_all_page,
+                                       __case_click_back_key,
+                                       __case_show_all_page,
+                                       __case_click_back_key,
+                                       NULL,
+                               },
+};
+
+static Eina_Bool __group_timer_callback(void * data);
+
+static void __set_up(void) { unit_clear_log(); }
+static void __tear_down(void) { unit_clear_log(); }
+
+static void __case_scroll_to_page(bool * is_passed)
+{
+       __t__cluster_view_scroll_to_page(0, false);
+       TEST_ASSERT_EQUAL_INT(0, __t__cluster_view_get_current_page());
+
+       __t__cluster_view_scroll_to_page(1, false);
+       TEST_ASSERT_EQUAL_INT(1, __t__cluster_view_get_current_page());
+
+       __t__cluster_view_scroll_to_page(2, false);
+       TEST_ASSERT_EQUAL_INT(2, __t__cluster_view_get_current_page());
+
+       __t__cluster_view_scroll_to_page(3, false);
+       TEST_ASSERT_EQUAL_INT(3, __t__cluster_view_get_current_page());
+
+       __t__cluster_view_scroll_to_page(5, false);
+       TEST_ASSERT_EQUAL_INT(5, __t__cluster_view_get_current_page());
+
+       __t__cluster_view_scroll_to_page(2, false);
+       TEST_ASSERT_EQUAL_INT(2, __t__cluster_view_get_current_page());
+
+       __t__cluster_view_scroll_to_page(0, false);
+       TEST_ASSERT_EQUAL_INT(0, __t__cluster_view_get_current_page());
+
+       Evas_Object * scroller = __t__cluster_view_get_scroller();
+       elm_scroller_page_show(scroller, 0, 0);
+       int page = -1;
+       elm_scroller_current_page_get(scroller, &page, NULL);
+       TEST_ASSERT_EQUAL_INT(0, page);
+
+       elm_scroller_page_show(scroller, 1, 0);
+       elm_scroller_current_page_get(scroller, &page, NULL);
+       TEST_ASSERT_EQUAL_INT(1, page);
+
+       elm_scroller_page_show(scroller, 3, 0);
+       elm_scroller_current_page_get(scroller, &page, NULL);
+       TEST_ASSERT_EQUAL_INT(3, page);
+
+       *is_passed = true;
+
+}
+
+static void __case_scroll_to_2_page(bool * is_passed)
+{
+       __t__cluster_view_scroll_to_page(1, true);
+
+       char buf[1024] = { 0, };
+       strcat(buf, "bring in 1 page\n");
+       TEST_ASSERT_EQUAL_LOG(buf);
+
+       *is_passed = true;
+}
+
+static void __case_show_all_page(bool * is_passed)
+{
+       Evas_Object * scroller = __t__cluster_view_get_scroller();
+
+       TEST_ASSERT_TRUE(evas_object_visible_get(scroller) == EINA_TRUE);
+       TEST_ASSERT_EQUAL_INT(VIEW_STATE_NORMAL, cluster_view_get_state());
+       TEST_ASSERT_EQUAL_INT(1, __t__cluster_view_get_current_page());
+
+       cluster_view_set_state(VIEW_STATE_ALL_PAGE);
+
+       TEST_ASSERT_EQUAL_INT(VIEW_STATE_ALL_PAGE, cluster_view_get_state());
+
+       *is_passed = true;
+}
+
+static void __case_click_back_key(bool * is_passed)
+{
+       TEST_ASSERT_EQUAL_INT(VIEW_STATE_ALL_PAGE, cluster_view_get_state());
+       TEST_ASSERT_EQUAL_INT(1, __t__cluster_view_get_current_page());
+
+       homescreen_efl_hw_back_key_release();
+
+       TEST_ASSERT_EQUAL_INT(VIEW_STATE_NORMAL, cluster_view_get_state());
+       TEST_ASSERT_EQUAL_INT(1, __t__cluster_view_get_current_page());
+
+       Evas_Object * scroller = __t__cluster_view_get_scroller();
+       TEST_ASSERT_TRUE(evas_object_visible_get(scroller) == EINA_FALSE);
+
+       *is_passed = true;
+}
+
+void group_feature_all_page_back(unit_group_t * group)
+{
+       __t__cluster_view_page_new();
+       __t__cluster_view_page_new();
+       __t__cluster_view_page_new();
+       __t__cluster_view_page_new();
+       __t__cluster_view_page_new();
+       __t__cluster_view_page_new();
+       __t__cluster_view_page_new();
+
+
+       if (s_info.group_timer) {
+               ecore_timer_del(s_info.group_timer);
+               s_info.group_timer = NULL;
+       }
+
+       s_info.current_case = 0;
+       s_info.group = group;
+       s_info.group_timer = ecore_timer_add(1.5, __group_timer_callback, NULL);
+}
+
+static Eina_Bool __group_timer_callback(void * data)
+{
+       if (s_info.case_pool[s_info.current_case] == NULL) {
+               s_info.group->finish(s_info.group);
+
+               s_info.group_timer = NULL;
+               return ECORE_CALLBACK_CANCEL;
+       }
+
+       TEST_CASE(s_info.group, s_info.case_pool[s_info.current_case]);
+       s_info.current_case += 1;
+
+       return ECORE_CALLBACK_RENEW;
+}
+
+#endif
+
index af7971f..6cd6b55 100755 (executable)
@@ -4,18 +4,40 @@
 #include "unit/inc/unit.h"
 #include "app_log.h"
 #include "homescreen-efl.h"
+#include "feature_test/feature_test.h"
 
-static void __test_app_resume_cb(void *data)
+static struct {
+       Ecore_Timer * feature_test_run_timer;
+} s_info = {
+       .feature_test_run_timer = NULL,
+};
+
+static Eina_Bool __run_timer_callback(void * data);
+
+static Eina_Bool __run_timer_callback(void * data)
 {
-       __homescreen_efl_app_resume_cb(data);
+       feature_test();
+
+       s_info.feature_test_run_timer = NULL;
+       return ECORE_CALLBACK_CANCEL;
 }
 
-int main(int argc, char *argv[])
+static void __test_app_resume_cb(void *data)
 {
+       __homescreen_efl_app_resume_cb(data);
+
+       if (s_info.feature_test_run_timer) {
+               ecore_timer_del(s_info.feature_test_run_timer);
+               s_info.feature_test_run_timer = NULL;
+       }
 
        unit_init();
 
-       // test go go
+       s_info.feature_test_run_timer = ecore_timer_add(0.2, __run_timer_callback, NULL);
+}
+
+int main(int argc, char *argv[])
+{
        __D("Starting homescreen-efl");
 
        int ret = 0;
@@ -38,10 +60,6 @@ int main(int argc, char *argv[])
        if (ret != APP_ERROR_NONE)
                __E("ui_app_main() is failed. err = %d", ret);
 
-       //main_info.view_type = HOMESCREEN_VIEW_HOME;
-
-       unit_fini();
-
        return ret;
 }