summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/elementary/efl_ui_test_widget.c12
-rw-r--r--src/tests/elementary/efl_ui_test_win.c12
-rw-r--r--src/tests/elementary/elm_test_win.c13
-rw-r--r--src/tests/elementary/suite_helpers.c2
4 files changed, 30 insertions, 9 deletions
diff --git a/src/tests/elementary/efl_ui_test_widget.c b/src/tests/elementary/efl_ui_test_widget.c
index 23118fee86..74e8f2eac9 100644
--- a/src/tests/elementary/efl_ui_test_widget.c
+++ b/src/tests/elementary/efl_ui_test_widget.c
@@ -19,8 +19,7 @@ static void
19_small_ui(State *s) 19_small_ui(State *s)
20{ 20{
21 s->win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), 21 s->win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
22 efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), 22 efl_text_set(efl_added, "Hello World"));
23 efl_text_set(efl_added, "Hello World"));
24 23
25 s->ic = efl_add(EFL_UI_IMAGE_CLASS, s->win, 24 s->ic = efl_add(EFL_UI_IMAGE_CLASS, s->win,
26 efl_ui_win_icon_object_set(s->win, efl_added)); 25 efl_ui_win_icon_object_set(s->win, efl_added));
@@ -233,8 +232,7 @@ EFL_START_TEST(efl_ui_test_widget_parent_relation)
233 Efl_Ui_Win *win, *w1, *w2, *w3; 232 Efl_Ui_Win *win, *w1, *w2, *w3;
234 233
235 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), 234 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
236 efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), 235 efl_text_set(efl_added, "Hello World"));
237 efl_text_set(efl_added, "Hello World"));
238 //first check the initial state 236 //first check the initial state
239 w1 = efl_add(efl_ui_widget_realized_class_get(), win); 237 w1 = efl_add(efl_ui_widget_realized_class_get(), win);
240 ck_assert_ptr_eq(efl_ui_widget_parent_get(w1), win); 238 ck_assert_ptr_eq(efl_ui_widget_parent_get(w1), win);
@@ -257,8 +255,7 @@ EFL_START_TEST(efl_ui_test_widget_disabled_parent)
257 Efl_Ui_Win *win, *w1, *w2, *t; 255 Efl_Ui_Win *win, *w1, *w2, *t;
258 256
259 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), 257 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
260 efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), 258 efl_text_set(efl_added, "Hello World"));
261 efl_text_set(efl_added, "Hello World"));
262 //first check the initial state 259 //first check the initial state
263 w1 = efl_add(efl_ui_widget_realized_class_get(), win); 260 w1 = efl_add(efl_ui_widget_realized_class_get(), win);
264 efl_ui_widget_disabled_set(w1, EINA_TRUE); 261 efl_ui_widget_disabled_set(w1, EINA_TRUE);
@@ -293,8 +290,7 @@ EFL_START_TEST(efl_ui_test_widget_disabled_behaviour)
293 Efl_Ui_Win *win, *w1, *w2, *t; 290 Efl_Ui_Win *win, *w1, *w2, *t;
294 291
295 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), 292 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
296 efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), 293 efl_text_set(efl_added, "Hello World"));
297 efl_text_set(efl_added, "Hello World"));
298 //first check the initial state 294 //first check the initial state
299 w1 = efl_add(efl_ui_widget_realized_class_get(), win); 295 w1 = efl_add(efl_ui_widget_realized_class_get(), win);
300 efl_ui_widget_disabled_set(w1, EINA_TRUE); 296 efl_ui_widget_disabled_set(w1, EINA_TRUE);
diff --git a/src/tests/elementary/efl_ui_test_win.c b/src/tests/elementary/efl_ui_test_win.c
index 4e61e5bff2..2d893be5bb 100644
--- a/src/tests/elementary/efl_ui_test_win.c
+++ b/src/tests/elementary/efl_ui_test_win.c
@@ -433,6 +433,17 @@ EFL_START_TEST(efl_ui_win_test_efl_input_interface_pointer_cancel)
433 ck_assert_int_eq(called, 2); 433 ck_assert_int_eq(called, 2);
434} 434}
435EFL_END_TEST 435EFL_END_TEST
436
437EFL_START_TEST(efl_ui_win_test_type)
438{
439 Efl_Ui_Win *win;
440
441 win = win_add();
442
443 ck_assert_int_eq(efl_ui_win_type_get(win), EFL_UI_WIN_TYPE_BASIC);
444}
445EFL_END_TEST
446
436void 447void
437efl_ui_test_win(TCase *tc) 448efl_ui_test_win(TCase *tc)
438{ 449{
@@ -447,4 +458,5 @@ efl_ui_test_win(TCase *tc)
447 tcase_add_test(tc, efl_ui_win_test_efl_input_interface_pointer_in_out); 458 tcase_add_test(tc, efl_ui_win_test_efl_input_interface_pointer_in_out);
448 tcase_add_test(tc, efl_ui_win_test_efl_input_interface_pointer_wheel); 459 tcase_add_test(tc, efl_ui_win_test_efl_input_interface_pointer_wheel);
449 tcase_add_test(tc, efl_ui_win_test_efl_input_interface_pointer_cancel); 460 tcase_add_test(tc, efl_ui_win_test_efl_input_interface_pointer_cancel);
461 tcase_add_test(tc, efl_ui_win_test_type);
450} 462}
diff --git a/src/tests/elementary/elm_test_win.c b/src/tests/elementary/elm_test_win.c
index dc335bff68..e90a31a4b6 100644
--- a/src/tests/elementary/elm_test_win.c
+++ b/src/tests/elementary/elm_test_win.c
@@ -465,6 +465,18 @@ EFL_START_TEST(elm_win_test_rotation)
465} 465}
466EFL_END_TEST 466EFL_END_TEST
467 467
468EFL_START_TEST(elm_win_test_default_type)
469{
470 Evas_Object *win;
471
472 win = elm_win_add(NULL, "test win default type", ELM_WIN_UNKNOWN);
473 ck_assert_int_eq(elm_win_type_get(win), ELM_WIN_UNKNOWN);
474
475 win = elm_win_util_standard_add("test win default type", "test");
476 ck_assert_int_eq(elm_win_type_get(win), ELM_WIN_BASIC);
477}
478EFL_END_TEST
479
468void elm_test_win(TCase *tc) 480void elm_test_win(TCase *tc)
469{ 481{
470 tcase_add_test(tc, elm_win_legacy_type_check); 482 tcase_add_test(tc, elm_win_legacy_type_check);
@@ -475,6 +487,7 @@ void elm_test_win(TCase *tc)
475 tcase_add_test(tc, elm_win_test_app_exit_on_windows_close); 487 tcase_add_test(tc, elm_win_test_app_exit_on_windows_close);
476 tcase_add_test(tc, efl_ui_win_multi_touch_inputs); 488 tcase_add_test(tc, efl_ui_win_multi_touch_inputs);
477 tcase_add_test(tc, elm_win_test_rotation); 489 tcase_add_test(tc, elm_win_test_rotation);
490 tcase_add_test(tc, elm_win_test_default_type);
478#ifdef HAVE_ELEMENTARY_X 491#ifdef HAVE_ELEMENTARY_X
479 tcase_add_test(tc, elm_win_autohide); 492 tcase_add_test(tc, elm_win_autohide);
480 tcase_add_test(tc, elm_win_autohide_and_policy_quit_last_window_hidden); 493 tcase_add_test(tc, elm_win_autohide_and_policy_quit_last_window_hidden);
diff --git a/src/tests/elementary/suite_helpers.c b/src/tests/elementary/suite_helpers.c
index 81da3813f6..d4204ef79e 100644
--- a/src/tests/elementary/suite_helpers.c
+++ b/src/tests/elementary/suite_helpers.c
@@ -201,7 +201,7 @@ _elm_suite_win_create()
201 if (legacy_mode) 201 if (legacy_mode)
202 win = elm_win_add(NULL, "elm_suite", ELM_WIN_BASIC); 202 win = elm_win_add(NULL, "elm_suite", ELM_WIN_BASIC);
203 else 203 else
204 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC)); 204 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get());
205 if (!buffer) return win; 205 if (!buffer) return win;
206 loop = efl_add(efl_loop_realized_class_get(), win); 206 loop = efl_add(efl_loop_realized_class_get(), win);
207 timer = efl_add(EFL_LOOP_TIMER_CLASS, loop, 207 timer = efl_add(EFL_LOOP_TIMER_CLASS, loop,