/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*/
#include <dali/dali.h>
-#include <Ecore_X.h>
-#include <devel-api/adaptor-framework/drag-and-drop-detector.h>
+#include <dali/devel-api/adaptor-framework/window-devel.h>
+#include <dali/internal/system/linux/dali-ecore-x.h>
#include <dali-test-suite-utils.h>
+
using namespace Dali;
void utc_dali_window_startup(void)
DALI_TEST_ASSERT( e, "Failed to create X window", TEST_LOCATION );
}
- 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;
+ // Attempt to create a new window
try
{
- window.SetIndicatorBgOpacity(Dali::Window::OPAQUE);
- DALI_TEST_CHECK( false ); // Should not reach here!
- }
- catch( ... )
- {
- DALI_TEST_CHECK( true );
- }
-
- END_TEST;
-}
+ PositionSize windowPosition(0, 0, 0, 0);
+ Dali::Window window = Dali::Window::New( windowPosition, "test-window", "test-window-class", true );
-int UtcDaliWindowRotateIndicatorN(void)
-{
- Dali::Window window;
- try
- {
- window.RotateIndicator(Dali::Window::PORTRAIT);
- DALI_TEST_CHECK( false ); // Should not reach here!
+ tet_result( TET_FAIL );
}
- catch( ... )
+ catch ( DaliException& e )
{
- DALI_TEST_CHECK( true );
+ DALI_TEST_ASSERT( e, "Failed to create X window", TEST_LOCATION );
}
END_TEST;
END_TEST;
}
-int UtcDaliWindowGetDragAndDropDetectorN(void)
+int UtcDaliWindowGetNativeHandleN(void)
{
Dali::Window window;
try
{
- DragAndDropDetector detector = window.GetDragAndDropDetector();
- DALI_TEST_CHECK( !detector ); // Should not reach here!
+ Dali::Any handle = window.GetNativeHandle();
+ DALI_TEST_CHECK( false ); // Should not reach here!
}
catch( ... )
{
END_TEST;
}
-int UtcDaliWindowGetNativeHandleN(void)
+int UtcDaliWindowSetAcceptFocusN(void)
{
Dali::Window window;
try
{
- Dali::Any handle = window.GetNativeHandle();
+ window.SetAcceptFocus( true );
DALI_TEST_CHECK( false ); // Should not reach here!
}
catch( ... )
END_TEST;
}
-int UtcDaliWindowIndicatorVisibilityChangedSignalN(void)
+int UtcDaliWindowIsFocusAcceptableN(void)
{
Dali::Window window;
try
{
- window.IndicatorVisibilityChangedSignal();
+ window.IsFocusAcceptable();
DALI_TEST_CHECK( false ); // Should not reach here!
}
catch( ... )
END_TEST;
}
+int UtcDaliWindowFocusChangeSignalN(void)
+{
+ Dali::Window window;
+ try
+ {
+ window.FocusChangeSignal();
+ DALI_TEST_CHECK( false ); // Should not reach here!
+ }
+ catch( ... )
+ {
+ DALI_TEST_CHECK( true );
+ }
-
-
+ END_TEST;
+}