- Stage::GetCurrent().Remove(dummy);
- }
- END_TEST;
-}
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-int UtcDaliControlImplTouchEvent(void)
-{
- ToolkitTestApplication application;
-
- {
- DummyControl dummy = DummyControl::New( true );
- DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
-
- dummy.SetSize( Vector2( 100.0f, 100.0f ) );
- dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
- Stage::GetCurrent().Add(dummy);
-
- application.Render();
- application.SendNotification();
- application.Render();
- application.SendNotification();
-
- DALI_TEST_EQUALS( dummyImpl.touchEventCalled, false, TEST_LOCATION );
- Integration::TouchEvent touchEvent(1);
- TouchPoint point(1, TouchPoint::Down, 20.0f, 20.0f);
- touchEvent.AddPoint(point);
- application.ProcessEvent(touchEvent);
- DALI_TEST_EQUALS( dummyImpl.touchEventCalled, true, TEST_LOCATION );
-
- Stage::GetCurrent().Remove(dummy);
- }
-
- // Ensure full code coverage
- {
- DummyControl dummy = DummyControl::New();
-
- dummy.SetSize( Vector2( 100.0f, 100.0f ) );
- dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
- Stage::GetCurrent().Add(dummy);
-
- application.Render();
- application.SendNotification();
- application.Render();
- application.SendNotification();
-
- Integration::TouchEvent touchEvent(1);
- TouchPoint point(1, TouchPoint::Down, 20.0f, 20.0f);
- touchEvent.AddPoint(point);
- application.ProcessEvent(touchEvent);
-
- Stage::GetCurrent().Remove(dummy);
- }
- END_TEST;
-}
-
-int UtcDaliControlImplHoverEvent(void)
-{
- ToolkitTestApplication application;
-
- {
- DummyControl dummy = DummyControl::New( true );
- DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
-
- dummy.SetSize( Vector2( 100.0f, 100.0f ) );
- dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
- Stage::GetCurrent().Add(dummy);
-
- application.Render();
- application.SendNotification();
- application.Render();
- application.SendNotification();
-
- DALI_TEST_EQUALS( dummyImpl.hoverEventCalled, false, TEST_LOCATION );
- Integration::HoverEvent event(1);
- TouchPoint point( 1, TouchPoint::Motion, 20.0f, 20.0f );
- event.AddPoint( point );
- application.ProcessEvent( event );
- DALI_TEST_EQUALS( dummyImpl.hoverEventCalled, true, TEST_LOCATION );
-
- Stage::GetCurrent().Remove(dummy);
- }
-
- // Ensure full code coverage
- {
- DummyControl dummy = DummyControl::New();
-
- dummy.SetSize( Vector2( 100.0f, 100.0f ) );
- dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
- Stage::GetCurrent().Add(dummy);
-
- application.Render();
- application.SendNotification();
- application.Render();
- application.SendNotification();
-
- Integration::HoverEvent event(1);
- TouchPoint point( 1, TouchPoint::Motion, 20.0f, 20.0f );
- event.AddPoint( point );
- application.ProcessEvent( event );
-
- Stage::GetCurrent().Remove(dummy);