#include <dali/integration-api/events/touch-event-integ.h>
#include <dali/integration-api/events/hover-event-integ.h>
-#include <dali-toolkit/devel-api/styling/style-manager.h>
#include "dummy-control.h"
TapGestureDetector tap = dummyImpl.GetTapGestureDetector();
LongPressGestureDetector longPress = dummyImpl.GetLongPressGestureDetector();
- DALI_TEST_EQUALS( pinch.GetAttachedActors().empty(), false, TEST_LOCATION );
- DALI_TEST_EQUALS( pan.GetAttachedActors().empty(), false, TEST_LOCATION );
- DALI_TEST_EQUALS( tap.GetAttachedActors().empty(), false, TEST_LOCATION );
- DALI_TEST_EQUALS( longPress.GetAttachedActors().empty(), false, TEST_LOCATION );
+ DALI_TEST_EQUALS( 0 == pinch.GetAttachedActorCount(), false, TEST_LOCATION );
+ DALI_TEST_EQUALS( 0 == pan.GetAttachedActorCount(), false, TEST_LOCATION );
+ DALI_TEST_EQUALS( 0 == tap.GetAttachedActorCount(), false, TEST_LOCATION );
+ DALI_TEST_EQUALS( 0 == longPress.GetAttachedActorCount(), false, TEST_LOCATION );
dummyImpl.DisableGestureDetection( Gesture::Type(Gesture::Pinch | Gesture::Pan | Gesture::Tap | Gesture::LongPress) );
- DALI_TEST_EQUALS( pinch.GetAttachedActors().empty(), true, TEST_LOCATION );
- DALI_TEST_EQUALS( pan.GetAttachedActors().empty(), true, TEST_LOCATION );
- DALI_TEST_EQUALS( tap.GetAttachedActors().empty(), true, TEST_LOCATION );
- DALI_TEST_EQUALS( longPress.GetAttachedActors().empty(), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( 0 == pinch.GetAttachedActorCount(), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( 0 == pan.GetAttachedActorCount(), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( 0 == tap.GetAttachedActorCount(), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( 0 == longPress.GetAttachedActorCount(), true, TEST_LOCATION );
}
END_TEST;
}
DALI_TEST_EQUALS( dummyImpl.childAddCalled, false, TEST_LOCATION );
DALI_TEST_EQUALS( dummy.GetChildCount(), 0u, TEST_LOCATION );
- Actor actor = RenderableActor::New();
+ Actor actor = Actor::New();
dummy.Add(actor);
DALI_TEST_EQUALS( dummyImpl.childAddCalled, true, TEST_LOCATION );
DALI_TEST_EQUALS( dummy.GetChildCount(), 1u, TEST_LOCATION );
application.SendNotification();
DALI_TEST_EQUALS( dummy.GetChildCount(), 0u, TEST_LOCATION );
- Actor actor = RenderableActor::New();
+ Actor actor = Actor::New();
dummy.Add(actor);
DALI_TEST_EQUALS( dummy.GetChildCount(), 1u, TEST_LOCATION );
DALI_TEST_EQUALS( dummyImpl.touchEventCalled, false, TEST_LOCATION );
Integration::TouchEvent touchEvent(1);
- TouchPoint point(1, TouchPoint::Down, 20.0f, 20.0f);
+ Integration::Point point;
+ point.SetDeviceId( 1 );
+ point.SetState( PointState::DOWN );
+ point.SetScreenPosition( Vector2( 20.0f, 20.0f ) );
touchEvent.AddPoint(point);
application.ProcessEvent(touchEvent);
DALI_TEST_EQUALS( dummyImpl.touchEventCalled, true, TEST_LOCATION );
application.SendNotification();
Integration::TouchEvent touchEvent(1);
- TouchPoint point(1, TouchPoint::Down, 20.0f, 20.0f);
+ Integration::Point point;
+ point.SetDeviceId( 1 );
+ point.SetState( PointState::DOWN );
+ point.SetScreenPosition( Vector2( 20.0f, 20.0f ) );
touchEvent.AddPoint(point);
application.ProcessEvent(touchEvent);
DALI_TEST_EQUALS( dummyImpl.hoverEventCalled, false, TEST_LOCATION );
Integration::HoverEvent event(1);
- TouchPoint point( 1, TouchPoint::Motion, 20.0f, 20.0f );
- event.AddPoint( point );
+ Integration::Point point;
+ point.SetDeviceId( 1 );
+ point.SetState( PointState::MOTION );
+ point.SetScreenPosition( Vector2( 20.0f, 20.0f ) );
+ event.AddPoint(point);
application.ProcessEvent( event );
DALI_TEST_EQUALS( dummyImpl.hoverEventCalled, true, TEST_LOCATION );
application.SendNotification();
Integration::HoverEvent event(1);
- TouchPoint point( 1, TouchPoint::Motion, 20.0f, 20.0f );
- event.AddPoint( point );
+ Integration::Point point;
+ point.SetDeviceId( 1 );
+ point.SetState( PointState::MOTION );
+ point.SetScreenPosition( Vector2( 20.0f, 20.0f ) );
+ event.AddPoint(point);
application.ProcessEvent( event );
Stage::GetCurrent().Remove(dummy);
DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
- dummyImpl.OnAccessibilityValueChange( true );
dummyImpl.IsKeyboardNavigationSupported();
dummyImpl.IsKeyboardFocusGroup();
Control dummy = Control::New();
Toolkit::Internal::Control& controlImpl = Toolkit::Internal::GetImplementation( dummy );
- // test that style manager is being used, passing an empty handle throws exception
- try
- {
- Dali::Toolkit::StyleManager styleManager;
- controlImpl.OnStyleChange( styleManager, StyleChange::THEME_CHANGE );
- tet_result(TET_FAIL);
- }
- catch (DaliException &exception)
- {
- tet_result(TET_PASS);
- }
+ // test that style manager is being used, passing an empty handle does nothing but does not crash either
+ Dali::Toolkit::StyleManager styleManager;
+ controlImpl.OnStyleChange( styleManager, StyleChange::THEME_CHANGE );
+ // no crash so test passes
+ tet_result(TET_PASS);
END_TEST;
}
BaseHandle handle = type.CreateInstance();
DALI_TEST_CHECK( handle );
- std::vector<Property::Value> attributes;
- DALI_TEST_EQUALS( false, handle.DoAction("control-activated", attributes), TEST_LOCATION );
+ Property::Map attributes;
+ DALI_TEST_EQUALS( false, handle.DoAction("accessibilityActivated", attributes), TEST_LOCATION );
END_TEST;
}
END_TEST;
}
-
-
-
-