From: Joe Konno Date: Tue, 10 Jul 2012 20:31:18 +0000 (-0700) Subject: EFL: Add (disabled) colorselector tests X-Git-Tag: upstream/0.2.1~309 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3d4942cabcdbc24eaacf2225a769a9a2504a4dc5;p=test%2Fgeneric%2Fwayland-fits.git EFL: Add (disabled) colorselector tests Per EFL #1153, colorselector controls cause a segfault in the Elm examples. If enabled, the test will destabilize our test framework and break QuickBuild/CI. Leaving the scaffolding in place. On to the next control. Signed-off-by: Joe Konno --- diff --git a/src/efl/Makefile.am b/src/efl/Makefile.am index 23a8c05..586d4a0 100644 --- a/src/efl/Makefile.am +++ b/src/efl/Makefile.am @@ -38,6 +38,7 @@ wayland_efl_test_SOURCES = \ test_bubble.cpp \ test_check.cpp \ test_clock.cpp \ + test_colorselector.cpp \ ../testmain.cpp endif diff --git a/src/efl/test_colorselector.cpp b/src/efl/test_colorselector.cpp new file mode 100644 index 0000000..4e45828 --- /dev/null +++ b/src/efl/test_colorselector.cpp @@ -0,0 +1,60 @@ +#include +#include + +#include "window.h" +#include "evasobject.h" +#include "elmtestharness.h" + +class ColorselectorColorTest : public ElmTestHarness +{ +public: + + ColorselectorColorTest() + : ElmTestHarness::ElmTestHarness() + , window_("ColorselectorColorTest", "Colorselector Color Test") + , selector_(elm_colorselector_add(window_)) + { + window_.setSize(800, 600); + //evas_object_size_hint_weight_set(selector_, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + //elm_win_resize_object_add(window_, selector_); + return; + } + + void setup() + { + selector_.show(); + window_.show(); + + queueCallback( + ModifyCheckCallback( + boost::bind(elm_colorselector_color_set, boost::ref(selector_), 64, 64, 64, 0), + boost::bind(&ColorselectorColorTest::checkColor, boost::ref(*this), 64, 64, 64, 0) + ) + ); + } + + void checkColor(const int r, const int g, const int b, const int a) + { + int red = 0, green = 0, blue = 0, alpha = 0; + elm_colorselector_color_get(selector_, &red, &green, &blue, &alpha); + + BOOST_CHECK(r == red && g == green && b == blue && a == alpha); + } + +private: + Window window_; + EvasObject selector_; +}; + +/* TODO: Disabled per EFL #1153 +BOOST_AUTO_TEST_SUITE(Wayland_EFL_Suite) + + BOOST_AUTO_TEST_SUITE(Wayland_EFL_Colorselector_Suite) + + WAYLAND_ELM_HARNESS_TEST_CASE(ColorselectorColorTest) + + BOOST_AUTO_TEST_SUITE_END() + +BOOST_AUTO_TEST_SUITE_END() +*/ +