From: Joe Konno Date: Wed, 13 Jun 2012 16:29:21 +0000 (-0700) Subject: test_window: add stub withdrawn tests X-Git-Tag: upstream/0.2.1~331 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4c07fe3abe594ef76a1e5ee2d373e2c5ca7e2f8c;p=test%2Fgeneric%2Fwayland-fits.git test_window: add stub withdrawn tests Signed-off-by: Joe Konno --- diff --git a/src/efl/test_window.cpp b/src/efl/test_window.cpp index d46635f..f880369 100644 --- a/src/efl/test_window.cpp +++ b/src/efl/test_window.cpp @@ -235,6 +235,44 @@ private: Window window_; }; +class WindowWithdrawnTest : public ElmTestHarness +{ +public: + WindowWithdrawnTest() + : ElmTestHarness::ElmTestHarness() + , window_("WindowWithdrawnTest", "Window Withdrawn Test") + { + return; + } + + void setup() + { + window_.show(); + + queueCallback( + ModifyCheckCallback( + boost::bind(&Window::withdrawn, boost::ref(window_), EINA_TRUE), + boost::bind(&WindowWithdrawnTest::checkWithdrawn, boost::ref(*this), EINA_TRUE) + ) + ); + + queueCallback( + ModifyCheckCallback( + boost::bind(&Window::withdrawn, boost::ref(window_), EINA_FALSE), + boost::bind(&WindowWithdrawnTest::checkWithdrawn, boost::ref(*this), EINA_FALSE) + ) + ); + } + + void checkWithdrawn(Eina_Bool isWithdrawn) + { + BOOST_CHECK_EQUAL(window_.isWithdrawn(), isWithdrawn); + } + +private: + Window window_; +}; + BOOST_AUTO_TEST_SUITE(Wayland_EFL_Window_Suite) WAYLAND_ELM_HARNESS_TEST_CASE(WindowResizeTest) @@ -243,5 +281,6 @@ BOOST_AUTO_TEST_SUITE(Wayland_EFL_Window_Suite) WAYLAND_ELM_HARNESS_TEST_CASE(WindowMaximizeTest) WAYLAND_ELM_HARNESS_TEST_CASE(WindowFullscreenTest) WAYLAND_ELM_HARNESS_TEST_CASE(WindowStickyTest) + WAYLAND_ELM_HARNESS_TEST_CASE(WindowWithdrawnTest) BOOST_AUTO_TEST_SUITE_END() diff --git a/src/efl/window.cpp b/src/efl/window.cpp index 7e561f1..df0a994 100644 --- a/src/efl/window.cpp +++ b/src/efl/window.cpp @@ -51,3 +51,12 @@ Eina_Bool Window::isSticky() return elm_win_sticky_get(*this); } +void Window::withdrawn(Eina_Bool withdraw) +{ + elm_win_withdrawn_set(*this, withdraw); +} + +Eina_Bool Window::isWithdrawn() +{ + return elm_win_withdrawn_get(*this); +} diff --git a/src/efl/window.h b/src/efl/window.h index 14d27c8..4b530ae 100644 --- a/src/efl/window.h +++ b/src/efl/window.h @@ -14,11 +14,13 @@ public: void maximize(Eina_Bool maximize); void fullscreen(Eina_Bool fullscreen); void sticky(Eina_Bool sticky); + void withdrawn(Eina_Bool withdraw); Eina_Bool isIconified(); Eina_Bool isMaximized(); Eina_Bool isFullscreen(); Eina_Bool isSticky(); + Eina_Bool isWithdrawn(); }; #endif