From bd7e9b479f33e540a63a62592edabf40a699b08d Mon Sep 17 00:00:00 2001 From: Priya Kohli Date: Tue, 2 Jul 2019 11:52:37 +0530 Subject: [PATCH] [ITC][dali-adaptor][ACR-1404][Deprecated Dali::Window::GetDragAndDropDetector] Change-Id: I30db18c49984f06654e29140bff9be8a0c7a7e56 Signed-off-by: Priya Kohli --- .../tct-dali-adaptor-native_mobile.h | 4 +- .../tct-dali-adaptor-native_tizeniot.h | 4 +- .../tct-dali-adaptor-native_wearable.h | 4 +- src/itc/dali-adaptor/window/ITs-window.cpp | 60 +++++++++---------- 4 files changed, 33 insertions(+), 39 deletions(-) diff --git a/src/itc/dali-adaptor/tct-dali-adaptor-native_mobile.h b/src/itc/dali-adaptor/tct-dali-adaptor-native_mobile.h index 6b1f1e113..d396604a4 100755 --- a/src/itc/dali-adaptor/tct-dali-adaptor-native_mobile.h +++ b/src/itc/dali-adaptor/tct-dali-adaptor-native_mobile.h @@ -55,7 +55,7 @@ extern int ITcTimerCopyConstructor(void); extern int ITcimerDowncast(void); extern int ITcWindowConstructorNewAssignmentOperator(void); extern int ITcWindowSetGetPreferredOrientation(void); -extern int ITcWindowGetDragandDropDetectorNativeHandle(void); +extern int ITcWindowGetNativeHandle(void); extern int ITcWindowAddRemoveAvailableOrientation(void); extern int ITcWindowLowerRaiseActivate(void); extern int ITcWindowSetClass(void); @@ -103,7 +103,7 @@ testcase tc_array[] = { {"ITcimerDowncast",ITcimerDowncast,ITs_timer_startup,ITs_timer_cleanup}, {"ITcWindowConstructorNewAssignmentOperator",ITcWindowConstructorNewAssignmentOperator,ITs_window_startup,ITs_window_cleanup}, {"ITcWindowSetGetPreferredOrientation",ITcWindowSetGetPreferredOrientation,ITs_window_startup,ITs_window_cleanup}, - {"ITcWindowGetDragandDropDetectorNativeHandle",ITcWindowGetDragandDropDetectorNativeHandle,ITs_window_startup,ITs_window_cleanup}, + {"ITcWindowGetNativeHandle",ITcWindowGetNativeHandle,ITs_window_startup,ITs_window_cleanup}, {"ITcWindowAddRemoveAvailableOrientation",ITcWindowAddRemoveAvailableOrientation,ITs_window_startup,ITs_window_cleanup}, {"ITcWindowLowerRaiseActivate",ITcWindowLowerRaiseActivate,ITs_window_startup,ITs_window_cleanup}, {"ITcWindowSetClass",ITcWindowSetClass,ITs_window_startup,ITs_window_cleanup}, diff --git a/src/itc/dali-adaptor/tct-dali-adaptor-native_tizeniot.h b/src/itc/dali-adaptor/tct-dali-adaptor-native_tizeniot.h index 6b1f1e113..d396604a4 100755 --- a/src/itc/dali-adaptor/tct-dali-adaptor-native_tizeniot.h +++ b/src/itc/dali-adaptor/tct-dali-adaptor-native_tizeniot.h @@ -55,7 +55,7 @@ extern int ITcTimerCopyConstructor(void); extern int ITcimerDowncast(void); extern int ITcWindowConstructorNewAssignmentOperator(void); extern int ITcWindowSetGetPreferredOrientation(void); -extern int ITcWindowGetDragandDropDetectorNativeHandle(void); +extern int ITcWindowGetNativeHandle(void); extern int ITcWindowAddRemoveAvailableOrientation(void); extern int ITcWindowLowerRaiseActivate(void); extern int ITcWindowSetClass(void); @@ -103,7 +103,7 @@ testcase tc_array[] = { {"ITcimerDowncast",ITcimerDowncast,ITs_timer_startup,ITs_timer_cleanup}, {"ITcWindowConstructorNewAssignmentOperator",ITcWindowConstructorNewAssignmentOperator,ITs_window_startup,ITs_window_cleanup}, {"ITcWindowSetGetPreferredOrientation",ITcWindowSetGetPreferredOrientation,ITs_window_startup,ITs_window_cleanup}, - {"ITcWindowGetDragandDropDetectorNativeHandle",ITcWindowGetDragandDropDetectorNativeHandle,ITs_window_startup,ITs_window_cleanup}, + {"ITcWindowGetNativeHandle",ITcWindowGetNativeHandle,ITs_window_startup,ITs_window_cleanup}, {"ITcWindowAddRemoveAvailableOrientation",ITcWindowAddRemoveAvailableOrientation,ITs_window_startup,ITs_window_cleanup}, {"ITcWindowLowerRaiseActivate",ITcWindowLowerRaiseActivate,ITs_window_startup,ITs_window_cleanup}, {"ITcWindowSetClass",ITcWindowSetClass,ITs_window_startup,ITs_window_cleanup}, diff --git a/src/itc/dali-adaptor/tct-dali-adaptor-native_wearable.h b/src/itc/dali-adaptor/tct-dali-adaptor-native_wearable.h index 303a75ad8..60c1eaf57 100755 --- a/src/itc/dali-adaptor/tct-dali-adaptor-native_wearable.h +++ b/src/itc/dali-adaptor/tct-dali-adaptor-native_wearable.h @@ -65,7 +65,7 @@ extern int ITcTimerCopyConstructor(void); extern int ITcimerDowncast(void); extern int ITcWindowConstructorNewAssignmentOperator(void); extern int ITcWindowSetGetPreferredOrientation(void); -extern int ITcWindowGetDragandDropDetectorNativeHandle(void); +extern int ITcWindowGetNativeHandle(void); extern int ITcWindowAddRemoveAvailableOrientation(void); extern int ITcWindowLowerRaiseActivate(void); extern int ITcWindowSetClass(void); @@ -121,7 +121,7 @@ testcase tc_array[] = { {"ITcimerDowncast",ITcimerDowncast,ITs_timer_startup,ITs_timer_cleanup}, {"ITcWindowConstructorNewAssignmentOperator",ITcWindowConstructorNewAssignmentOperator,ITs_window_startup,ITs_window_cleanup}, {"ITcWindowSetGetPreferredOrientation",ITcWindowSetGetPreferredOrientation,ITs_window_startup,ITs_window_cleanup}, - {"ITcWindowGetDragandDropDetectorNativeHandle",ITcWindowGetDragandDropDetectorNativeHandle,ITs_window_startup,ITs_window_cleanup}, + {"ITcWindowGetNativeHandle",ITcWindowGetNativeHandle,ITs_window_startup,ITs_window_cleanup}, {"ITcWindowAddRemoveAvailableOrientation",ITcWindowAddRemoveAvailableOrientation,ITs_window_startup,ITs_window_cleanup}, {"ITcWindowLowerRaiseActivate",ITcWindowLowerRaiseActivate,ITs_window_startup,ITs_window_cleanup}, {"ITcWindowSetClass",ITcWindowSetClass,ITs_window_startup,ITs_window_cleanup}, diff --git a/src/itc/dali-adaptor/window/ITs-window.cpp b/src/itc/dali-adaptor/window/ITs-window.cpp index 4037026ac..50ae522ac 100755 --- a/src/itc/dali-adaptor/window/ITs-window.cpp +++ b/src/itc/dali-adaptor/window/ITs-window.cpp @@ -38,7 +38,7 @@ void ITs_window_cleanup(void) void WindowConstructorNewAssignmentOperator(Application& mApplication); void WindowSetGetPreferredOrientation(Application& mApplication); -void WindowGetDragandDropDetectorNativeHandle(Application& mApplication); +void WindowGetNativeHandle(Application& mApplication); void WindowAddRemoveAvailableOrientation(Application& mApplication); void WindowLowerRaiseActivate(Application& mApplication); void WindowSetClass(Application& mApplication); @@ -71,7 +71,7 @@ namespace { WINDOW_CONSTRUCTOR_NEW_ASSIGNMENT_OPERATOR, WINDOW_SET_GET_PREFERRED_ORIENTATION, - WINDOW_GET_DRAGAND_DROP_DETECTOR_NATIVE_HANDLE, + WINDOW_GET_NATIVE_HANDLE, WINDOW_ADD_REMOVE_AVAILABLE_ORIENTATION, WINDOW_LOWER_RAISE_ACTIVATE, WINDOW_SET_CLASS, @@ -137,8 +137,8 @@ namespace case WINDOW_SET_GET_PREFERRED_ORIENTATION: WindowSetGetPreferredOrientation(mApplication); break; - case WINDOW_GET_DRAGAND_DROP_DETECTOR_NATIVE_HANDLE: - WindowGetDragandDropDetectorNativeHandle(mApplication); + case WINDOW_GET_NATIVE_HANDLE: + WindowGetNativeHandle(mApplication); break; case WINDOW_ADD_REMOVE_AVAILABLE_ORIENTATION: WindowAddRemoveAvailableOrientation(mApplication); @@ -278,24 +278,18 @@ void WindowSetGetPreferredOrientation(Application& mApplication) DaliLog::PrintPass(); } -void WindowGetDragandDropDetectorNativeHandle(Application& mApplication) +void WindowGetNativeHandle(Application& mApplication) { - - //~ PositionSize windowPosition(0, 0, 0, 0); - //~ Window window = Window::New( windowPosition, "my-window", false ); - Window window = mApplication.GetWindow(); - DALI_CHECK_FAIL(!window,"Window::New constructor is failed to create initialized window object"); - - Dali::Any handle = window.GetNativeHandle(); - bool bIsEmpty = handle.Empty(); - DALI_CHECK_FAIL(bIsEmpty," GetNativeHandle is failed" ); // as Any handle is not empty; window is initialized object - handle = 50.0f; - DALI_CHECK_FAIL( typeid( float ) != handle.GetType() , " GetNativeHandle could not create proper any-handle"); - - //~ DragAndDropDetector detector = window.GetDragAndDropDetector(); - //~ DALI_CHECK_FAIL(!detector, "GetDragAndDropDetector is failed to get detector empty handle from window"); - - DaliLog::PrintPass(); + Window window = mApplication.GetWindow(); + DALI_CHECK_FAIL(!window,"Window::New constructor is failed to create initialized window object"); + + Dali::Any handle = window.GetNativeHandle(); + bool bIsEmpty = handle.Empty(); + DALI_CHECK_FAIL(bIsEmpty," GetNativeHandle is failed" ); // as Any handle is not empty; window is initialized object + handle = 50.0f; + DALI_CHECK_FAIL( typeid( float ) != handle.GetType() , " GetNativeHandle could not create proper any-handle"); + + DaliLog::PrintPass(); } void WindowAddRemoveAvailableOrientation(Application& mApplication) { @@ -725,33 +719,33 @@ int ITcWindowSetGetPreferredOrientation(void) return test_return_value; } -//& purpose: Check if GetDragAndDropDetector and GetNativeHandle works properly or not +//& purpose: Check if Get and GetNativeHandle works properly or not //& type: auto /** -* @testcase ITcWindowGetDragandDropDetectorNativeHandle +* @testcase ITcWindowGetNativeHandle * @since_tizen 2.4 * @type Positive -* @description Check if GetDragAndDropDetector and GetNativeHandle works properly or not +* @description Check if GetNativeHandle works properly or not * @scenario Create an initialized window object \n * Check if the window object is created or not \n * Get Any handle from window object check if it is empty or not \n * Assign float value to any handle and check if it matches or not \n -* Get Detector handle from window and check if it is empty or not -* @apicovered Window::New(), Window::GetDragAndDropDetector(), Window::GetNativeHandle(), Any::Empty, Any::GetType -* @passcase if Draganddropdetector handle and nativehandle handle create and work properly -* @failcase if Draganddropdetector handle and nativehandle handle do not create and work properly +* Get Detector handle from window and check if it is empty or not +* @apicovered Window::New(), Window::GetNativeHandle(), Any::Empty, Any::GetType +* @passcase if nativehandle handle create and work properly +* @failcase if nativehandle handle do not create and work properly * @precondition NA * @postcondition NA */ -int ITcWindowGetDragandDropDetectorNativeHandle(void) -{ +int ITcWindowGetNativeHandle(void) +{ DaliLog::PrintExecStarted(SUITE_NAME, __FUNCTION__); Application application = Application::New( &gArgc, &gArgv ); CHECK_OPEN_GL(SUITE_NAME,__LINE__) - Window_TestApp testApp( application, WINDOW_GET_DRAGAND_DROP_DETECTOR_NATIVE_HANDLE); - application.MainLoop(); - return test_return_value; + Window_TestApp testApp( application, WINDOW_GET_NATIVE_HANDLE); + application.MainLoop(); + return test_return_value; } //& purpose: Check AddAvailableOrientation and RemoveAvailableOrientation APIs works correctly or not -- 2.34.1