2 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
21 // Need to override adaptor classes for toolkit test harness, so include
22 // test harness headers before dali headers.
23 #include <dali-toolkit-test-suite-utils.h>
24 #include "toolkit-style-monitor.h"
27 #include <dali-toolkit/dali-toolkit.h>
28 #include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
29 #include <dali/integration-api/events/key-event-integ.h>
30 #include <dali/integration-api/events/wheel-event-integ.h>
31 #include <dali/integration-api/events/long-press-gesture-event.h>
32 #include <dali/integration-api/events/pinch-gesture-event.h>
33 #include <dali/integration-api/events/pan-gesture-event.h>
34 #include <dali/integration-api/events/tap-gesture-event.h>
35 #include <dali/integration-api/events/touch-event-integ.h>
36 #include <dali/integration-api/events/hover-event-integ.h>
39 #include "dummy-control.h"
42 using namespace Dali::Toolkit;
44 void utc_dali_toolkit_control_impl_startup(void)
46 test_return_value = TET_UNDEF;
49 void utc_dali_toolkit_control_impl_cleanup(void)
51 test_return_value = TET_PASS;
54 int UtcDaliControlImplNew(void)
56 ToolkitTestApplication application; // Exceptions require ToolkitTestApplication
60 DALI_TEST_CHECK( !Control::DownCast(control) );
62 control = Toolkit::Internal::Control::New();
64 DALI_TEST_CHECK( Control::DownCast(control) );
69 int UtcDaliControlImplEnableGestureDetector(void)
71 ToolkitTestApplication application;
73 // Enable individually
75 DummyControl dummy = DummyControl::New();
76 DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(dummy.GetImplementation());
78 DALI_TEST_CHECK( !dummyImpl.GetPinchGestureDetector() );
79 dummyImpl.EnableGestureDetection(Gesture::Pinch);
80 DALI_TEST_CHECK( dummyImpl.GetPinchGestureDetector() );
82 DALI_TEST_CHECK( !dummyImpl.GetPanGestureDetector() );
83 dummyImpl.EnableGestureDetection(Gesture::Pan);
84 DALI_TEST_CHECK( dummyImpl.GetPanGestureDetector() );
86 DALI_TEST_CHECK( !dummyImpl.GetTapGestureDetector() );
87 dummyImpl.EnableGestureDetection(Gesture::Tap);
88 DALI_TEST_CHECK( dummyImpl.GetTapGestureDetector() );
90 DALI_TEST_CHECK( !dummyImpl.GetLongPressGestureDetector() );
91 dummyImpl.EnableGestureDetection(Gesture::LongPress);
92 DALI_TEST_CHECK( dummyImpl.GetLongPressGestureDetector() );
97 DummyControl dummy = DummyControl::New();
98 DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(dummy.GetImplementation());
100 DALI_TEST_CHECK( !dummyImpl.GetPinchGestureDetector() );
101 DALI_TEST_CHECK( !dummyImpl.GetPanGestureDetector() );
102 DALI_TEST_CHECK( !dummyImpl.GetTapGestureDetector() );
103 DALI_TEST_CHECK( !dummyImpl.GetLongPressGestureDetector() );
105 dummyImpl.EnableGestureDetection( Gesture::Type(Gesture::Pinch | Gesture::Pan | Gesture::Tap | Gesture::LongPress) );
107 DALI_TEST_CHECK( dummyImpl.GetPinchGestureDetector() );
108 DALI_TEST_CHECK( dummyImpl.GetPanGestureDetector() );
109 DALI_TEST_CHECK( dummyImpl.GetTapGestureDetector() );
110 DALI_TEST_CHECK( dummyImpl.GetLongPressGestureDetector() );
112 // Enable when already enabled
114 dummyImpl.EnableGestureDetection( Gesture::Type(Gesture::Pinch | Gesture::Pan | Gesture::Tap | Gesture::LongPress) );
116 DALI_TEST_CHECK( dummyImpl.GetPinchGestureDetector() );
117 DALI_TEST_CHECK( dummyImpl.GetPanGestureDetector() );
118 DALI_TEST_CHECK( dummyImpl.GetTapGestureDetector() );
119 DALI_TEST_CHECK( dummyImpl.GetLongPressGestureDetector() );
124 int UtcDaliControlImplDisableGestureDetector(void)
126 ToolkitTestApplication application;
128 // Disable individually
130 DummyControl dummy = DummyControl::New();
131 DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(dummy.GetImplementation());
133 dummyImpl.EnableGestureDetection( Gesture::Type(Gesture::Pinch | Gesture::Pan | Gesture::Tap | Gesture::LongPress) );
135 DALI_TEST_CHECK( dummyImpl.GetPinchGestureDetector() );
136 dummyImpl.DisableGestureDetection(Gesture::Pinch);
137 DALI_TEST_CHECK( !dummyImpl.GetPinchGestureDetector() );
139 DALI_TEST_CHECK( dummyImpl.GetPanGestureDetector() );
140 dummyImpl.DisableGestureDetection(Gesture::Pan);
141 DALI_TEST_CHECK( !dummyImpl.GetPanGestureDetector() );
143 DALI_TEST_CHECK( dummyImpl.GetTapGestureDetector() );
144 dummyImpl.DisableGestureDetection(Gesture::Tap);
145 DALI_TEST_CHECK( !dummyImpl.GetTapGestureDetector() );
147 DALI_TEST_CHECK( dummyImpl.GetLongPressGestureDetector() );
148 dummyImpl.DisableGestureDetection(Gesture::LongPress);
149 DALI_TEST_CHECK( !dummyImpl.GetLongPressGestureDetector() );
154 DummyControl dummy = DummyControl::New();
155 DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(dummy.GetImplementation());
157 dummyImpl.EnableGestureDetection( Gesture::Type(Gesture::Pinch | Gesture::Pan | Gesture::Tap | Gesture::LongPress) );
159 DALI_TEST_CHECK( dummyImpl.GetPinchGestureDetector() );
160 DALI_TEST_CHECK( dummyImpl.GetPanGestureDetector() );
161 DALI_TEST_CHECK( dummyImpl.GetTapGestureDetector() );
162 DALI_TEST_CHECK( dummyImpl.GetLongPressGestureDetector() );
164 dummyImpl.DisableGestureDetection( Gesture::Type(Gesture::Pinch | Gesture::Pan | Gesture::Tap | Gesture::LongPress) );
166 DALI_TEST_CHECK( !dummyImpl.GetPinchGestureDetector() );
167 DALI_TEST_CHECK( !dummyImpl.GetPanGestureDetector() );
168 DALI_TEST_CHECK( !dummyImpl.GetTapGestureDetector() );
169 DALI_TEST_CHECK( !dummyImpl.GetLongPressGestureDetector() );
172 // Disable When not enabled
174 DummyControl dummy = DummyControl::New();
175 DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(dummy.GetImplementation());
177 DALI_TEST_CHECK( !dummyImpl.GetPinchGestureDetector() );
178 DALI_TEST_CHECK( !dummyImpl.GetPanGestureDetector() );
179 DALI_TEST_CHECK( !dummyImpl.GetTapGestureDetector() );
180 DALI_TEST_CHECK( !dummyImpl.GetLongPressGestureDetector() );
182 dummyImpl.DisableGestureDetection( Gesture::Type(Gesture::Pinch | Gesture::Pan | Gesture::Tap | Gesture::LongPress) );
184 DALI_TEST_CHECK( !dummyImpl.GetPinchGestureDetector() );
185 DALI_TEST_CHECK( !dummyImpl.GetPanGestureDetector() );
186 DALI_TEST_CHECK( !dummyImpl.GetTapGestureDetector() );
187 DALI_TEST_CHECK( !dummyImpl.GetLongPressGestureDetector() );
190 // Ensure control is detached if gesture detector is not deleted
192 DummyControl dummy = DummyControl::New();
193 DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(dummy.GetImplementation());
195 dummyImpl.EnableGestureDetection( Gesture::Type(Gesture::Pinch | Gesture::Pan | Gesture::Tap | Gesture::LongPress) );
197 PinchGestureDetector pinch = dummyImpl.GetPinchGestureDetector();
198 PanGestureDetector pan = dummyImpl.GetPanGestureDetector();
199 TapGestureDetector tap = dummyImpl.GetTapGestureDetector();
200 LongPressGestureDetector longPress = dummyImpl.GetLongPressGestureDetector();
202 DALI_TEST_EQUALS( 0 == pinch.GetAttachedActorCount(), false, TEST_LOCATION );
203 DALI_TEST_EQUALS( 0 == pan.GetAttachedActorCount(), false, TEST_LOCATION );
204 DALI_TEST_EQUALS( 0 == tap.GetAttachedActorCount(), false, TEST_LOCATION );
205 DALI_TEST_EQUALS( 0 == longPress.GetAttachedActorCount(), false, TEST_LOCATION );
207 dummyImpl.DisableGestureDetection( Gesture::Type(Gesture::Pinch | Gesture::Pan | Gesture::Tap | Gesture::LongPress) );
209 DALI_TEST_EQUALS( 0 == pinch.GetAttachedActorCount(), true, TEST_LOCATION );
210 DALI_TEST_EQUALS( 0 == pan.GetAttachedActorCount(), true, TEST_LOCATION );
211 DALI_TEST_EQUALS( 0 == tap.GetAttachedActorCount(), true, TEST_LOCATION );
212 DALI_TEST_EQUALS( 0 == longPress.GetAttachedActorCount(), true, TEST_LOCATION );
217 int UtcDaliControlImplOnGestureMethods(void)
219 ToolkitTestApplication application;
221 // Check gesture actually happens
223 DummyControl dummy = DummyControl::New(true);
224 dummy.SetSize( Vector2(100.0f, 100.0f ) );
226 dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
227 Stage::GetCurrent().Add(dummy);
229 // Render and notify a couple of times
230 application.SendNotification();
231 application.Render();
232 application.SendNotification();
233 application.Render();
235 DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
236 dummyImpl.EnableGestureDetection( Gesture::Type(Gesture::Pinch | Gesture::Pan | Gesture::Tap | Gesture::LongPress) );
238 DALI_TEST_CHECK( dummyImpl.pinchCalled == false );
239 Integration::PinchGestureEvent pinch(Gesture::Started);
242 pinch.centerPoint = Vector2(20.0f, 20.0f);
243 application.ProcessEvent(pinch);
244 DALI_TEST_CHECK( dummyImpl.pinchCalled == true );
246 DALI_TEST_CHECK( dummyImpl.panCalled == false );
247 Integration::PanGestureEvent pan(Gesture::Possible);
248 pan.previousPosition = Vector2(10.0f, 20.0f);
249 pan.currentPosition = Vector2(20.0f, 20.0f);
251 pan.numberOfTouches = 1u;
252 application.ProcessEvent(pan);
253 pan.state = Gesture::Started;
254 application.ProcessEvent(pan);
255 DALI_TEST_CHECK( dummyImpl.panCalled == true );
257 DALI_TEST_CHECK( dummyImpl.tapCalled == false );
258 Integration::TapGestureEvent tap(Gesture::Possible);
259 tap.numberOfTaps = 1u;
260 tap.numberOfTouches = 1u;
261 tap.point = Vector2(50.0f, 50.0f);
262 application.ProcessEvent(tap);
263 tap.state = Gesture::Started;
264 application.ProcessEvent(tap);
265 DALI_TEST_CHECK( dummyImpl.tapCalled == true );
267 DALI_TEST_CHECK( dummyImpl.longPressCalled == false );
268 Integration::LongPressGestureEvent longPress(Gesture::Possible);
269 longPress.numberOfTouches = 1u;
270 longPress.point = Vector2(50.0f, 50.0f);
271 application.ProcessEvent(longPress);
272 longPress.state = Gesture::Started;
273 application.ProcessEvent(longPress);
274 DALI_TEST_CHECK( dummyImpl.longPressCalled == true );
275 longPress.state = Gesture::Finished;
276 application.ProcessEvent(longPress);
278 Stage::GetCurrent().Remove(dummy);
281 // Ensure full code coverage
283 DummyControl dummy = DummyControl::New();
284 dummy.SetSize( Vector2( 100.0f, 100.0f ) );
286 dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
287 Stage::GetCurrent().Add(dummy);
289 // Render and notify a couple of times
290 application.SendNotification();
291 application.Render();
292 application.SendNotification();
293 application.Render();
295 DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(dummy.GetImplementation());
296 dummyImpl.EnableGestureDetection( Gesture::Type(Gesture::Pinch | Gesture::Pan | Gesture::Tap | Gesture::LongPress) );
298 DALI_TEST_CHECK( dummy.GetCurrentScale().x != 10.0f );
299 Integration::PinchGestureEvent pinch(Gesture::Started);
302 pinch.centerPoint = Vector2(20.0f, 20.0f);
303 application.ProcessEvent(pinch);
305 // Render and notify a couple of times
306 application.SendNotification();
307 application.Render();
308 application.SendNotification();
309 application.Render();
310 DALI_TEST_CHECK( dummy.GetCurrentScale().x == 10.0f );
312 Integration::PanGestureEvent pan(Gesture::Possible);
313 pan.previousPosition = Vector2(10.0f, 20.0f);
314 pan.currentPosition = Vector2(20.0f, 20.0f);
316 pan.numberOfTouches = 1u;
317 application.ProcessEvent(pan);
318 pan.state = Gesture::Started;
319 application.ProcessEvent(pan);
321 Integration::TapGestureEvent tap(Gesture::Possible);
322 tap.numberOfTaps = 1u;
323 tap.numberOfTouches = 1u;
324 tap.point = Vector2(50.0f, 50.0f);
325 application.ProcessEvent(tap);
326 tap.state = Gesture::Started;
327 application.ProcessEvent(tap);
329 Integration::LongPressGestureEvent longPress(Gesture::Possible);
330 longPress.numberOfTouches = 1u;
331 longPress.point = Vector2(50.0f, 50.0f);
332 application.ProcessEvent(longPress);
333 longPress.state = Gesture::Started;
334 application.ProcessEvent(longPress);
335 longPress.state = Gesture::Finished;
336 application.ProcessEvent(longPress);
338 Stage::GetCurrent().Remove(dummy);
343 int UtcDaliControlImplChildAddAndRemove(void)
345 ToolkitTestApplication application;
348 DummyControl dummy = DummyControl::New( true );
349 Stage::GetCurrent().Add(dummy);
350 DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
352 application.Render();
353 application.SendNotification();
355 DALI_TEST_EQUALS( dummyImpl.childAddCalled, false, TEST_LOCATION );
356 DALI_TEST_EQUALS( dummy.GetChildCount(), 0u, TEST_LOCATION );
357 Actor actor = Actor::New();
359 DALI_TEST_EQUALS( dummyImpl.childAddCalled, true, TEST_LOCATION );
360 DALI_TEST_EQUALS( dummy.GetChildCount(), 1u, TEST_LOCATION );
362 application.Render();
363 application.SendNotification();
365 DALI_TEST_EQUALS( dummyImpl.childRemoveCalled, false, TEST_LOCATION );
366 dummy.Remove( actor );
367 DALI_TEST_EQUALS( dummyImpl.childRemoveCalled, true, TEST_LOCATION );
368 DALI_TEST_EQUALS( dummy.GetChildCount(), 0u, TEST_LOCATION );
370 application.Render();
371 application.SendNotification();
373 Stage::GetCurrent().Remove(dummy);
376 // Ensure full code coverage
378 DummyControl dummy = DummyControl::New();
379 Stage::GetCurrent().Add(dummy);
381 application.Render();
382 application.SendNotification();
384 DALI_TEST_EQUALS( dummy.GetChildCount(), 0u, TEST_LOCATION );
385 Actor actor = Actor::New();
387 DALI_TEST_EQUALS( dummy.GetChildCount(), 1u, TEST_LOCATION );
389 application.Render();
390 application.SendNotification();
392 dummy.Remove( actor );
393 DALI_TEST_EQUALS( dummy.GetChildCount(), 0u, TEST_LOCATION );
395 application.Render();
396 application.SendNotification();
398 Stage::GetCurrent().Remove(dummy);
403 int UtcDaliControlImplStageConnection(void)
405 ToolkitTestApplication application;
408 DummyControl dummy = DummyControl::New( true );
409 DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
411 DALI_TEST_EQUALS( dummyImpl.stageConnectionCalled, false, TEST_LOCATION );
412 Stage::GetCurrent().Add(dummy);
413 application.Render();
414 application.SendNotification();
415 DALI_TEST_EQUALS( dummyImpl.stageConnectionCalled, true, TEST_LOCATION );
417 DALI_TEST_EQUALS( dummyImpl.stageDisconnectionCalled, false, TEST_LOCATION );
418 Stage::GetCurrent().Remove(dummy);
419 application.Render();
420 application.SendNotification();
421 DALI_TEST_EQUALS( dummyImpl.stageDisconnectionCalled, true, TEST_LOCATION );
424 // Ensure full code coverage
426 unsigned int stageChildren = Stage::GetCurrent().GetLayer(0).GetChildCount();
427 DummyControl dummy = DummyControl::New();
429 DALI_TEST_EQUALS( Stage::GetCurrent().GetLayer(0).GetChildCount(), stageChildren, TEST_LOCATION );
430 Stage::GetCurrent().Add(dummy);
431 application.Render();
432 application.SendNotification();
433 DALI_TEST_EQUALS( Stage::GetCurrent().GetLayer(0).GetChildCount(), stageChildren + 1, TEST_LOCATION );
435 Stage::GetCurrent().Remove(dummy);
436 application.Render();
437 application.SendNotification();
438 DALI_TEST_EQUALS( Stage::GetCurrent().GetLayer(0).GetChildCount(), stageChildren, TEST_LOCATION );
443 int UtcDaliControlImplSizeSetP(void)
445 ToolkitTestApplication application;
448 DummyControl dummy = DummyControl::New( true );
449 DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
451 Stage::GetCurrent().Add(dummy);
452 application.Render();
453 application.SendNotification();
455 DALI_TEST_EQUALS( dummyImpl.sizeSetCalled, false, TEST_LOCATION ); // Size not set, no onSizeSet called
456 Vector2 size(100.0f, 200.0f);
457 dummy.SetSize( size );
459 DALI_TEST_EQUALS( dummyImpl.sizeSetCalled, false, TEST_LOCATION ); // Size is going to get negotiated, no onSizeSet called
461 application.SendNotification();
462 application.Render();
464 DALI_TEST_EQUALS( size, dummy.GetCurrentSize().GetVectorXY(), TEST_LOCATION );
465 DALI_TEST_EQUALS( dummyImpl.sizeSetCalled, true, TEST_LOCATION );
467 Stage::GetCurrent().Remove(dummy);
473 int UtcDaliControlImplSizeSet2P(void)
475 ToolkitTestApplication application;
478 DummyControl dummy = DummyControl::New();
479 Stage::GetCurrent().Add(dummy);
481 Vector2 size(100.0f, 200.0f);
482 DALI_TEST_CHECK( size != dummy.GetCurrentSize().GetVectorXY() );
484 application.SendNotification();
485 application.Render();
489 application.SendNotification();
490 application.Render();
492 DALI_TEST_EQUALS(size, dummy.GetCurrentSize().GetVectorXY(), TEST_LOCATION);
494 Stage::GetCurrent().Remove(dummy);
500 int UtcDaliControlImplSizeAnimation(void)
502 ToolkitTestApplication application;
505 DummyControl dummy = DummyControl::New( true );
506 DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
508 Stage::GetCurrent().Add(dummy);
510 DALI_TEST_EQUALS( dummyImpl.sizeAnimationCalled, false, TEST_LOCATION );
511 Animation animation = Animation::New(1.0f);
512 animation.AnimateTo( Property( dummy, Actor::Property::SIZE ), Vector3( 100.0f, 150.0f, 200.0f ) );
515 application.Render();
516 application.SendNotification();
517 application.Render();
518 application.SendNotification();
520 DALI_TEST_EQUALS( dummyImpl.sizeAnimationCalled, true, TEST_LOCATION );
522 Stage::GetCurrent().Remove(dummy);
525 // Ensure full code coverage
527 DummyControl dummy = DummyControl::New();
529 Stage::GetCurrent().Add(dummy);
531 Animation animation = Animation::New(1.0f);
532 animation.AnimateTo( Property( dummy, Actor::Property::SIZE ), Vector3( 100.0f, 150.0f, 200.0f ) );
535 application.Render();
536 application.SendNotification();
537 application.Render();
538 application.SendNotification();
540 Stage::GetCurrent().Remove(dummy);
545 ///////////////////////////////////////////////////////////////////////////////////////////////////
547 int UtcDaliControlImplTouchEvent(void)
549 ToolkitTestApplication application;
552 DummyControl dummy = DummyControl::New( true );
553 DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
555 dummy.SetSize( Vector2( 100.0f, 100.0f ) );
556 dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
557 Stage::GetCurrent().Add(dummy);
559 application.Render();
560 application.SendNotification();
561 application.Render();
562 application.SendNotification();
564 DALI_TEST_EQUALS( dummyImpl.touchEventCalled, false, TEST_LOCATION );
565 Integration::TouchEvent touchEvent(1);
566 Integration::Point point;
567 point.SetDeviceId( 1 );
568 point.SetState( PointState::DOWN );
569 point.SetScreenPosition( Vector2( 20.0f, 20.0f ) );
570 touchEvent.AddPoint(point);
571 application.ProcessEvent(touchEvent);
572 DALI_TEST_EQUALS( dummyImpl.touchEventCalled, true, TEST_LOCATION );
574 Stage::GetCurrent().Remove(dummy);
577 // Ensure full code coverage
579 DummyControl dummy = DummyControl::New();
581 dummy.SetSize( Vector2( 100.0f, 100.0f ) );
582 dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
583 Stage::GetCurrent().Add(dummy);
585 application.Render();
586 application.SendNotification();
587 application.Render();
588 application.SendNotification();
590 Integration::TouchEvent touchEvent(1);
591 Integration::Point point;
592 point.SetDeviceId( 1 );
593 point.SetState( PointState::DOWN );
594 point.SetScreenPosition( Vector2( 20.0f, 20.0f ) );
595 touchEvent.AddPoint(point);
596 application.ProcessEvent(touchEvent);
598 Stage::GetCurrent().Remove(dummy);
603 int UtcDaliControlImplHoverEvent(void)
605 ToolkitTestApplication application;
608 DummyControl dummy = DummyControl::New( true );
609 DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
611 dummy.SetSize( Vector2( 100.0f, 100.0f ) );
612 dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
613 Stage::GetCurrent().Add(dummy);
615 application.Render();
616 application.SendNotification();
617 application.Render();
618 application.SendNotification();
620 DALI_TEST_EQUALS( dummyImpl.hoverEventCalled, false, TEST_LOCATION );
621 Integration::HoverEvent event(1);
622 Integration::Point point;
623 point.SetDeviceId( 1 );
624 point.SetState( PointState::MOTION );
625 point.SetScreenPosition( Vector2( 20.0f, 20.0f ) );
626 event.AddPoint(point);
627 application.ProcessEvent( event );
628 DALI_TEST_EQUALS( dummyImpl.hoverEventCalled, true, TEST_LOCATION );
630 Stage::GetCurrent().Remove(dummy);
633 // Ensure full code coverage
635 DummyControl dummy = DummyControl::New();
637 dummy.SetSize( Vector2( 100.0f, 100.0f ) );
638 dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
639 Stage::GetCurrent().Add(dummy);
641 application.Render();
642 application.SendNotification();
643 application.Render();
644 application.SendNotification();
646 Integration::HoverEvent event(1);
647 Integration::Point point;
648 point.SetDeviceId( 1 );
649 point.SetState( PointState::MOTION );
650 point.SetScreenPosition( Vector2( 20.0f, 20.0f ) );
651 event.AddPoint(point);
652 application.ProcessEvent( event );
654 Stage::GetCurrent().Remove(dummy);
659 ///////////////////////////////////////////////////////////////////////////////////////////////////
662 int UtcDaliControlImplKeyEvent(void)
664 ToolkitTestApplication application;
667 DummyControl dummy = DummyControl::New( true );
668 DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
670 Stage::GetCurrent().Add(dummy);
671 dummy.SetKeyInputFocus();
673 application.Render();
674 application.SendNotification();
675 application.Render();
676 application.SendNotification();
678 DALI_TEST_EQUALS( dummyImpl.keyEventCalled, false, TEST_LOCATION );
679 Integration::KeyEvent keyEvent;
680 application.ProcessEvent(keyEvent);
681 DALI_TEST_EQUALS( dummyImpl.keyEventCalled, true, TEST_LOCATION );
683 Stage::GetCurrent().Remove(dummy);
686 // Ensure full code coverage
688 DummyControl dummy = DummyControl::New();
690 Stage::GetCurrent().Add(dummy);
691 dummy.SetKeyInputFocus();
693 application.Render();
694 application.SendNotification();
695 application.Render();
696 application.SendNotification();
698 Integration::KeyEvent keyEvent;
699 application.ProcessEvent(keyEvent);
701 Stage::GetCurrent().Remove(dummy);
706 int UtcDaliControlImplKeyInputFocusGained(void)
708 ToolkitTestApplication application;
711 DummyControl dummy = DummyControl::New( true );
712 DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
714 Stage::GetCurrent().Add(dummy);
716 DALI_TEST_EQUALS( dummyImpl.keyInputFocusGained, false, TEST_LOCATION );
718 dummy.SetKeyInputFocus();
720 DALI_TEST_EQUALS( dummyImpl.keyInputFocusGained, true, TEST_LOCATION );
722 Stage::GetCurrent().Remove(dummy);
725 // Ensure full code coverage
727 DummyControl dummy = DummyControl::New();
729 Stage::GetCurrent().Add(dummy);
730 dummy.SetKeyInputFocus();
731 Stage::GetCurrent().Remove(dummy);
736 int UtcDaliControlImplKeyInputFocusLost(void)
738 ToolkitTestApplication application;
741 DummyControl dummy = DummyControl::New( true );
742 DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
744 Stage::GetCurrent().Add(dummy);
746 DALI_TEST_EQUALS( dummyImpl.keyInputFocusLost, false, TEST_LOCATION );
748 dummy.SetKeyInputFocus();
749 dummy.ClearKeyInputFocus();
751 DALI_TEST_EQUALS( dummyImpl.keyInputFocusLost, true, TEST_LOCATION );
753 Stage::GetCurrent().Remove(dummy);
756 // Ensure full code coverage
758 DummyControl dummy = DummyControl::New();
760 Stage::GetCurrent().Add(dummy);
761 dummy.SetKeyInputFocus();
762 dummy.ClearKeyInputFocus();
764 DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
766 dummyImpl.IsKeyboardNavigationSupported();
767 dummyImpl.IsKeyboardFocusGroup();
769 Stage::GetCurrent().Remove(dummy);
774 int UtcDaliControlImplTypeRegistry(void)
776 ToolkitTestApplication application;
780 type = TypeRegistry::Get().GetTypeInfo( "Control" );
781 DALI_TEST_CHECK( type );
782 BaseHandle handle = type.CreateInstance();
783 DALI_TEST_CHECK( handle );
785 // Check if it's a control
786 DALI_TEST_CHECK( Control::DownCast(handle) );
791 ///////////////////////////////////////////////////////////////////////////////////////////////////
794 static bool WheelEventCallback(Actor actor, const WheelEvent& event)
800 int UtcDaliControlImplWheelEvent(void)
802 ToolkitTestApplication application;
805 DummyControl dummy = DummyControl::New( true );
806 DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
808 dummy.SetSize( Vector2( 100.0f, 100.0f ) );
809 dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
810 Stage::GetCurrent().Add(dummy);
812 dummy.WheelEventSignal().Connect(&WheelEventCallback);
814 application.Render();
815 application.SendNotification();
816 application.Render();
817 application.SendNotification();
819 DALI_TEST_EQUALS( dummyImpl.wheelEventCalled, false, TEST_LOCATION );
821 // simulate a wheel event
822 Vector2 screenCoordinates( 10.0f, 10.0f );
823 Integration::WheelEvent event( Integration::WheelEvent::MOUSE_WHEEL, 0, 0u, screenCoordinates, 1, 1000u );
824 application.ProcessEvent( event );
825 DALI_TEST_EQUALS( dummyImpl.wheelEventCalled, true, TEST_LOCATION );
827 Stage::GetCurrent().Remove(dummy);
830 // Ensure full code coverage
832 DummyControl dummy = DummyControl::New();
834 dummy.SetSize( Vector2( 100.0f, 100.0f ) );
835 dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
836 Stage::GetCurrent().Add(dummy);
838 dummy.WheelEventSignal().Connect(&WheelEventCallback);
840 application.Render();
841 application.SendNotification();
842 application.Render();
843 application.SendNotification();
845 // simulate a wheel event
846 Vector2 screenCoordinates( 20.0f, 20.0f );
847 Integration::WheelEvent event( Integration::WheelEvent::MOUSE_WHEEL, 0, 0u, screenCoordinates, 1, 1000u );
848 application.ProcessEvent( event );
850 Stage::GetCurrent().Remove(dummy);
855 int UtcDaliControlImplSetStyleName(void)
857 ToolkitTestApplication application;
860 DummyControl dummy = DummyControl::New( true );
862 dummy.SetSize( Vector2( 100.0f, 100.0f ) );
863 dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
864 Stage::GetCurrent().Add(dummy);
866 dummy.SetStyleName("TestStyle");
868 DALI_TEST_CHECK( dummy.GetStyleName() == "TestStyle" );
870 Stage::GetCurrent().Remove(dummy);
875 int UtcDaliControlImplOnStyleChangeN(void)
877 ToolkitTestApplication application;
878 Control dummy = Control::New();
879 Toolkit::Internal::Control& controlImpl = Toolkit::Internal::GetImplementation( dummy );
881 // test that style manager is being used, passing an empty handle does nothing but does not crash either
882 Dali::Toolkit::StyleManager styleManager;
883 controlImpl.OnStyleChange( styleManager, StyleChange::THEME_CHANGE );
884 // no crash so test passes
885 tet_result(TET_PASS);
891 int UtcDaliControlImplOnAccessibilityPanP(void)
893 ToolkitTestApplication application;
894 Control dummy = Control::New();
895 Toolkit::Internal::Control& controlImpl = Toolkit::Internal::GetImplementation( dummy );
898 DALI_TEST_EQUALS( false, controlImpl.OnAccessibilityPan( pan ), TEST_LOCATION );
903 int UtcDaliControlImplOnAccessibilityTouchP(void)
905 ToolkitTestApplication application;
906 Control dummy = Control::New();
907 Toolkit::Internal::Control& controlImpl = Toolkit::Internal::GetImplementation( dummy );
909 DALI_TEST_EQUALS( false, controlImpl.OnAccessibilityTouch( touch ), TEST_LOCATION );
914 int UtcDaliControlImplOnAccessibilityActivatedP(void)
916 ToolkitTestApplication application;
918 Control dummy = Control::New();
919 Toolkit::Internal::Control& controlImpl = Toolkit::Internal::GetImplementation( dummy );
920 DALI_TEST_EQUALS( false, controlImpl.OnAccessibilityActivated(), TEST_LOCATION );
922 // Invoke the control's activate action
923 TypeInfo type = TypeRegistry::Get().GetTypeInfo( "Control" );
924 DALI_TEST_CHECK( type );
926 BaseHandle handle = type.CreateInstance();
927 DALI_TEST_CHECK( handle );
929 Property::Map attributes;
930 DALI_TEST_EQUALS( false, handle.DoAction("accessibilityActivated", attributes), TEST_LOCATION );
935 int UtcDaliControlImplGetNextKeyboardFocusableActorP(void)
937 ToolkitTestApplication application;
938 Control dummy = Control::New();
939 Toolkit::Internal::Control& controlImpl = Toolkit::Internal::GetImplementation( dummy );
941 Actor currentFocusedActor;
942 Actor result = controlImpl.GetNextKeyboardFocusableActor( currentFocusedActor, Control::KeyboardFocus::LEFT, false );
944 DALI_TEST_EQUALS( result, currentFocusedActor, TEST_LOCATION );
949 int UtcDaliControlImplRegisterThenReRegisterVisual(void)
951 ToolkitTestApplication application;
953 DummyControl dummy = DummyControl::New();
954 DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(dummy.GetImplementation());
956 Property::Index index =1;
958 DALI_TEST_CHECK( !dummyImpl.GetVisual( index ) );
960 Toolkit::VisualFactory visualFactory = Toolkit::VisualFactory::Get();
961 Toolkit::Visual::Base visual;
964 map[Visual::Property::TYPE] = Visual::COLOR;
965 map[ColorVisual::Property::MIX_COLOR] = Color::RED;
967 visual = visualFactory.CreateVisual( map );
968 DALI_TEST_CHECK(visual);
970 // Register index with a color visual
971 dummyImpl.RegisterVisual( index, visual );
973 DALI_TEST_CHECK( dummyImpl.GetVisual( index ) == visual );
975 Property::Map newMap;
976 newMap[Visual::Property::TYPE] = Visual::COLOR;
977 newMap[ColorVisual::Property::MIX_COLOR] = Color::BLUE;
979 visual = visualFactory.CreateVisual( newMap );
980 DALI_TEST_CHECK(visual);
982 // ReRegister with altered color visual
983 dummyImpl.RegisterVisual( index, visual );
985 DALI_TEST_CHECK( dummyImpl.GetVisual( index ) == visual );
987 tet_result(TET_PASS);
992 int UtcDaliControlImplRegisterVisaulThenReRegisterToSelf(void)
994 ToolkitTestApplication application;
996 DummyControl dummy = DummyControl::New();
997 DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(dummy.GetImplementation());
999 Property::Index index =1;
1001 Toolkit::VisualFactory visualFactory = Toolkit::VisualFactory::Get();
1002 Toolkit::Visual::Base visual;
1005 map[Visual::Property::TYPE] = Visual::COLOR;
1006 map[ColorVisual::Property::MIX_COLOR] = Color::RED;
1008 visual = visualFactory.CreateVisual( map );
1009 DALI_TEST_CHECK(visual);
1011 // Register index with a color visual
1012 dummyImpl.RegisterVisual( index, visual );
1014 DALI_TEST_CHECK( dummyImpl.GetVisual( index ) == visual );
1016 // ReRegister to self
1017 dummyImpl.RegisterVisual( index, visual );
1019 DALI_TEST_CHECK( dummyImpl.GetVisual( index ) == visual );
1024 int UtcDaliControlImplRegisterVisualToSelf(void)
1026 ToolkitTestApplication application;
1028 Test::ObjectDestructionTracker objectDestructionTracker;
1031 DummyControl dummy = DummyControl::New();
1032 DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(dummy.GetImplementation());
1033 objectDestructionTracker.Start( dummy );
1035 Property::Index index = 1;
1037 Toolkit::VisualFactory visualFactory = Toolkit::VisualFactory::Get();
1038 Toolkit::Visual::Base visual;
1041 map[Visual::Property::TYPE] = Visual::COLOR;
1042 map[ColorVisual::Property::MIX_COLOR] = Color::RED;
1044 visual = visualFactory.CreateVisual( map );
1045 DALI_TEST_CHECK(visual);
1048 dummyImpl.RegisterVisual( index, visual );
1050 DALI_TEST_EQUALS( objectDestructionTracker.IsDestroyed(), false, TEST_LOCATION ); // Control not destroyed yet
1051 DALI_TEST_CHECK( dummyImpl.GetVisual( index ) == visual );
1054 DALI_TEST_EQUALS( objectDestructionTracker.IsDestroyed(), true, TEST_LOCATION ); // Should be destroyed
1059 int UtcDaliControlImplRegisterTwoVisuals(void)
1061 ToolkitTestApplication application;
1063 DummyControl dummy = DummyControl::New();
1064 DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(dummy.GetImplementation());
1066 Property::Index index =1;
1067 Property::Index index2 =2;
1069 Toolkit::VisualFactory visualFactory = Toolkit::VisualFactory::Get();
1070 Toolkit::Visual::Base visual;
1071 Toolkit::Visual::Base secondVisual;
1074 map[Visual::Property::TYPE] = Visual::COLOR;
1075 map[ColorVisual::Property::MIX_COLOR] = Color::RED;
1077 visual = visualFactory.CreateVisual( map );
1078 DALI_TEST_CHECK(visual);
1080 // Register index with a color visual
1081 dummyImpl.RegisterVisual( index, visual );
1083 Property::Map newMap;
1084 newMap[Visual::Property::TYPE] = Visual::COLOR;
1085 newMap[ColorVisual::Property::MIX_COLOR] = Color::BLUE;
1087 secondVisual = visualFactory.CreateVisual( newMap );
1088 DALI_TEST_CHECK( secondVisual );
1090 // ReRegister with altered color visual
1091 dummyImpl.RegisterVisual( index2, secondVisual );
1093 DALI_TEST_CHECK( dummyImpl.GetVisual( index ) == visual );
1094 DALI_TEST_CHECK( dummyImpl.GetVisual( index2 ) == secondVisual );
1099 int UtcDaliControlImplRegisterUnregisterVisual(void)
1101 ToolkitTestApplication application;
1103 DummyControl dummy = DummyControl::New();
1104 DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(dummy.GetImplementation());
1106 Property::Index index =1;
1108 Toolkit::VisualFactory visualFactory = Toolkit::VisualFactory::Get();
1109 Toolkit::Visual::Base visual;
1112 map[Visual::Property::TYPE] = Visual::COLOR;
1113 map[ColorVisual::Property::MIX_COLOR] = Color::RED;
1115 visual = visualFactory.CreateVisual( map );
1116 DALI_TEST_CHECK(visual);
1118 // Register index with a color visual
1119 dummyImpl.RegisterVisual( index, visual );
1121 tet_infoline( "Add control with visual to stage and check renderer count is 1" );
1122 Stage::GetCurrent().Add( dummy );
1123 application.SendNotification();
1124 application.Render();
1126 DALI_TEST_CHECK( dummyImpl.GetVisual( index ) == visual );
1127 DALI_TEST_EQUALS( dummy.GetRendererCount(), 1, TEST_LOCATION );
1129 // Unregister visual
1130 dummyImpl.UnregisterVisual( index );
1132 tet_infoline( "Remove control with visual from stage and check renderer count is 0" );
1133 Stage::GetCurrent().Remove( dummy );
1134 application.SendNotification();
1135 application.Render();
1137 DALI_TEST_EQUALS( dummy.GetRendererCount(), 0, TEST_LOCATION );
1138 DALI_TEST_CHECK( !dummyImpl.GetVisual( index ) );
1143 int UtcDaliControlImplRegisterDisabledVisual(void)
1145 ToolkitTestApplication application;
1147 DummyControl dummy = DummyControl::New();
1148 DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(dummy.GetImplementation());
1150 Property::Index TEST_PROPERTY =1;
1152 Toolkit::VisualFactory visualFactory = Toolkit::VisualFactory::Get();
1153 Toolkit::Visual::Base visual;
1156 map[Visual::Property::TYPE] = Visual::COLOR;
1157 map[ColorVisual::Property::MIX_COLOR] = Color::RED;
1159 visual = visualFactory.CreateVisual( map );
1160 DALI_TEST_CHECK(visual);
1162 // Register index with a color visual
1163 dummyImpl.RegisterVisual( TEST_PROPERTY, visual, false );
1165 DALI_TEST_CHECK( dummyImpl.GetVisual( TEST_PROPERTY ) == visual );
1166 DALI_TEST_CHECK( dummyImpl.IsVisualEnabled( TEST_PROPERTY ) == false );
1168 Stage::GetCurrent().Add(dummy);
1170 // Render and notify
1171 application.SendNotification();
1172 application.Render();
1174 DALI_TEST_CHECK( dummyImpl.IsVisualEnabled( TEST_PROPERTY ) == false );
1176 DALI_TEST_CHECK( dummy.OnStage() == true );
1178 dummyImpl.EnableVisual( TEST_PROPERTY, true );
1180 DALI_TEST_CHECK( dummyImpl.IsVisualEnabled( TEST_PROPERTY ) == true );
1185 int UtcDaliControlImplDisableRegisteredVisual(void)
1187 ToolkitTestApplication application;
1189 DummyControl dummy = DummyControl::New();
1190 DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(dummy.GetImplementation());
1192 Property::Index TEST_PROPERTY =1;
1194 Toolkit::VisualFactory visualFactory = Toolkit::VisualFactory::Get();
1195 Toolkit::Visual::Base visual;
1198 map[Visual::Property::TYPE] = Visual::COLOR;
1199 map[ColorVisual::Property::MIX_COLOR] = Color::RED;
1201 visual = visualFactory.CreateVisual( map );
1202 DALI_TEST_CHECK(visual);
1204 // Register index with a color visual
1205 dummyImpl.RegisterVisual( TEST_PROPERTY, visual );
1207 Stage::GetCurrent().Add(dummy);
1209 // Render and notify
1210 application.SendNotification();
1211 application.Render();
1213 DALI_TEST_CHECK( dummyImpl.IsVisualEnabled( TEST_PROPERTY ) == true);
1215 DALI_TEST_CHECK( dummy.OnStage() == true );
1217 dummyImpl.EnableVisual( TEST_PROPERTY, false );
1219 DALI_TEST_CHECK( dummyImpl.IsVisualEnabled( TEST_PROPERTY ) == false );
1224 int UtcDaliControlImplEnabledVisualParentRemovedFromStage(void)
1226 // Visual enabled but then parent removed from stage, test ensures visual/renderer are also removed from stage.
1227 // Then adding parent back to stage should automatically put visual/renderer back
1229 ToolkitTestApplication application;
1231 DummyControl dummy = DummyControl::New();
1232 DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(dummy.GetImplementation());
1234 Property::Index TEST_PROPERTY =1;
1236 Toolkit::VisualFactory visualFactory = Toolkit::VisualFactory::Get();
1237 Toolkit::Visual::Base visual;
1240 map[Visual::Property::TYPE] = Visual::COLOR;
1241 map[ColorVisual::Property::MIX_COLOR] = Color::RED;
1243 visual = visualFactory.CreateVisual( map );
1244 DALI_TEST_CHECK(visual);
1246 // Register index with a color visual
1247 dummyImpl.RegisterVisual( TEST_PROPERTY, visual, false );
1249 Stage::GetCurrent().Add(dummy);
1250 // Render and notify
1251 application.SendNotification();
1252 application.Render();
1254 DALI_TEST_CHECK( dummyImpl.IsVisualEnabled( TEST_PROPERTY ) == false );
1255 DALI_TEST_CHECK( dummy.OnStage() == true );
1256 dummyImpl.EnableVisual( TEST_PROPERTY, true );
1258 // Render and notify
1259 application.SendNotification();
1260 application.Render();
1261 DALI_TEST_CHECK( dummy.GetRendererCount() == 1u );
1263 // Remove control from stage, visual should be removed from stage too
1264 Stage::GetCurrent().Remove(dummy);
1265 // Render and notify
1266 application.SendNotification();
1267 application.Render();
1268 DALI_TEST_CHECK( dummy.GetRendererCount() == 0u );
1270 Stage::GetCurrent().Add(dummy);
1271 // Render and notify
1272 application.SendNotification();
1273 application.Render();
1274 DALI_TEST_CHECK( dummy.GetRendererCount() == 1u );
1276 DALI_TEST_CHECK( dummyImpl.IsVisualEnabled( TEST_PROPERTY ) == true );
1281 int UtcDaliControlImplRegisterTwoVisualsAndEnableOnlyOne(void)
1283 // Register 2 visuals and enable by default
1285 // Remove control from stage then put it back
1286 // Check that only 1 visual/renderer is staged.
1288 ToolkitTestApplication application;
1290 DummyControl dummy = DummyControl::New();
1291 DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(dummy.GetImplementation());
1293 Property::Index TEST_PROPERTY1 =1;
1294 Property::Index TEST_PROPERTY2 =2;
1296 Toolkit::VisualFactory visualFactory = Toolkit::VisualFactory::Get();
1297 Toolkit::Visual::Base visual1;
1298 Toolkit::Visual::Base visual2;
1301 map[Visual::Property::TYPE] = Visual::COLOR;
1302 map[ColorVisual::Property::MIX_COLOR] = Color::RED;
1305 map[Visual::Property::TYPE] = Visual::COLOR;
1306 map[ColorVisual::Property::MIX_COLOR] = Color::BLUE;
1308 visual1 = visualFactory.CreateVisual( map );
1309 DALI_TEST_CHECK(visual1);
1311 visual2 = visualFactory.CreateVisual( map );
1312 DALI_TEST_CHECK(visual2);
1314 // Register index with a color visual
1315 dummyImpl.RegisterVisual( TEST_PROPERTY1, visual1 );
1316 // Register second index with a color visual
1317 dummyImpl.RegisterVisual( TEST_PROPERTY2, visual2 );
1319 Stage::GetCurrent().Add(dummy);
1320 // Render and notify
1321 application.SendNotification();
1322 application.Render();
1324 DALI_TEST_CHECK( dummy.GetRendererCount() == 2u );
1325 DALI_TEST_CHECK( dummyImpl.IsVisualEnabled( TEST_PROPERTY1 ) == true );
1326 DALI_TEST_CHECK( dummyImpl.IsVisualEnabled( TEST_PROPERTY1 ) == true);
1327 DALI_TEST_CHECK( dummy.OnStage() == true );
1328 dummyImpl.EnableVisual( TEST_PROPERTY2, false );
1330 // Render and notify
1331 application.SendNotification();
1332 application.Render();
1333 DALI_TEST_CHECK( dummy.GetRendererCount() == 1u );
1335 // Remove control from stage, visual should be removed from stage too
1336 Stage::GetCurrent().Remove(dummy);
1337 // Render and notify
1338 application.SendNotification();
1339 application.Render();
1340 DALI_TEST_CHECK( dummy.GetRendererCount() == 0u );
1342 Stage::GetCurrent().Add(dummy);
1343 // Render and notify
1344 application.SendNotification();
1345 application.Render();
1346 DALI_TEST_CHECK( dummy.GetRendererCount() == 1u );
1348 DALI_TEST_CHECK( dummyImpl.IsVisualEnabled( TEST_PROPERTY1 ) == true );
1349 DALI_TEST_CHECK( dummyImpl.IsVisualEnabled( TEST_PROPERTY2 ) == false );