+
+int UtcDaliControlImplTypeRegistry(void)
+{
+ ToolkitTestApplication application;
+
+ // Register Type
+ TypeInfo type;
+ type = TypeRegistry::Get().GetTypeInfo( "Control" );
+ DALI_TEST_CHECK( type );
+ BaseHandle handle = type.CreateInstance();
+ DALI_TEST_CHECK( handle );
+
+ // Check if it's a control
+ DALI_TEST_CHECK( Control::DownCast(handle) );
+ END_TEST;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+namespace
+{
+static bool MouseWheelEventCallback(Actor actor, const MouseWheelEvent& event)
+{
+ return false;
+}
+}
+
+int UtcDaliControlImplMouseWheelEvent(void)
+{
+ ToolkitTestApplication application;
+
+ {
+ DummyControl dummy = DummyControl::New( true );
+ dummy.SetRelayoutEnabled( true );
+ DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
+
+ dummy.SetSize( Vector2( 100.0f, 100.0f ) );
+ dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ Stage::GetCurrent().Add(dummy);
+
+ dummy.MouseWheelEventSignal().Connect(&MouseWheelEventCallback);
+
+ application.Render();
+ application.SendNotification();
+ application.Render();
+ application.SendNotification();
+
+ DALI_TEST_EQUALS( dummyImpl.mouseWheelEventCalled, false, TEST_LOCATION );
+
+ // simulate a mouse wheel event
+ Vector2 screenCoordinates( 10.0f, 10.0f );
+ Integration::MouseWheelEvent event(0, 0u, screenCoordinates, 1, 1000u);
+ application.ProcessEvent(event);
+ DALI_TEST_EQUALS( dummyImpl.mouseWheelEventCalled, true, TEST_LOCATION );
+
+ Stage::GetCurrent().Remove(dummy);
+ }
+
+ // Ensure full code coverage
+ {
+ DummyControl dummy = DummyControl::New();
+ dummy.SetRelayoutEnabled( true );
+
+ dummy.SetSize( Vector2( 100.0f, 100.0f ) );
+ dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ Stage::GetCurrent().Add(dummy);
+
+ dummy.MouseWheelEventSignal().Connect(&MouseWheelEventCallback);
+
+ application.Render();
+ application.SendNotification();
+ application.Render();
+ application.SendNotification();
+
+ // simulate a mouse wheel event
+ Vector2 screenCoordinates( 20.0f, 20.0f );
+ Integration::MouseWheelEvent event(0, 0u, screenCoordinates, 1, 1000u);
+ application.ProcessEvent(event);
+
+ Stage::GetCurrent().Remove(dummy);
+ }
+ END_TEST;
+}