Merge branch 'master' into tizen
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit-internal / utc-Dali-PushButton.cpp
1 //
2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Flora License, Version 1.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
7 //
8 //     http://floralicense.org/license/
9 //
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.
15 //
16
17 #include <iostream>
18
19 #include <stdlib.h>
20 #include <dali-toolkit-test-suite-utils.h>
21 #include <dali-toolkit/dali-toolkit.h>
22 #include <dali/integration-api/events/touch-event-integ.h>
23 #include <dali-toolkit/internal/controls/buttons/button-impl.h>
24
25
26 using namespace Dali;
27 using namespace Toolkit;
28
29 namespace
30 {
31
32 static bool gPushButtonToggleState = false;
33 bool PushButtonToggled( Button button, bool toggled )
34 {
35   gPushButtonToggleState = toggled && ( toggled == static_cast<PushButton&>( button ).IsToggled() );
36   return true;
37 }
38
39
40 const Dali::TouchPoint pointDownInside( 0, TouchPoint::Down, 240, 400 );
41 const Dali::TouchPoint pointUpInside( 0, TouchPoint::Up, 240, 400 );
42 const Dali::TouchPoint pointLeave( 0, TouchPoint::Leave, 240, 400 );
43 const Dali::TouchPoint pointEnter( 0, TouchPoint::Motion, 240, 400 );
44 const Dali::TouchPoint pointMotionOut( 0, TouchPoint::Motion, 10, 10 );
45 const Dali::TouchPoint pointDownOutside( 0, TouchPoint::Down, 10, 10 );
46 const Dali::TouchPoint pointUpOutside( 0, TouchPoint::Up, 10, 10 );
47 } // namespace
48
49
50 //////////////////////////////////////////////////////////
51
52 namespace
53 {
54 static bool gOnTouchPointInterrupted = false;
55 } //namespace
56
57 namespace Dali
58 {
59
60 namespace Toolkit
61 {
62
63 namespace Internal
64 {
65 class TETButton;
66 }
67
68 /**
69  * Creates a Button to test if interrupt events are handled correctly.
70  */
71 class TETButton : public Button
72 {
73 public:
74   // PushButton Pressed
75   typedef SignalV2< bool ( Button ) > PressedSignalV2;
76
77   PressedSignalV2& PressedSignal();
78
79   /**
80    * Default constructor.
81    */
82   TETButton();
83
84   /**
85    * Copy constructor.
86    */
87   TETButton( const Button& button );
88
89   /**
90    * Assignment operator.
91    */
92   TETButton& operator=( const TETButton& button );
93
94   /**
95    * Creates and initializes a new button.
96    */
97   static TETButton New();
98
99   /**
100    * Down cast to TETButton.
101    */
102   static TETButton DownCast( BaseHandle handle );
103
104   /**
105    * Creates a handle using the Toolkit::Internal implementation.
106    * @param[in]  implementation  The Control implementation.
107    */
108   TETButton( Internal::TETButton& implementation );
109
110   /**
111    * Allows the creation of this Control from an Internal::CustomActor pointer.
112    * @param[in]  internal  A pointer to the internal CustomActor.
113    */
114   TETButton( Dali::Internal::CustomActor* internal );
115 };
116
117 namespace Internal
118 {
119
120 /**
121  * Internal implementation
122  */
123 class TETButton : public Button
124 {
125 public:
126   /**
127    * Construct a new Button.
128    */
129   TETButton();
130
131   /**
132    * A reference counted object may only be deleted by calling Unreference()
133    */
134   virtual ~TETButton();
135
136   /**
137    * Creates an internal button.
138    */
139   static Toolkit::TETButton New();
140
141   /**
142    * @return the pressed signal.
143    */
144   Toolkit::TETButton::PressedSignalV2& PressedSignal();
145
146   /**
147    * Callback called when an interrupt events is received.
148    */
149   void OnTouchPointInterrupted();
150
151   /**
152    * Callback received when a down event is received.
153    */
154   void OnButtonDown();
155
156   Toolkit::TETButton::PressedSignalV2 mPressedSignal;   ///< Signal emitted when the button is pressed.
157 };
158
159 } // namespace Internal
160
161 TETButton::TETButton()
162 {
163 }
164
165 TETButton::TETButton( const Button& button )
166 : Button( button )
167 {
168 }
169
170 TETButton& TETButton::operator=( const TETButton& button )
171 {
172   if( &button != this )
173   {
174     Button::operator=( button );
175   }
176   return *this;
177 }
178
179 TETButton TETButton::New()
180 {
181   return Internal::TETButton::New();
182 }
183
184 TETButton TETButton::DownCast( BaseHandle handle )
185 {
186   return Control::DownCast<TETButton, Internal::TETButton>(handle);
187 }
188
189 TETButton::PressedSignalV2& TETButton::PressedSignal()
190 {
191   TETButton button( *this );
192   DALI_ASSERT_ALWAYS( button );
193
194   Dali::RefObject& handle = button.GetImplementation();
195
196   return static_cast<Toolkit::Internal::TETButton&>( handle ).PressedSignal();
197 }
198
199 TETButton::TETButton( Internal::TETButton& implementation )
200 : Button( implementation )
201 {}
202
203 TETButton::TETButton( Dali::Internal::CustomActor* internal )
204 : Button( internal )
205 {
206   VerifyCustomActorPointer<Internal::TETButton>(internal);
207 }
208
209 namespace Internal
210 {
211
212 TETButton::TETButton()
213 : Button(),
214   mPressedSignal()
215 {
216 }
217
218 TETButton::~TETButton()
219 {
220 }
221
222 Toolkit::TETButton TETButton::New()
223 {
224   // Create the implementation, temporarily owned on stack
225   IntrusivePtr< TETButton > internalTETButton = new TETButton();
226
227   // Pass ownership to CustomActor
228   Dali::Toolkit::TETButton tetButton( *internalTETButton );
229
230   // Second-phase init of the implementation
231   // This can only be done after the CustomActor connection has been made...
232   internalTETButton->Initialize();
233
234   return tetButton;
235 }
236
237 Toolkit::TETButton::PressedSignalV2& TETButton::PressedSignal()
238 {
239   return mPressedSignal;
240 }
241
242 void TETButton::OnButtonDown()
243 {
244   Toolkit::TETButton handle( GetOwner() );
245
246   //Emit signal.
247   mPressedSignal.Emit( handle );
248 }
249
250 void TETButton::OnTouchPointInterrupted()
251 {
252   gOnTouchPointInterrupted = true;
253 }
254
255 } // namespace Internal
256
257 } // namespace Toolkit
258
259 } // namespace Dali
260
261 namespace
262 {
263
264 class TETButtonPressed : public Dali::ConnectionTracker
265 {
266 public:
267   enum Test
268   {
269     SENSITIVENESS,
270     VISIBILITY
271   };
272
273   TETButtonPressed( Actor actor, Test test )
274   : mActor( actor ),
275     mTest( test )
276   {
277   }
278
279   bool Callback( Button button )
280   {
281     switch( mTest )
282     {
283       case SENSITIVENESS:
284       {
285         mActor.SetSensitive( false );
286         break;
287       }
288       case VISIBILITY:
289       {
290         std::cout <<"VISIBILITY false" << std::endl;
291         mActor.SetVisible( false );
292         break;
293       }
294       default:
295       {
296         break;
297       }
298     }
299     return true;
300   }
301
302   Actor mActor;
303   Test mTest;
304 };
305
306 static bool TestCallback(Actor actor, const TouchEvent& event)
307 {
308   return true;
309 }
310
311 } // namespace
312
313 //////////////////////////////////////////////////////////
314
315
316 int UtcDaliPushButtonInterruptEventWhenInsensitive(void)
317 {
318   ToolkitTestApplication application;
319   tet_infoline(" UtcDaliPushButtonInterruptEventWhenInsensitive");
320
321   // * Creates an actor which contains a button.
322   // * The size of the actor is bigger than the button.
323   // * The button's boundary is contained in the actor's one.
324   Actor actor = Actor::New();
325   TETButton tetButton= Toolkit::TETButton::New();
326
327   actor.SetName( "Actor" );
328   tetButton.SetName( "TETButton" );
329
330   actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
331   actor.SetParentOrigin( ParentOrigin::TOP_LEFT );
332   actor.SetPosition( 0, 0 );
333   actor.SetSize( 400, 800 );
334
335   tetButton.SetAnchorPoint( AnchorPoint::TOP_LEFT );
336   tetButton.SetParentOrigin( ParentOrigin::TOP_LEFT );
337   tetButton.SetPosition( 240, 400 );
338   tetButton.SetSize( 100, 100 );
339
340   actor.Add( tetButton );
341   Stage::GetCurrent().Add( actor );
342
343   // * Actor's touch event is connected to a callback function
344   //   and this callback function consumes the event.
345   actor.TouchedSignal().Connect( &TestCallback );
346
347   // * Button's pressed signal is connected to a callback function
348   //   which also consumes the event.
349   // * Changes the sensitiveness of the button to false.
350   TETButtonPressed tetButtonPressed( actor, TETButtonPressed::SENSITIVENESS );
351   tetButton.PressedSignal().Connect( &tetButtonPressed, &TETButtonPressed::Callback );
352
353   // Initializes TET state.
354   gOnTouchPointInterrupted = false;
355   tetButton.SetSensitive( true );
356
357   Dali::Integration::TouchEvent event;
358
359   // TET starts.
360
361   // Test a down point inside the button which is also consumed by the actor, and an up point
362   // consumed only by the actor.  gOnTouchPointInterrupted should be true (Button receives an
363   // interrupt event.
364
365   application.SendNotification();
366   application.Render();
367
368   // A down event is sent inside the button's boundary.
369
370   event = Dali::Integration::TouchEvent();
371   event.AddPoint( pointDownInside );
372
373   // flush the queue and render once
374   application.SendNotification();
375   application.Render();
376   application.ProcessEvent( event );
377
378   // An up event is sent outside the button's boundary but inside the actor's one.
379
380   event = Dali::Integration::TouchEvent();
381   event.AddPoint( pointUpOutside );
382
383   // flush the queue and render once
384   application.SendNotification();
385   application.Render();
386   application.ProcessEvent( event );
387
388   DALI_TEST_CHECK( gOnTouchPointInterrupted );
389
390   // Test a down point inside the button which is also consumed by the actor, and a motion point
391   // consumed only by the actor.  gOnTouchPointInterrupted should be true (Button receives an
392   // interrupt event.
393
394   // Initializes TET state.
395   gOnTouchPointInterrupted = false;
396   actor.SetSensitive( true );
397   tetButton.SetSensitive( true );
398
399   application.SendNotification();
400   application.Render();
401
402   // A down event is sent inside the button's boundary.
403
404   event = Dali::Integration::TouchEvent();
405   event.AddPoint( pointDownInside );
406
407   // flush the queue and render once
408   application.SendNotification();
409   application.Render();
410   application.ProcessEvent( event );
411
412   // A motion event is sent outside the button's boundary but inside the actor's one.
413
414   event = Dali::Integration::TouchEvent();
415   event.AddPoint( pointMotionOut );
416
417   // flush the queue and render once
418   application.SendNotification();
419   application.Render();
420   application.ProcessEvent( event );
421
422   DALI_TEST_CHECK( gOnTouchPointInterrupted );
423
424   // Test a down point inside the button which is also consumed by the actor, and an up point
425   // also inside the button and consumed by the actor.  gOnTouchPointInterrupted should be false.
426
427   // Initializes TET state.
428   gOnTouchPointInterrupted = false;
429   actor.SetSensitive( true );
430   tetButton.SetSensitive( true );
431
432   // A down event is sent inside the button's boundary.
433
434   event = Dali::Integration::TouchEvent();
435   event.AddPoint( pointDownInside );
436
437   // flush the queue and render once
438   application.SendNotification();
439   application.Render();
440   application.ProcessEvent( event );
441
442   actor.SetSensitive( true );
443   // An up event is sent inside the button's boundary.
444
445   event = Dali::Integration::TouchEvent();
446   event.AddPoint( pointUpInside );
447
448   // flush the queue and render once
449   application.SendNotification();
450   application.Render();
451   application.ProcessEvent( event );
452
453   DALI_TEST_CHECK( !gOnTouchPointInterrupted );
454   END_TEST;
455 }
456
457 int UtcDaliPushButtonInterruptEventWhenNonVisible(void)
458 {
459   ToolkitTestApplication application;
460   tet_infoline(" UtcDaliPushButtonInterruptEventWhenNonVisible");
461
462   // Does same test as above but changing the visibility instead the sensitiveness.
463
464   // * Creates an actor which contains a button.
465   // * The size of the actor is bigger than the button.
466   // * The button's boundary is contained in the actor's one.
467   Actor actor = Actor::New();
468   TETButton tetButton = Toolkit::TETButton::New();
469
470   actor.SetName( "Actor" );
471   tetButton.SetName( "TETButton" );
472
473   actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
474   actor.SetParentOrigin( ParentOrigin::TOP_LEFT );
475   actor.SetPosition( 0, 0 );
476   actor.SetSize( 400, 800 );
477
478   tetButton.SetAnchorPoint( AnchorPoint::TOP_LEFT );
479   tetButton.SetParentOrigin( ParentOrigin::TOP_LEFT );
480   tetButton.SetPosition( 240, 400 );
481   tetButton.SetSize( 100, 100 );
482
483   actor.Add( tetButton );
484   Stage::GetCurrent().Add( actor );
485
486   // * Actor's touch event is connected to a callback function
487   //   and this callback function consumes the event.
488   actor.TouchedSignal().Connect( &TestCallback );
489
490   // * Button's pressed signal is connected to a callback function
491   //   which also consumes the event.
492   // * Changes the visibility of the button to false.
493   TETButtonPressed tetButtonPressed( tetButton, TETButtonPressed::VISIBILITY );
494   tetButton.PressedSignal().Connect( &tetButtonPressed, &TETButtonPressed::Callback );
495
496   // Initializes TET state.
497   gOnTouchPointInterrupted = false;
498   tetButton.SetVisible( true );
499
500   Dali::Integration::TouchEvent event;
501
502   // TET starts.
503
504   // Test a down point inside the button which is also consumed by the actor, and an up point
505   // consumed only by the actor.  gOnTouchPointInterrupted should be true (Button receives an
506   // interrupt event.
507
508   application.SendNotification();
509   application.Render();
510
511   // A down event is sent inside the button's boundary.
512
513   event = Dali::Integration::TouchEvent();
514   event.AddPoint( pointDownInside );
515
516   // flush the queue and render once
517   application.SendNotification();
518   application.Render();
519   application.ProcessEvent( event );
520
521   // More renders are needed in order to allow the node of the actor to become invisible.
522   application.SendNotification();
523   application.Render();
524   application.SendNotification();
525   application.Render();
526   application.SendNotification();
527   application.Render();
528
529   // An up event is sent outside the button's boundary but inside the actor's one.
530
531   event = Dali::Integration::TouchEvent();
532   event.AddPoint( pointUpOutside );
533
534   // flush the queue and render once
535   application.SendNotification();
536   application.Render();
537   application.ProcessEvent( event );
538
539   DALI_TEST_CHECK( gOnTouchPointInterrupted );
540
541   // Test a down point inside the button which is also consumed by the actor, and a motion point
542   // consumed only by the actor.  gOnTouchPointInterrupted should be true (Button receives an
543   // interrupt event.
544
545   // Initializes TET state.
546   gOnTouchPointInterrupted = false;
547   tetButton.SetVisible( true );
548
549   application.SendNotification();
550   application.Render();
551   application.SendNotification();
552   application.Render();
553   application.SendNotification();
554   application.Render();
555
556   // A down event is sent inside the button's boundary.
557
558   event = Dali::Integration::TouchEvent();
559   event.AddPoint( pointDownInside );
560
561   // flush the queue and render once
562   application.SendNotification();
563   application.Render();
564   application.ProcessEvent( event );
565
566   // More renders are needed in order to allow the node of the actor to become invisible.
567   application.SendNotification();
568   application.Render();
569   application.SendNotification();
570   application.Render();
571   application.SendNotification();
572   application.Render();
573
574   // A motion event is sent outside the button's boundary but inside the actor's one.
575
576   event = Dali::Integration::TouchEvent();
577   event.AddPoint( pointMotionOut );
578
579   // flush the queue and render once
580   application.SendNotification();
581   application.Render();
582   application.ProcessEvent( event );
583
584   DALI_TEST_CHECK( gOnTouchPointInterrupted );
585
586   // Test a down point inside the button which is also consumed by the actor, and an up point
587   // also inside the button and consumed by the actor.  gOnTouchPointInterrupted should be false.
588
589   // Initializes TET state.
590   gOnTouchPointInterrupted = false;
591   tetButton.SetVisible( true );
592
593   application.SendNotification();
594   application.Render();
595   application.SendNotification();
596   application.Render();
597   application.SendNotification();
598   application.Render();
599
600   // A down event is sent inside the button's boundary.
601
602   event = Dali::Integration::TouchEvent();
603   event.AddPoint( pointDownInside );
604
605   // flush the queue and render once
606   application.SendNotification();
607   application.Render();
608   application.ProcessEvent( event );
609
610   tetButton.SetVisible( true );
611
612   application.SendNotification();
613   application.Render();
614   application.SendNotification();
615   application.Render();
616   application.SendNotification();
617   application.Render();
618
619   // An up event is sent inside the button's boundary.
620
621   event = Dali::Integration::TouchEvent();
622   event.AddPoint( pointUpInside );
623
624   // flush the queue and render once
625   application.SendNotification();
626   application.Render();
627   application.ProcessEvent( event );
628
629   DALI_TEST_CHECK( !gOnTouchPointInterrupted );
630   END_TEST;
631 }
632
633 int UtcDaliPushButtonProperties(void)
634 {
635   ToolkitTestApplication application;
636
637   PushButton button = PushButton::New();
638   Stage::GetCurrent().Add( button );
639
640   // PushButton::PROPERTY_AUTO_REPEATING
641   button.SetAutoRepeating( false );
642   DALI_TEST_CHECK( ! button.GetProperty< bool >( PushButton::PROPERTY_AUTO_REPEATING ) );
643   button.SetProperty( PushButton::PROPERTY_AUTO_REPEATING, true );
644   DALI_TEST_CHECK( button.IsAutoRepeating() ) ;
645   DALI_TEST_CHECK( button.GetProperty< bool >( PushButton::PROPERTY_AUTO_REPEATING ) );
646
647   // PushButton::PROPERTY_INITIAL_AUTO_REPEATING_DELAY
648   button.SetInitialAutoRepeatingDelay( 10.0f );
649   DALI_TEST_EQUALS( 10.0f, button.GetProperty< float >( PushButton::PROPERTY_INITIAL_AUTO_REPEATING_DELAY ), TEST_LOCATION );
650   button.SetProperty( PushButton::PROPERTY_INITIAL_AUTO_REPEATING_DELAY, 25.0f );
651   DALI_TEST_EQUALS( 25.0f, button.GetInitialAutoRepeatingDelay(), TEST_LOCATION );
652   DALI_TEST_EQUALS( 25.0f, button.GetProperty< float >( PushButton::PROPERTY_INITIAL_AUTO_REPEATING_DELAY ), TEST_LOCATION );
653
654   //  PushButton::PROPERTY_NEXT_AUTO_REPEATING_DELAY
655   button.SetNextAutoRepeatingDelay( 3.0f );
656   DALI_TEST_EQUALS( 3.0f, button.GetProperty< float >( PushButton::PROPERTY_NEXT_AUTO_REPEATING_DELAY ), TEST_LOCATION );
657   button.SetProperty( PushButton::PROPERTY_NEXT_AUTO_REPEATING_DELAY, 4.0f );
658   DALI_TEST_EQUALS( 4.0f, button.GetNextAutoRepeatingDelay(), TEST_LOCATION );
659   DALI_TEST_EQUALS( 4.0f, button.GetProperty< float >( PushButton::PROPERTY_NEXT_AUTO_REPEATING_DELAY ), TEST_LOCATION );
660
661   //  PushButton::PROPERTY_TOGGLABLE
662   button.SetToggleButton( false );
663   DALI_TEST_CHECK( ! button.GetProperty< bool >( PushButton::PROPERTY_TOGGLABLE ) );
664   button.SetProperty( PushButton::PROPERTY_TOGGLABLE, true );
665   DALI_TEST_CHECK( button.IsToggleButton() ) ;
666   DALI_TEST_CHECK( button.GetProperty< bool >( PushButton::PROPERTY_TOGGLABLE ) );
667
668   //  PushButton::PROPERTY_TOGGLE
669   button.SetToggled( false );
670   DALI_TEST_CHECK( ! button.GetProperty< bool >( PushButton::PROPERTY_TOGGLE ) );
671   button.SetProperty( PushButton::PROPERTY_TOGGLE, true );
672   DALI_TEST_CHECK( button.IsToggled() ) ;
673   DALI_TEST_CHECK( button.GetProperty< bool >( PushButton::PROPERTY_TOGGLE ) );
674
675   //  PushButton::PROPERTY_NORMAL_STATE_ACTOR
676   {
677     button.SetButtonImage( Image::New( "IMAGE_PATH_1") );
678     DALI_TEST_EQUALS( "IMAGE_PATH_1", button.GetProperty( PushButton::PROPERTY_NORMAL_STATE_ACTOR ).GetValue( "image" ).GetValue( "filename" ).Get< std::string >(), TEST_LOCATION );
679
680     Property::Map map;
681     map.push_back( Property::StringValuePair( "type", "ImageActor" ) );
682
683     button.SetProperty( PushButton::PROPERTY_NORMAL_STATE_ACTOR, map );
684     DALI_TEST_EQUALS( "ImageActor", button.GetProperty( PushButton::PROPERTY_NORMAL_STATE_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION );
685   }
686
687   //  PushButton::PROPERTY_PRESSED_IMAGE
688   {
689     button.SetPressedImage( Image::New( "IMAGE_PATH_2") );
690     DALI_TEST_EQUALS( "IMAGE_PATH_2", button.GetProperty( PushButton::PROPERTY_PRESSED_STATE_ACTOR ).GetValue( "image" ).GetValue( "filename" ).Get< std::string >(), TEST_LOCATION );
691
692     Property::Map map;
693     map.push_back( Property::StringValuePair( "type", "Actor" ) );
694
695     button.SetProperty( PushButton::PROPERTY_PRESSED_STATE_ACTOR, map );
696     DALI_TEST_EQUALS( "Actor", button.GetProperty( PushButton::PROPERTY_PRESSED_STATE_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION );
697     DALI_TEST_CHECK( "ImageActor" != button.GetProperty( PushButton::PROPERTY_PRESSED_STATE_ACTOR ).GetValue( "type" ).Get< std::string >() );
698   }
699
700   //  PushButton::PROPERTY_DIMMED_STATE_ACTOR
701   {
702     button.SetDimmedImage( Image::New( "IMAGE_PATH_3") );
703     DALI_TEST_EQUALS( "IMAGE_PATH_3", button.GetProperty( PushButton::PROPERTY_DIMMED_STATE_ACTOR ).GetValue( "image" ).GetValue( "filename" ).Get< std::string >(), TEST_LOCATION );
704
705     Property::Map map;
706     map.push_back( Property::StringValuePair( "type", "Actor" ) );
707
708     button.SetProperty( PushButton::PROPERTY_DIMMED_STATE_ACTOR, map );
709     DALI_TEST_EQUALS( "Actor", button.GetProperty( PushButton::PROPERTY_DIMMED_STATE_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION );
710   }
711
712   //  PushButton::PROPERTY_LABEL_ACTOR
713   {
714     button.SetLabelText( "LABEL_TEXT_CUSTOM" );
715     DALI_TEST_EQUALS( "TextView", button.GetProperty( PushButton::PROPERTY_LABEL_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION );
716
717     Property::Map map;
718     map.push_back( Property::StringValuePair( "type", "Actor" ) );
719
720     button.SetProperty( PushButton::PROPERTY_LABEL_ACTOR, map );
721     DALI_TEST_EQUALS( "Actor", button.GetProperty( PushButton::PROPERTY_LABEL_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION );
722   }
723   END_TEST;
724 }