summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorWooHyun Jung <wh0705.jung@samsung.com>2019-08-20 09:09:14 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-08-20 09:09:14 -0400
commitebae12f06a944259b9b4c094bdb009c6391c67ea (patch)
tree5e4dc38924b23a99e40688f2cda8a02a9605fdf6 /src/tests
parent81a7b792359eb21f7318d0de7d52ac7c0a0f995c (diff)
elm_slider: remove dependency with efl_ui_slider
Summary: This commit includes follwoing works. 1. change parent class from EFL_UI_SLIDER_INTERVAL to EFL_UI_LAYOUT_BASE 2. get all necessary codes from efl_ui_slider and efl_ui_slider_interval to elm_slider 3. add callbacks to slider test code ref T7893 Test Plan: 1. elementary_test 2. slider 3. operate sliders on the window Reviewers: bu5hm4n, segfaultxavi, eagleeye, zmike Reviewed By: zmike Subscribers: zmike, cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7893 Differential Revision: https://phab.enlightenment.org/D9623
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/elementary/elm_test_slider.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/tests/elementary/elm_test_slider.c b/src/tests/elementary/elm_test_slider.c
index 76201fa305..337b75444c 100644
--- a/src/tests/elementary/elm_test_slider.c
+++ b/src/tests/elementary/elm_test_slider.c
@@ -98,6 +98,10 @@ slider_changed(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_U
98 if (event_counter == 1) 98 if (event_counter == 1)
99 evas_object_smart_callback_del(obj, "changed", slider_changed); 99 evas_object_smart_callback_del(obj, "changed", slider_changed);
100 else if (event_counter == 2) 100 else if (event_counter == 2)
101 evas_object_smart_callback_del(obj, "slider,drag,start", slider_changed);
102 else if (event_counter == 3)
103 evas_object_smart_callback_del(obj, "slider,drag,stop", slider_changed);
104 else if (event_counter == 4)
101 ecore_main_loop_quit(); 105 ecore_main_loop_quit();
102} 106}
103 107
@@ -112,6 +116,8 @@ EFL_START_TEST(elm_slider_events)
112 slider = elm_slider_add(win); 116 slider = elm_slider_add(win);
113 evas_object_smart_callback_add(slider, "changed", slider_changed, NULL); 117 evas_object_smart_callback_add(slider, "changed", slider_changed, NULL);
114 evas_object_smart_callback_add(slider, "delay,changed", slider_changed, NULL); 118 evas_object_smart_callback_add(slider, "delay,changed", slider_changed, NULL);
119 evas_object_smart_callback_add(slider, "slider,drag,start", slider_changed, NULL);
120 evas_object_smart_callback_add(slider, "slider,drag,stop", slider_changed, NULL);
115 evas_object_show(slider); 121 evas_object_show(slider);
116 evas_object_show(win); 122 evas_object_show(win);
117 evas_object_resize(slider, 400, 100); 123 evas_object_resize(slider, 400, 100);
@@ -131,7 +137,7 @@ EFL_START_TEST(elm_slider_events)
131 evas_event_feed_mouse_move(e, sx + (sw / 2), sy + (sh / 2), 0, NULL); 137 evas_event_feed_mouse_move(e, sx + (sw / 2), sy + (sh / 2), 0, NULL);
132 evas_event_feed_mouse_up(e, 1, 0, 0, NULL); 138 evas_event_feed_mouse_up(e, 1, 0, 0, NULL);
133 ecore_main_loop_begin(); 139 ecore_main_loop_begin();
134 ck_assert_int_eq(event_counter, 2); 140 ck_assert_int_eq(event_counter, 4);
135} 141}
136EFL_END_TEST 142EFL_END_TEST
137 143