summaryrefslogtreecommitdiff
path: root/src/tests (follow)
AgeCommit message (Collapse)Author
2019-04-06eio: do not fail in case of early ECANCEL.Cedric BAIL
Actually with directory that contain a lot of file and the right order for them, you would end up getting what you are looking for before you have triggered all the future callback. In that case, all the future callback are cancelled and we will get that notification. The test is not failing in this case as we already got what we wanted. Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D8541
2019-04-06elementary: it seems I forgot to initialize some meaningful boolean.Cedric BAIL
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8501
2019-04-05efl-csharp: fix crash when events trigger after C# object `Dispose`Vitor Sousa
Summary: Rework general event handling to check individually each event call, if the object is not alive then the event will not be propagated. WeakReferences (and lambdas capturing those WeakRefs) are used to ensure this. Dispose methods in object now take care of checking if efl libraries are still initialized and thread-safely unregister each event before performing an efl_unref on the Eo object. Event handling in C# is now centered around a single dictionary inside the object: `EoEvents`. C# event triggers now properly trigger events on C too. Standardize C# event-triggering methods names (remove underscores). Some diminished use of static memory due events no longer requiring static key objects to be registered/unregistered. Some fixing of white space generation for generated events. Depends on D8431 Reviewers: lauromoura, felipealmeida, segfaultxavi Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8564
2019-04-05efl-csharp: fix resource deallocation causing errors everywhereVitor Sousa
Summary: This commit mainly fixes errors caused by deallocating resources in the garbage collector thread. Using `ecore_main_loop_thread_safe_call_async` to queue resource deallocation in the main thread seems to solve it. Also, some `efl_ref` calls are added in places they were missing, mainly objects that unref in the destructor thus taking ownership if efl_ref is not called. Also fix improper resource deallocation in tests that were causing it to crash, enabling it to call Efl.All.Shutdown again. This allocation and the deallocation process was moved from the Eo class constructor to static class methods that are called in the test 'set up' and 'tear down' methods. Queuing resource deallocation in the main thread make it mandatory that tests call `Efl.App.AppMain.Iterate()` if they want to check proper resource deallocation (like TestFunctionPointers.set_callback_inherited_called_from_c). Extras: Remove duplicated declaration of 'eflcustomexportsmono' in meson in order to fix some linking problems. Remove some unused code around deallocation functions that had to be reworked. Object allocation is now supplied with the call site information it expects (file name and line for _efl_add_start). Depends on D8550 Test Plan: meson test Reviewers: felipealmeida, lauromoura, cedric, segfaultxavi Reviewed By: lauromoura Subscribers: segfaultxavi Tags: #efl_language_bindings, #do_not_merge Differential Revision: https://phab.enlightenment.org/D8431
2019-04-05csharp: Make classes abstract and rework castingLauro Moura
Summary: Abstract Eo classes are now proper C# abstract classes. As a side effect, returning Eo instances from native code was reworked to return instances of their actual Eo classes instead of previous behavior of returning a generic Efl.Object and using static_cast. Instead of `var window = Efl.Ui.Win.static_cast(widget.GetParent());` Use `var window = widget.GetParent() as Efl.Ui.Win;` Another side effect was that `efl_constructor` was removed from the list of supported `Efl.Object` overrides. It is invoked inside `efl_add_internal_start`, before the bindings makes the association of the newly created EoId with the C# instance that created it, making the managed delegate meaningless. C# users then can use regular C# constructors to initialize fields. Also changed to set the private data of C#-inherited classes before the call to constructing methods (aka constructor parameters) so C# classes can override them correctly. Fixes T7778 Fixes T7757 Reviewers: vitor.sousa, felipealmeida, segfaultxavi Reviewed By: vitor.sousa, segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7778, T7757, T7702 Differential Revision: https://phab.enlightenment.org/D8550
2019-04-05meson: correctly use the correct dependencyMarcel Hollerbach
Summary: edje_cc calls epp, so we should not only add edje_cc to the depends on target, but rather also ensure that epp is availble. Additionally, this removes unneccessary depends on declarations when we do cross compile. Depends on D8561 Reviewers: zmike, segfaultxavi, cedric Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8562
2019-04-03efl_ui_test_callback: Removed defined but unused functionChristopher Michael
2019-04-03evas_callbacks: fix emission of EFL_GFX_ENTITY_EVENT_VISIBILITY_CHANGEDHosang Kim
Summary: When I add "efl_event_callback_add(btn, EFL_GFX_ENTITY_EVENT_VISIBILITY_CHANGED, _cb, NULL)", _cb is not called. Because of callback_mask is not set correctly. Test Plan: unit test Reviewers: zmike, cedric Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8528
2019-04-02elm_fileselector: disable this test for nowMarcel Hollerbach
Summary: this test fails on travis, for the sake of the release we continue without this tests, after the release we can enable this again with or without failing tests. Reviewers: zmike Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8538
2019-04-02csharp: Raise exception when Array is null.Lauro Moura
Reviewers: felipealmeida, vitor.sousa, segfaultxavi Reviewed By: vitor.sousa Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8499
2019-04-02efl_check: add API to expect a errorMarcel Hollerbach
Summary: sometimes it is not enough to just disable aborting on critical error messages. Sometimes it is better to explicitly expect an error, and fail the testcase if there is no error. This is used in later commits here. Depends on D8417 Reviewers: YOhoho, segfaultxavi, zmike, woohyun, Jaehyun_Cho Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8519
2019-04-02tests: unset eina log callback at end of each efl_app promise testMike Blumenkrantz
Summary: ensure that this doesn't trigger cascading errors Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8514
2019-04-02eo: Correctly name Realized classes.Lauro Moura
The previous preprocessor rule was generating strings like "\"Efl.App\"_Realized. Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8527
2019-03-29tests: abort on errors during genlist expand test, not warningsMike Blumenkrantz
Summary: log level=2 is the warning level, which is not super useful since there's currently billions of eo warnings occuring in every function call Reviewers: cedric, segfaultxavi Reviewed By: cedric, segfaultxavi Subscribers: segfaultxavi, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8515
2019-03-29efl_ui_widget: add implementation for finding the windowMarcel Hollerbach
the problem with the previous implementation (just redirect the calls to the widget_parent then to the efl_parent is that after invalidate its impossible to find the window where the widget is in. However, there are cases where we want to have access to the window of the widget, for example, to invalidate focus highlight etc.. The window of a widget is always constant, and cannot be changed (as the evas object cannot hop accross different evas) Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com> Differential Revision: https://phab.enlightenment.org/D8475
2019-03-29efl_ui_widget: reintroduce legacy behaviourMarcel Hollerbach
before the refactoring of the disabled property, there was no way to enable a widget which has a disabled tree. This here however enables this to work again like this. The user will be told with an error message. The integraty of the property is maintained accross reparents. Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com> Differential Revision: https://phab.enlightenment.org/D8459
2019-03-29efl_ui_widget: add tests for parent and disalbed propertyMarcel Hollerbach
this just adds more coverage over the behaviour of efl_ui_widget properties. Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com> Differential Revision: https://phab.enlightenment.org/D8458
2019-03-29efl_ui_test_widget: ensures tests do not errorMarcel Hollerbach
Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com> Differential Revision: https://phab.enlightenment.org/D8457
2019-03-28efl_ui_slider: block scrolling when on sliderMarcel Hollerbach
when a mouse cursor is over a slider, the mouse wheel should be used to affect the state of the slider, not also the one of the slider. ref T2529 Reviewed-by: Bowon Ryu <bowon.ryu@samsung.com> Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com> Differential Revision: https://phab.enlightenment.org/D8455
2019-03-28elementary: restore quick exit from wait loop in fileselector test.Cedric BAIL
The test was not expecting both callback to be set when the wait loop was started. By moving them around, it fixes the test case to only have one relevant callback set at a time. Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8490
2019-03-27elc_filselector: solve the mysterium of sometimes failing testsMarcel Hollerbach
so after a phone call, two days of debugging, tears, crying etc. etc. we finally came to a point of enlightenment! *Someone* (bu5hm4n) moved gengrid and genlist events from eo back to smart events, so we can work arround legacy borks and event-name collisions, at this point he did not knew that some widgets (fileselector) already relied on those *lovely* events. Hence this broke theoretically the testsuite, however, the fileselector testsuite is ultimatily buggy, and the wait function does not return false when it timeouts, (i don't know why not). So this break was never discovered. Additionally there is a second issue. it appears, that when we immidiatly quit the mainloop after we have got the selected callback, that then genlist decides to forget about the sd->selected pointer, and NULLs that one out. Which then results in the fact that elm_fileselector_selected_get ends up returning invalid paths. Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D8488
2019-03-27eio: add test to ensure proper lifecycle of Efl_Io object and futures.Yeongjong Lee
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8372
2019-03-27test: add a test case for elm_entryWonki Kim
Summary: behaviors of elm_entry has been changed so that this patch provides usages to keep as a test case. Reviewers: zmike, Hermet, YOhoho Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8483
2019-03-26elm_win: fix correct return value on elm_win_rotation_getYeongjong Lee
Summary: Before b3327c761e, -1 was returned on`elm_win_rotation_get`, if `obj` is NULL. This fixes backward compatibility. Test Plan: make check Reviewers: Hermet Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8474
2019-03-26elm_photocam: fix file_get,set operationsYeongjong Lee
Summary: This patch fixes bug that elm_photocam_file_get always return NULL. Test Plan: make check Reviewers: Hermet, zmike, bu5hm4n Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8472
2019-03-25tests: add (failing) test for elm_entry magnifierMike Blumenkrantz
this crashes immediately and showcases the current infinite recursion issue in elm_entry which is triggered by clicking any entry for $longpress_timeout ref T7202 Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8440
2019-03-25tests: add function to do "real" timersMike Blumenkrantz
in very specific cases it's necessary to match the exact timing of internal functionality, so add a function to provide that capability Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8439
2019-03-25tests: make elm_win visible during testsMike Blumenkrantz
elm_win has some internal locking to avoid doing sizing and visibility changes until pre-render to save some calculations. this makes triggering ui events on objects impossible, as they will not be visible. Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8438
2019-03-25elm_win: fix correct rot variable in elm_win_rotation_getYeongjong Lee
Remove duplicated rotation variable Also, it fixes wrong layout class comparing. Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8464
2019-03-25efl_access: add test cases for reading_info_type_set/get APIShilpa Singh
Add test cases for efl_access_object_reading_info_type_set and efl_access_object_reading_info_type_get APIs Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8427
2019-03-21efl-csharp: Add back I prefix for interfaces.Lauro Moura
Summary: Conforming to C# coding conventions. For properties, now we only generate a wrapper if its name does not clash with the name of the class that would be implementing it. Fixes T7751 Reviewers: vitor.sousa, felipealmeida, segfaultxavi Reviewed By: vitor.sousa, segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7751 Differential Revision: https://phab.enlightenment.org/D8397
2019-03-21mono-tests: Fix after latest changes to eolianXavi Artigas
Summary: Event payload checking is more strict now. Test Plan: Check that master can be built Reviewers: lauromoura, q66 Reviewed By: q66 Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8437
2019-03-21eolian: add event type call convention checks for non-beta classesDaniel Kolesa
2019-03-20csharp: Remove test about conflicting events.Lauro Moura
Conflictings events won't be allowed anymore on eolian-based classes. For manually subclassed C# classes that eventually have conflicts, this should be dealt with in T7744. Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8426
2019-03-20ui.box_stack: refactor layout_updateYeongjong Lee
Summary: This patch remove evas_box function from Efl.Ui.Box_Stack and add unit test. Depends on D8214 Test Plan: 1. make check 2. elementary_test -to 'efl.ui.box_stack' Reviewers: zmike, Jaehyun_Cho, cedric Reviewed By: zmike, Jaehyun_Cho, cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8094
2019-03-20efl_access: Add attribute_del API, Add test cases for all ↵Shilpa Singh
access_object_attribute* APIs Add attribute_del API, currently there is no provision to delete a particular attribute(key-value pair) from the attribute list of a widget. Add test cases for efl_access_attribute_append, efl_access_attributes_get, efl_access_attribute_del and efl_access_attributes_clear API Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Reviewed-by: Shinwoo Kim <cinoo.kim@samsung.com> Differential Revision: https://phab.enlightenment.org/D8386
2019-03-19evas: apply new event calling conventionMarcel Hollerbach
Summary: ref T7758 Depends on D8407 Reviewers: cedric, zmike, segfaultxavi Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T7758 Differential Revision: https://phab.enlightenment.org/D8408
2019-03-18efl: remove EFL_EO_API_SUPPORT macroDaniel Kolesa
Summary: Since we're now going to be shipping some eo classes as stable, there is no point in keeping the eo api behind a macro, and it should be enabled by default. Another case is beta classes, but those are behind the EFL_BETA_API_SUPPORT guard. This also changes includes around the place where things are clearly broken (such as an included header needing something from another header but that other header being guarded, notably efl_ui_widget.h needing focus manager but focus manager being behind beta in Elementary.h) Reviewers: zmike, cedric, bu5hm4n, stefan_schmidt, segfaultxavi Reviewed By: cedric, segfaultxavi Subscribers: segfaultxavi, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8322
2019-03-15evas_events: prevent double event_freeze in evas_object_freeze_events_setYeongjong Lee
Summary: This patch prevent that event_freeze_count is greater than 1 in `evas_object_freeze_events_set` Test Plan: make check Reviewers: bu5hm4n, zmike Reviewed By: zmike Subscribers: zmike, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8325
2019-03-15csharp: Support Efl.Class for interfacesLauro Moura
Summary: The `GetEflClassStatic` method for interface is in their Concrete sidekick. Previously, passing a valid Eo interface as a type caused the binding to complain that `Type is not an Efl.Object`. Test Plan: run test case Reviewers: vitor.sousa, felipealmeida Reviewed By: vitor.sousa Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8360
2019-03-14elementary: add compile checks for the efl_ui.h headerMarcel Hollerbach
Summary: we should check if the header actaully compiles without the beta defines. Depends on D8342 Reviewers: zmike, segfaultxavi Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8343
2019-03-14efl_ui_layout: fix elm_layout_text_set behaviorYeongjong Lee
Summary: Since commit 649433560b5b, elm_layout_text_set didn't work on some widgets. This patch fixes invisible text issues. Test Plan: 1. make check 2. elementary_test -to 'popup' Reviewers: zmike, segfaultxavi, bu5hm4n Reviewed By: zmike Subscribers: cedric, #reviewers, herb, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8326
2019-03-13ui.widget: fix theme_apply working in sub_object_addYeongjong Lee
It seems that theme_apply in sub_object_add haven't worked since commit f6fa1ef6120fdebcdaf1568674c48b9d17f76f64. scale, theme property will be set properly when the parent is changed. Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es> Differential Revision: https://phab.enlightenment.org/D8283
2019-03-13Revert "tests: add test for elm_layout_text_set"Jaehyun Cho
This reverts commit 0e027980f6c275f1a56ae550679010d689c91b23. Since D7888 breaks the backward compatibility, D7888 is going to be reverted. This patch is based on D7888 so this patch is also required to be reverted for now. After a proper patch is applied instead of D7888, then this patch can be submitted again.
2019-03-11csharp: Fix event names with underscore.Lauro Moura
Summary: names like `focus_geometry,changed` shoud be converted to FocusGeometryChanged instead of Focus_geometryChanged. Fixes T7735 Test Plan: run tests Reviewers: vitor.sousa, felipealmeida, segfaultxavi Reviewed By: vitor.sousa Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7735 Differential Revision: https://phab.enlightenment.org/D8301
2019-03-11Revert "ui.widget: fix theme_apply working in sub_object_add"Marcel Hollerbach
This only works with a new libcheck, but not with a old one, revisiting it. This reverts commit da0ff534716774b35a98c359e8c7fd7bdde7a3d2.
2019-03-11ui.widget: fix theme_apply working in sub_object_addYeongjong Lee
It seems that theme_apply in sub_object_add haven't worked since commit f6fa1ef6120fdebcdaf1568674c48b9d17f76f64. scale, theme property will be set properly when the parent is changed. Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8283
2019-03-11ui.widget: add exception handling code and unit test of sub_object_add/del ↵Yeongjong Lee
function Add missing exception check code with unit test. Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8282
2019-03-11efl-csharp: Respect beta for classes and other stuff.Lauro Moura
Summary: In order to work around an issue with Efl.App, which is stable but inherits from Efl.Core.Command_Line, @beta interfaces/mixins in the inheritance chain are simply skipped. Also changed the class used int test for inheritance from C# Efl.Loop is stable but internally it uses a @beta class as argument to its Register() method in the constructor. When instantiating a user-defined C# subclass, the binding calls the C# override in the NativeInherit class and the marshalling fails as no code is generated for the beta class. Also moved Efl.Part test to a beta class. Efl.Part is still beta. Regarding parts, they are skipped if its class is @beta too. Also rejected all elm_* files in elm public eo files. They should get back in as they are converted to Efl.Ui.* api. An exception is elm_interface_scrollable.eo, as efl_ui_panel depends on it. Fixes T7730 Test Plan: Run tests Reviewers: vitor.sousa, segfaultxavi, felipealmeida, cedric, bu5hm4n, zmike Reviewed By: vitor.sousa Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T7730 Differential Revision: https://phab.enlightenment.org/D8268
2019-03-11eolian-cxx: Add beta information to *_defLauro Moura
Summary: Fixes T7732 Reviewers: cedric, felipealmeida, vitor.sousa, bu5hm4n Reviewed By: vitor.sousa Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T7732 Differential Revision: https://phab.enlightenment.org/D8267