summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-08-20 09:11:07 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-08-20 09:11:07 -0400
commit563ad2a650b3df258a234776e1ff5d260d815755 (patch)
tree2d45edaca53bf6f442210ed9750b242dbb641272 /src/tests
parentebae12f06a944259b9b4c094bdb009c6391c67ea (diff)
tests/popup: make text alert sizing test even more strict
Summary: ensure that the internal label size is not wider than the scroller text alerts should never need to scroll horizontally, so ensure that this does not break Reviewers: bu5hm4n Reviewed By: bu5hm4n Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9589
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/elementary/efl_ui_test_popup.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/tests/elementary/efl_ui_test_popup.c b/src/tests/elementary/efl_ui_test_popup.c
index df9208d47b..7bd0ad1909 100644
--- a/src/tests/elementary/efl_ui_test_popup.c
+++ b/src/tests/elementary/efl_ui_test_popup.c
@@ -503,9 +503,9 @@ EFL_START_TEST(efl_ui_test_popup_text_alert)
503 for (i = 0; i < num_tests; i++) 503 for (i = 0; i < num_tests; i++)
504 { 504 {
505 unsigned int j; 505 unsigned int j;
506 Eina_Size2D popup_sz_min, popup_sz, label_sz_min; 506 Eina_Size2D popup_sz_min, popup_sz, label_sz_min, label_sz, scroller_sz;
507 Eina_Strbuf *buf = eina_strbuf_new(); 507 Eina_Strbuf *buf = eina_strbuf_new();
508 Eo *label; 508 Eo *label, *scroller;
509 509
510 for (j = 0; j < string_counts[i]; j++) 510 for (j = 0; j < string_counts[i]; j++)
511 eina_strbuf_append(buf, test_string); 511 eina_strbuf_append(buf, test_string);
@@ -515,7 +515,15 @@ EFL_START_TEST(efl_ui_test_popup_text_alert)
515 efl_canvas_group_calculate(popup); 515 efl_canvas_group_calculate(popup);
516 516
517 /* get internal label object: VERY illegal */ 517 /* get internal label object: VERY illegal */
518 label = efl_content_get(efl_content_get(efl_part(efl_super(popup, efl_ui_text_alert_popup_class_get()), "efl.content"))); 518 scroller = efl_content_get(efl_part(efl_super(popup, efl_ui_text_alert_popup_class_get()), "efl.content"));
519 label = efl_content_get(scroller);
520
521 /* label should never be larger than scroller horizontally
522 * ...but we give it an extra pixel because that's how it's always been
523 */
524 label_sz = efl_gfx_entity_size_get(label);
525 scroller_sz = efl_gfx_entity_size_get(scroller);
526 ck_assert_int_le(label_sz.w, scroller_sz.w + 1);
519 527
520 label_sz_min = efl_gfx_hint_size_combined_min_get(label); 528 label_sz_min = efl_gfx_hint_size_combined_min_get(label);
521 popup_sz_min = efl_gfx_hint_size_combined_min_get(popup); 529 popup_sz_min = efl_gfx_hint_size_combined_min_get(popup);