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