#include <dali/dali.h>
#include <Ecore_X.h>
+#include <devel-api/adaptor-framework/drag-and-drop-detector.h>
#include <dali-test-suite-utils.h>
using namespace Dali;
namespace
{
+class Internal::Adaptor::Window;
+
intptr_t screenId = 0; // intptr_t has the same size as a pointer and is platform independent so this can be returned as a pointer in ecore_x_default_screen_get below without compilation warnings
} // unnamed namespace
}
-int UtcDaliToolkitWindowConstructorP(void)
+int UtcDaliWindowConstructorP(void)
{
Dali::Window window;
DALI_TEST_CHECK( !window );
END_TEST;
}
-int UtcDaliToolkitWindowCopyConstructorP(void)
+int UtcDaliWindowCopyConstructorP(void)
{
Dali::Window window;
Dali::Window copy( window );
END_TEST;
}
-int UtcDaliToolkitWindowAssignmentOperatorP(void)
+int UtcDaliWindowConstructorFromInternalPointerN(void)
{
- Dali::Window window;
- Dali::Window copy = window;
+ Internal::Adaptor::Window* internalWindow = NULL;
+ Dali::Window window(internalWindow);
+ DALI_TEST_CHECK( !window ); // Should not reach here!
+
+ END_TEST;
+}
+
+int UtcDaliWindowAssignmentOperatorP(void)
+{
+ const Dali::Window window;
+ Dali::Window copy;
+ DALI_TEST_CHECK( ! copy );
+ copy = window;
DALI_TEST_CHECK( copy == window );
END_TEST;
END_TEST;
}
+int UtcDaliWindowShowIndicatorN(void)
+{
+ Dali::Window window;
+ try
+ {
+ window.ShowIndicator(Dali::Window::VISIBLE);
+ DALI_TEST_CHECK( false ); // Should not reach here!
+ }
+ catch( ... )
+ {
+ DALI_TEST_CHECK( true );
+ }
+
+ END_TEST;
+}
+
+int UtcDaliWindowSetIndicatorBgOpacityN(void)
+{
+ Dali::Window window;
+ try
+ {
+ window.SetIndicatorBgOpacity(Dali::Window::OPAQUE);
+ DALI_TEST_CHECK( false ); // Should not reach here!
+ }
+ catch( ... )
+ {
+ DALI_TEST_CHECK( true );
+ }
+
+ END_TEST;
+}
+
+int UtcDaliWindowRotateIndicatorN(void)
+{
+ Dali::Window window;
+ try
+ {
+ window.RotateIndicator(Dali::Window::PORTRAIT);
+ DALI_TEST_CHECK( false ); // Should not reach here!
+ }
+ catch( ... )
+ {
+ DALI_TEST_CHECK( true );
+ }
+
+ END_TEST;
+}
+
+int UtcDaliWindowSetClassN(void)
+{
+ Dali::Window window;
+ try
+ {
+ window.SetClass("window-name", "window-class");
+ DALI_TEST_CHECK( false ); // Should not reach here!
+ }
+ catch( ... )
+ {
+ DALI_TEST_CHECK( true );
+ }
+
+ END_TEST;
+}
+
+int UtcDaliWindowRaiseN(void)
+{
+ Dali::Window window;
+ try
+ {
+ window.Raise();
+ DALI_TEST_CHECK( false ); // Should not reach here!
+ }
+ catch( ... )
+ {
+ DALI_TEST_CHECK( true );
+ }
+
+ END_TEST;
+}
+
+int UtcDaliWindowLowerN(void)
+{
+ Dali::Window window;
+ try
+ {
+ window.Lower();
+ DALI_TEST_CHECK( false ); // Should not reach here!
+ }
+ catch( ... )
+ {
+ DALI_TEST_CHECK( true );
+ }
+
+ END_TEST;
+}
+
+int UtcDaliWindowActivateN(void)
+{
+ Dali::Window window;
+ try
+ {
+ window.Activate();
+ DALI_TEST_CHECK( false ); // Should not reach here!
+ }
+ catch( ... )
+ {
+ DALI_TEST_CHECK( true );
+ }
+
+ END_TEST;
+}
+
+int UtcDaliWindowAddAvailableOrientationN(void)
+{
+ Dali::Window window;
+ try
+ {
+ window.AddAvailableOrientation(Dali::Window::PORTRAIT);
+ DALI_TEST_CHECK( false ); // Should not reach here!
+ }
+ catch( ... )
+ {
+ DALI_TEST_CHECK( true );
+ }
+
+ END_TEST;
+}
+
+int UtcDaliWindowRemoveAvailableOrientationN(void)
+{
+ Dali::Window window;
+ try
+ {
+ window.RemoveAvailableOrientation(Dali::Window::PORTRAIT);
+ DALI_TEST_CHECK( false ); // Should not reach here!
+ }
+ catch( ... )
+ {
+ DALI_TEST_CHECK( true );
+ }
+
+ END_TEST;
+}
+
+int UtcDaliWindowSetPreferredOrientationN(void)
+{
+ Dali::Window window;
+ try
+ {
+ window.SetPreferredOrientation(Dali::Window::PORTRAIT);
+ DALI_TEST_CHECK( false ); // Should not reach here!
+ }
+ catch( ... )
+ {
+ DALI_TEST_CHECK( true );
+ }
+
+ END_TEST;
+}
+
+int UtcDaliWindowGetPreferredOrientationN(void)
+{
+ Dali::Window window;
+ try
+ {
+ Dali::Window::WindowOrientation orientation = window.GetPreferredOrientation();
+ DALI_TEST_CHECK( orientation == Dali::Window::PORTRAIT ); // Should not reach here!
+ }
+ catch( ... )
+ {
+ DALI_TEST_CHECK( true );
+ }
+
+ END_TEST;
+}
+
+int UtcDaliWindowGetDragAndDropDetectorN(void)
+{
+ Dali::Window window;
+ try
+ {
+ DragAndDropDetector detector = window.GetDragAndDropDetector();
+ DALI_TEST_CHECK( !detector ); // Should not reach here!
+ }
+ catch( ... )
+ {
+ DALI_TEST_CHECK( true );
+ }
+
+ END_TEST;
+}
+
+int UtcDaliWindowGetNativeHandleN(void)
+{
+ Dali::Window window;
+ try
+ {
+ Dali::Any handle = window.GetNativeHandle();
+ DALI_TEST_CHECK( false ); // Should not reach here!
+ }
+ catch( ... )
+ {
+ DALI_TEST_CHECK( true );
+ }
+
+ END_TEST;
+}
+
+int UtcDaliWindowIndicatorVisibilityChangedSignalN(void)
+{
+ Dali::Window window;
+ try
+ {
+ window.IndicatorVisibilityChangedSignal();
+ DALI_TEST_CHECK( false ); // Should not reach here!
+ }
+ catch( ... )
+ {
+ DALI_TEST_CHECK( true );
+ }
+
+ END_TEST;
+}