Commit Graph

676 Commits

Author SHA1 Message Date
Carsten Haitzler 6c9784b918 elm - test - disable 2 negative tests that are failing to fail
efl ui suite passes now
@fix
2022-01-04 14:13:32 +00:00
Carsten Haitzler ebd8632dba elm test - disabble elm mpa focus tes - map widget is disabled
,map is broken - it has been for ages so its been disabled, disable in
test.
2022-01-04 14:06:49 +00:00
Carsten Haitzler f817041d69 elm test - disable excess video tests - gst freezes internally
gst seems to multi-init even tho we avoid it or something... when you
don't fork check. disable all but 1 video test then.

@fix
2022-01-04 14:06:06 +00:00
Carsten Haitzler 4ccbe49b92 elm tests - disable toggle test - changed theme
fix tests to pass

@fix
2022-01-04 13:34:28 +00:00
Marcel Hollerbach 665d62485b tests: fix efl_ui_suite 2021-04-01 15:22:57 +02:00
Carsten Haitzler ff73049593 efl ui tests - disable cursor movement test as some systems have issues
i just want travis to pass again for now...
2020-12-29 20:42:18 +00:00
Carsten Haitzler b8cccbdd95 efl ui test - set cursor pos compare right 2020-12-28 21:57:12 +00:00
Carsten Haitzler 2f1795d8bc efl ui tests - for now use plain ascii to test if travis fail bc of fnt 2020-12-28 20:56:52 +00:00
abdulleh Ghujeh d6a6dd54a1 efl.ui.text : Fixing cursor movement using keyboard arrows/mouse click
Summary:
if we have an emoji or a cluster combining multiple Unicode inside ui textbox, we can move the cursor inside the emoji/cluster using keyboard arrows/mouse click.
so we should use cluster movement instead of character movement (same as entry).

{F3868931}

this should resolve T8666

Test Plan:
  #define EFL_EO_API_SUPPORT 1
  #define EFL_BETA_API_SUPPORT 1

  #include <Efl_Ui.h>

  static void
  _gui_quit_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
  {
     efl_exit(0);
  }

  static void
  _gui_setup()
  {
     Eo *win, *box;

     win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
                   efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
                   efl_text_set(efl_added, "Hello World"),
                   efl_ui_win_autodel_set(efl_added, EINA_TRUE));

     // when the user clicks "close" on a window there is a request to delete
     efl_event_callback_add(win, EFL_UI_WIN_EVENT_DELETE_REQUEST, _gui_quit_cb, NULL);

     box = efl_add(EFL_UI_BOX_CLASS, win,
                  efl_content_set(win, efl_added),
                  efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(360, 240)));

     efl_add(EFL_UI_TEXTBOX_CLASS, box,
             efl_gfx_hint_weight_set(efl_added, 1.0, 1.0),
             efl_gfx_hint_align_set(efl_added, 1.0, 1.0),
             efl_text_markup_set(efl_added, "A&#x262a;&#xfe0f;"),
             efl_pack(box, efl_added));
  }

  EAPI_MAIN void
  efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
  {
     _gui_setup();
  }
  EFL_MAIN()

Reviewers: ali.alzyod, zmike, woohyun, bu5hm4n

Reviewed By: ali.alzyod, woohyun

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8666

Differential Revision: https://phab.enlightenment.org/D11745
2020-10-20 19:20:28 +09:00
Ali Alzyod 3bd066c7db evas_textblock: prevent textnodes with <ps>/<br> without format node
this will prevent textnodes content with <ps> or <br> without format node

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12145
2020-09-16 14:40:55 +02:00
Carsten Haitzler 603102577b tests - efl ui config - use proepr elm enums for elm apis 2020-08-25 13:21:25 +01:00
Carsten Haitzler c984939762 tests - elm spinner - use proper elm enum - warning fix 2020-08-25 13:21:25 +01:00
Carsten Haitzler 125986e27b tests - elm slider - fix possile use of uninit var warning 2020-08-25 13:21:25 +01:00
Ali Alzyod eed4068fa2 evas_textblock: myanmar script rendering with e vowel.
Summary: Resolve rendering e vowel (0x1031) with Myanmar(Burmese) with zero width non joiner (0x200C)

Test Plan: ninja test

Reviewers: woohyun, bowonryu

Reviewed By: bowonryu

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12102
2020-08-18 19:15:12 +09:00
Ali Alzyod f126c7f06c efl_ui_textbox: preserve changing user color set
Summary:
setting color inside the constructor call will be override in theme apply because it happen later.
txt = efl_add(EFL_UI_TEXTBOX_CLASS, win,
               efl_text_color_set(efl_added, 0, 255, 0, 255));

Now we will preserve user choice, to not change it during theme apply.

Test Plan: ninja test

Reviewers: woohyun, bu5hm4n, zmike, segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11942
2020-08-05 13:33:03 +09:00
Ali Alzyod 45c6212d20 elm_entry/efl.ui.textbox: use common key shortcuts
Summary:
**key** value comes from keyboard down callbacks are common, regardless of language/layout but **keyname** is dependent on layout(in X11, in Wayland Can not be produced).
This common fix for both.

For example if keyboard layout in arabic then:
Ctrl+A  will not work (in X11)

This one enhances D11606

Reviewers: woohyun, bu5hm4n, zmike

Reviewed By: woohyun

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11695
2020-08-05 11:32:11 +09:00
Stefan Schmidt b4f5d65259 tests: elm: check return of efl_config_bool_set
Make sure we fail the test, unless this settign succeed.

CID: 1403891

Reviewed-by: Christopher Michael <devilhorns@comcast.net>
Differential Revision: https://phab.enlightenment.org/D11968
2020-06-11 16:31:01 +02:00
Bowon Ryu f4cf46e9b5 edje: markup flag should be TRUE in legacy edje_object_part_text_set
Summary:
Through some APIs (elm_entry_editable_set, elm_entry_single_line_set, etc.)
located after edje_object_part_text_set(legacy)

If efl_ui_widget_theme_apply is called,
In edje_object_part_text_raw_generic_set, the legacy flag becomes FALSE.
And in this case, the logic works in the unintended direction
because the set_markup flag is FALSE.

Test Plan:
/*
gcc -o entry_example entry.c `pkg-config --cflags --libs elementary`
 */
#include <Elementary.h>

EAPI_MAIN int
elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
{
   Evas_Object *win, *en;

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   win = elm_win_util_standard_add("entry-example", "test");
   elm_win_autodel_set(win, EINA_TRUE);
   en = elm_entry_add(win);
   evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   elm_object_part_text_set(en, "elm.guide", "<font_size=32 color=#FFF>TEST</font_size>");
   elm_entry_editable_set(en, EINA_FALSE);

   evas_object_show(en);

   elm_object_content_set(win, en);
   evas_object_resize(win, 300, 200);
   evas_object_show(win);

   elm_run();

   return 0;
}
ELM_MAIN()

Reviewers: woohyun, ali.alzyod

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11868
2020-06-05 14:26:22 +09:00
Ali Alzyod ff3d3b1944 efl_access_text: remove ptr usage in eo files
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11907
2020-06-02 08:07:48 +02:00
Marcel Hollerbach 8e3606698e refactor build
libraries are split into deps, external deps, and pub deps.
Evas engines are refactored to use the predefined engine deps.

this is preparation work for efl-one.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11806
2020-05-27 11:06:46 +02:00
Vincent Torri bf65520a42 elm test: include evil_private.h to declare realpath() on Windows
Reviewers: raster, zmike

Reviewed By: raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11872
2020-05-23 15:00:56 +01:00
Mike Blumenkrantz e0cf299ae5 tests: resolve float comparison warnings
Summary: Depends on D11788

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11789
2020-05-09 09:25:14 +01:00
Mike Blumenkrantz 882e4cd50f tests/elm: add callback testing to image memfile test
Summary:
verify that ready is called (preload done) and error is not called

ref D11758

Reviewers: Hermet, jsuya, kimcinoo

Reviewed By: Hermet

Subscribers: stefan_schmidt, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11760
2020-05-08 10:45:27 +09:00
Mike Blumenkrantz 55c2ffbe42 tests/elm: add more naviframe tests
some tests to explicitly verify callback and internal behavior

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11752
2020-04-28 13:48:35 +02:00
Mike Blumenkrantz 03d56674c3 tests/elm: add util callback for capturing event_info in smart callbacks
useful when we want to verify that e.g., a certain object item is passed

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11751
2020-04-28 13:48:33 +02:00
Mike Blumenkrantz faed679d53 tests/elm: add some more specific convenience macros for size checks
sometimes a test might only want to verify the width or height of an object

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11750
2020-04-28 13:48:31 +02:00
Mike Blumenkrantz c6a9574f10 tests/elm: check all objects for signal interface before calling signal funcs
just being extra paranoid here since there's some classes which implement
some layout/content interfaces without implementing signals

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11749
2020-04-28 13:48:29 +02:00
Mike Blumenkrantz c622bd2e23 tests/elm: add a list sizing test
basic test to ensure that list sizing is homogeneous and works as it
"should", even though list sizing internals are a black hole of lost time
and dreams

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11748
2020-04-28 13:29:34 +02:00
Mike Blumenkrantz e2365a0ed3 tests/elm: add image tests to verify internal object size is clamped to object size
ensure that this doesn't break again

ref 11587

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11599
2020-04-17 11:53:47 +02:00
Mike Blumenkrantz 8e1e1e5cf8 tests/elm: explicitly destroy hoversel while active
verify that there's no errors when this happens

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11704
2020-04-16 14:34:07 +02:00
Mike Blumenkrantz 2797827e6b tests/elm: add hoversel test to verify edge of canvas positioning
ensure that T8642 doesn't reoccur

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11647
2020-04-16 14:34:07 +02:00
Mike Blumenkrantz 034d42855b tests/elm: add hoversel behavior tests
this verifies all smart callbacks for a hoversel to ensure they're triggered
as expected

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11644
2020-04-16 14:34:07 +02:00
Mike Blumenkrantz 276c9ed26d tests/elm: add callback tests for elm_list
basic tests to verify behavior for triggering callbacks when selecting items

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11703
2020-04-16 14:34:07 +02:00
Ali Alzyod da36015148 evas_textblock : fix text insertion & selection with ps in single line
Summary:
when we have text that contains <ps> (example "p1<ps>p2") in a single line mode
and the cursor position is after the ps tag
then we try to insert any character using the keyboard it will show segmentation fault.
also with the same text if we try to select the text we will notice that it is corrupted.

this should resolve https://phab.enlightenment.org/T8594

Test Plan:
  #define EFL_EO_API_SUPPORT 1
  #define EFL_BETA_API_SUPPORT 1

  #include <Eina.h>
  #include <Elementary.h>
  #include <Efl_Ui.h>

  static void
  _gui_quit_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
  {
     efl_exit(0);
  }

  static void
  _gui_setup()
  {
     Eo *win, *box;

     win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
                   efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
                   efl_text_set(efl_added, "Hello World"),
                   efl_ui_win_autodel_set(efl_added, EINA_TRUE));

     // when the user clicks "close" on a window there is a request to delete
     efl_event_callback_add(win, EFL_UI_WIN_EVENT_DELETE_REQUEST, _gui_quit_cb, NULL);

     box = efl_add(EFL_UI_BOX_CLASS, win,
                  efl_content_set(win, efl_added),
                  efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(360, 240)));

     Eo *text = efl_add(EFL_UI_TEXTBOX_CLASS, box,
             efl_gfx_hint_weight_set(efl_added, 1.0, 1.0),
             efl_gfx_hint_align_set(efl_added, 1.0, 1.0),
             efl_pack(box, efl_added));

             efl_text_interactive_selection_allowed_set(text, EINA_TRUE);
             efl_text_multiline_set(text,EINA_FALSE);

             efl_text_markup_set(text, "p1<ps>p2");
  }

  EAPI_MAIN void
  efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
  {
     _gui_setup();
  }
  EFL_MAIN()

Reviewers: ali.alzyod, woohyun, zmike, bu5hm4n, segfaultxavi, stefan_schmidt

Reviewed By: ali.alzyod, woohyun

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11621
2020-04-16 20:03:31 +09:00
Xavi Artigas f526ad8c26 Fix namespace clashes for Efl.Text.Cursor
Three renames are applied here:
Efl.Text.Cursor -> Efl.Text_Cursor.Object (class)
Efl.Text.Cursor_Type -> Efl.Text_Cursor.Type (enum)
Efl.Text.Cursor_Move_Type -> Efl.Text_Cursor.Move_Type (enum)

Nothing changes for the enums on the C side. For the class... Well,
the method names are a bit more verbose now.

These renames are required to avoid clashing with the Efl.Text interface.
This did not cause trouble to C# because interfaces are prefixed with "I",
but it did cause trouble to Eolian when the EO files were installed and
somebody tried to use them.
Ref T8648

Differential Revision: https://phab.enlightenment.org/D11663
2020-04-14 12:25:55 +02:00
Ali Alzyod 5245bc03be efl.ui.textbox: add test case for copy/paste results
since paste is now  working when called from user source code, this test case can be added

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11625
2020-04-06 11:05:27 +02:00
Mike Blumenkrantz 5565e90479 tests/hover: add behavior tests for elm_hover
verify geometry and smart callback triggering

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11632
2020-04-03 17:13:52 +02:00
Mike Blumenkrantz 6f933e01c7 tests/layout: add explicit test for freeze and thaw no-op correctness
this shouldn't trigger any canvas changes since nothing is happening
during the freeze

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11631
2020-04-03 17:13:50 +02:00
Mike Blumenkrantz 426967c778 tests/elm: add wrapper for forcing manual render in tests
this can be useful when a test needs to immediately verify whether a render
is occurring

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11630
2020-04-03 17:13:47 +02:00
Mike Blumenkrantz 8aaff3ba07 tests/elm: add helper macros for asserting size and position of objects
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11629
2020-04-03 17:13:44 +02:00
Marcel Hollerbach 11da918983 Replace strncmp code
the structure "!strcmp(X, "foo", strlen("foo"))" is equal to
"eina_has_prefix(X, "foo")", and the later is nicer to read, hence this
replaces it.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11620
2020-04-03 14:51:11 +02:00
Ali Alzyod d7d948c23d elm_entry: using keycode for main keyboard shortcuts
Previously we use key strings to detect keyboard shortcuts (for example copy/paste/select_all, .. etc)
Now we will use key code alongside with these key strings (I do not remove the key string, because I am afraid something depends on them because some methods do not send keycode with keys)

This issue can be easily detected when the keyboard layout is not a Latin language, for example Hitting "C" will produce key string depends on related language not letter C, but Keycodes remain the same regardless of keyboard layout.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11606
2020-04-03 14:39:54 +02:00
Ali Alzyod 43ac889bc1 evas_textblock: prevent updating cursor unless they are ready during markup_set
Summary:
During Markup_set at text block level, we will not update the cursors, unless their status is updated and ready.

This can cause serious issues, especially if a cursor also depends on another cursor for some calculations, (like the segfault happening in TextBox T8637)

Reviewers: woohyun, bu5hm4n, zmike

Reviewed By: woohyun

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8637

Differential Revision: https://phab.enlightenment.org/D11598
2020-03-26 14:49:02 +09:00
Marcel Hollerbach f6cb234070 efl_ui_spin_button: add tests for direct input feature
this simply passes in some key sequences and checks if the validation is
working. Additionally the output value is checked.
Depends on D11009

Differential Revision: https://phab.enlightenment.org/D11010
2020-03-25 22:13:29 +01:00
Marcel Hollerbach 43f95ec6b3 suite_helpers: add helper for key down events
usefull for emulating key events.
2020-03-25 22:13:28 +01:00
Marcel Hollerbach 91b3476d51 suite_helper: do not use stacked values here
this is ending up beeing garbage pointers when not properly overwritten.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11597
2020-03-25 22:13:28 +01:00
Mike Blumenkrantz f4a877d17d tests/elm: add strict test to verify elm image gif support
Summary: Depends on D11583

Reviewers: kimcinoo, Hermet, raster, cedric, bu5hm4n

Reviewed By: bu5hm4n

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11484
2020-03-24 13:22:19 -04:00
Mike Blumenkrantz 6268bb36ea tests/elm: use norender_with_updates
Summary: Depends on D11582

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11583
2020-03-24 13:22:16 -04:00
Marcel Hollerbach 61fe913995 efl_ui_test_widget: add test for subtree disabling / tree unfocusabling
this is valdating the previous commit.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11557
2020-03-23 20:02:53 +01:00
Marcel Hollerbach 151862f50c efl_ui_widget: fix disabled set behaviour
Summary:
this fixes disabled set behaviour. This ensures that when setting
disabled twice, that unsetting it once does not break the overall state.

This never appeared in any real life example, because
elm_object_disabled_set is already checking for equalness. However, this
is not wanted here, because the simple setter can also be used to sync
the state with the parent, which appears to be helpfull.

Depends on D11550

Reviewers: zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11551
2020-03-23 12:12:12 -04:00