apps focus text : 3 lines 75/145075/3
authorYoungHun Cho <hoon.cho@samsung.com>
Mon, 21 Aug 2017 06:41:52 +0000 (15:41 +0900)
committerYoungHun Cho <hoon.cho@samsung.com>
Mon, 21 Aug 2017 06:59:32 +0000 (15:59 +0900)
Change-Id: I15c08ad52e59861a6cedde339bf4832efea2ac04

CMakeLists.txt
res/edje/circle/apps_base_layout_circle.edc
src/apps/apps_view_circle.c
src/moments/moments_control_view.c
src/widget.c
test/feature_test/feature_test.c
test/feature_test/feature_test.h
test/feature_test/group_feature_apps_focus_text.c [new file with mode: 0755]
test/test_function.h

index 73a2d78b5c863d72bc2c7e707fa0f54d6c019b26..3719099afabb0b229f61ce203303a2870c44a73a 100755 (executable)
@@ -236,6 +236,7 @@ ADD_EXECUTABLE(${PROJECT_NAME}
        test/feature_test/group_feature_moments_controls_state.c
        test/feature_test/group_feature_moments_control_button_status_behavior.c
        test/feature_test/group_feature_moments_center_layout_show.c
+       test/feature_test/group_feature_apps_focus_text.c
 
        test/unit/unit_assert.c
        test/unit/unit.c
index d0de33edf478f8d1954bed35039dbb1fd8fbe308..4751b491b944990c25b224dd684699cf51a71ee4 100755 (executable)
@@ -48,8 +48,8 @@ collections {
                                type: TEXTBLOCK;
                                description {
                                        state: "default" 0.0;
-                                       rel1 { relative: 0.291 0.348; to: SIZE_SETTER; }
-                                       rel2 { relative: 0.708 0.638; to: SIZE_SETTER; }
+                                       rel1 { relative: 0.291 0.291; to: SIZE_SETTER; }
+                                       rel2 { relative: 0.708 0.708; to: SIZE_SETTER; }
                                        color: 255 255 255 255;
                                        visible: 1;
                                        fixed: 1 1;
index 5e15e8c17403b62a7c36060330957812c7d4ab39..dfc7975a85989c97e81e6d7fc335f39ea4c1905f 100755 (executable)
@@ -572,3 +572,12 @@ static void __read_focus_text(void)
        free(markup_str);
 }
 
+#include "test.h"
+#if TEST_MODE
+void __t__set_focus_text(char *label)
+{
+       __set_focus_text(label);
+}
+
+#endif
+
index 9b8cc8fb4df93917c34a102dc478b77946853b18..3909d1df9dd99493347ee536ddebf510dcf949e9 100755 (executable)
@@ -101,7 +101,7 @@ void moments_control_init(void)
        moments_control_brightness_status_changed_cb(NULL, NULL);
        moments_control_do_not_disturb_status_changed_cb(NULL, NULL);
        moments_control_flight_mode_status_changed_cb(NULL, NULL);
-       moments_control_volume_status_changed_cb(0, NULL, NULL);
+       moments_control_volume_status_changed_cb(0, 0, NULL);
 }
 
 void moments_control_fini(void)
@@ -196,6 +196,7 @@ __fail:
 control_info_t *moments_control_create_button(Evas_Object *base_layout, int button_id)
 {
        control_info_t *button = (control_info_t *)malloc(sizeof(control_info_t));
+       if (button == NULL) return NULL;
 
        button->index = control_button_list[button_id].index;
        button->btn_type = control_button_list[button_id].btn_type;
@@ -341,7 +342,7 @@ static void __set_state_stand_alone(void)
        moments_control_clear_button_list();
 
        control_info_t *brightness_button = moments_control_create_button(s_info.control_layout, MOMENTS_CONTROLS_BRIGHTNESS);
-       moments_control_push_to_button_list(brightness_button );
+       moments_control_push_to_button_list(brightness_button);
 
        control_info_t *do_not_disturb_button = moments_control_create_button(s_info.control_layout, MOMENTS_CONTROLS_DO_NOT_DISTURB);
        moments_control_push_to_button_list(do_not_disturb_button);
index aed39605199e8d571f29d8622dbfd7f7143089ff..1a01284f1fd76a755b5e3acbedb6ecf5ca9f3aa1 100755 (executable)
@@ -528,7 +528,6 @@ static void _widget_scroll_cb(void *data, Evas_Object *scroller, void *event_inf
 {
        Evas_Object *current_page = NULL;
        page_info_s *page_info = NULL;
-       const char *widget_instance_id = NULL;
 
        current_page = scroller_get_focused_page(scroller);
        ret_if(!current_page);
index 07caaaf71e75c43624fc5106c1c722edc684c574..de0b761287b645dc67e4c7f95d2ee2719a7c802a 100755 (executable)
@@ -39,6 +39,7 @@ void feature_test(void)
        TEST_GROUP_ADD("group_feature_moments_controls_state", group_feature_moments_controls_state);
        TEST_GROUP_ADD("group_feature_moments_control_button_status_behavior", group_feature_moments_control_button_status_behavior);
        TEST_GROUP_ADD("group_feature_moments_center_layout_show", group_feature_moments_center_layout_show);
+       TEST_GROUP_ADD("group_feature_apps_focus_text", group_feature_apps_focus_text);
 
        TEST_RUN(__test_complete_cb);
 }
index 97867e3ba99dcd9dd03844aa7ec42dd8b9827d0c..3f5095a87c511839b5f4340c80c50f330d55b677 100755 (executable)
@@ -36,6 +36,8 @@ void group_feature_moments_controls_show(unit_group_t * group);
 void group_feature_moments_controls_state(unit_group_t * group);
 void group_feature_moments_control_button_status_behavior(unit_group_t * group);
 void group_feature_moments_center_layout_show(unit_group_t * group);
+void group_feature_apps_focus_text(unit_group_t * group);
+
 
 #endif
 
diff --git a/test/feature_test/group_feature_apps_focus_text.c b/test/feature_test/group_feature_apps_focus_text.c
new file mode 100755 (executable)
index 0000000..1c30b45
--- /dev/null
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "test.h"
+#if TEST_MODE
+
+#include "feature_test.h"
+#include "../test_function.h"
+#include "apps/apps.h"
+
+static struct {
+       unit_group_t * group;
+} s_info = {
+       .group = NULL,
+};
+
+static void __group_set_up(void)
+{
+       apps_show();
+
+       TEST_GROUP_SET_UP_DONE(0.5, s_info.group);
+}
+
+static void __group_tear_down(void)
+{
+       apps_hide();
+
+       TEST_GROUP_TEAR_DOWN_DONE(2.0, s_info.group);
+}
+
+static void __set_up(void)
+{
+       s_info.group->set_up_complete(s_info.group);
+}
+
+static void __tear_down(void)
+{
+       s_info.group->tear_down_complete(s_info.group);
+}
+
+static unit_case_func_t __continue_case_done(void * data)
+{
+       TEST_CASE_DONE(s_info.group);
+}
+
+static unit_case_func_t __case_check_one_line(void * data)
+{
+       __t__set_focus_text("Kkkkkkkk");
+
+       TEST_CASE_CONTINUE(2.0, __continue_case_done, data);
+}
+
+static unit_case_func_t __case_check_two_line(void * data)
+{
+       __t__set_focus_text("Kkkkkkkk Kkkkkkkk");
+
+       TEST_CASE_CONTINUE(2.0, __continue_case_done, data);
+}
+
+static unit_case_func_t __case_check_three_line(void * data)
+{
+       __t__set_focus_text("Kkkkkkkk Kkkkkkkk Kkkkkkkk");
+
+       TEST_CASE_CONTINUE(2.0, __continue_case_done, data);
+}
+
+static unit_case_func_t __case_check_four_line(void * data)
+{
+       __t__set_focus_text("Kkkkkkkk Kkkkkkkk Kkkkkkkk Kkkkkkkk");
+
+       TEST_CASE_CONTINUE(2.0, __continue_case_done, data);
+}
+
+void group_feature_apps_focus_text(unit_group_t * group)
+{
+       s_info.group = group;
+       s_info.group->set_up = __set_up;
+       s_info.group->tear_down = __tear_down;
+
+       TEST_GROUP_SET_UP(s_info.group, __group_set_up);
+       TEST_CASE_ADD(s_info.group, __case_check_one_line, NULL);
+       TEST_CASE_ADD(s_info.group, __case_check_two_line, NULL);
+       TEST_CASE_ADD(s_info.group, __case_check_three_line, NULL);
+       TEST_CASE_ADD(s_info.group, __case_check_four_line, NULL);
+
+       TEST_GROUP_TEAR_DOWN(s_info.group, __group_tear_down);
+
+       TEST_GROUP_RUN(s_info.group);
+}
+
+
+#endif
+
+
index b19edbf6d842a898cdc90432748e750e237e8b35..955a2ce7645fcc6a97f1e6acd7f3824ba2bf6a00 100755 (executable)
@@ -89,6 +89,8 @@ extern void __t__set_moments_control_volume_level(int level);
 extern int __t__get_moments_control_volume_level();
 extern void __t__set_moments_control_brightness_level(int level);
 extern int __t__get_moments_control_brightness_level(void);
+
+extern void __t__set_focus_text(char *label);
 #endif
 
 #endif