OnActivated() change for Accessibility and KeyboardFocus
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / utc-Dali-AccessibilityManager.cpp
1 /*
2  * Copyright (c) 2015 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 #include <stdlib.h>
20
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
25 #include <dali-toolkit/dali-toolkit.h>
26
27 using namespace Dali;
28 using namespace Toolkit;
29
30
31 void utc_dali_toolkit_accessibility_manager_startup(void)
32 {
33   test_return_value = TET_UNDEF;
34 }
35
36 void utc_dali_toolkit_accessibility_manager_cleanup(void)
37 {
38   test_return_value = TET_PASS;
39 }
40
41
42 namespace
43 {
44
45 static bool gObjectCreatedCallBackCalled;
46
47 static void TestCallback(BaseHandle handle)
48 {
49   gObjectCreatedCallBackCalled = true;
50 }
51
52 // Functors to test whether focus changed signal is emitted when the focus is changed
53 class FocusChangedCallback : public Dali::ConnectionTracker
54 {
55 public:
56   FocusChangedCallback(bool& signalReceived)
57   : mSignalVerified(signalReceived),
58     mOriginalFocusedActor(),
59     mCurrentFocusedActor()
60   {
61   }
62
63   void Callback(Actor originalFocusedActor, Actor currentFocusedActor)
64   {
65     tet_infoline("Verifying FocusChangedCallback()");
66
67     if(originalFocusedActor == mCurrentFocusedActor)
68     {
69       mSignalVerified = true;
70     }
71
72     mOriginalFocusedActor = originalFocusedActor;
73     mCurrentFocusedActor = currentFocusedActor;
74   }
75
76   void Reset()
77   {
78     mSignalVerified = false;
79   }
80
81   bool& mSignalVerified;
82   Actor mOriginalFocusedActor;
83   Actor mCurrentFocusedActor;
84 };
85
86 // Functors to test whether focus overshot signal is emitted when there is no way to move focus further.
87 class FocusOvershotCallback : public Dali::ConnectionTracker
88 {
89 public:
90   FocusOvershotCallback(bool& signalReceived)
91   : mSignalVerified(signalReceived),
92     mCurrentFocusedActor(),
93     mFocusOvershotDirection(Toolkit::AccessibilityManager::OVERSHOT_NEXT)
94   {
95   }
96
97   void Callback(Actor currentFocusedActor, Toolkit::AccessibilityManager::FocusOvershotDirection direction)
98   {
99     tet_infoline("Verifying FocusOvershotCallback()");
100
101     if(currentFocusedActor == mCurrentFocusedActor && direction == mFocusOvershotDirection)
102     {
103       mSignalVerified = true;
104     }
105   }
106
107   void Reset()
108   {
109     mSignalVerified = false;
110   }
111
112   bool& mSignalVerified;
113   Actor mCurrentFocusedActor;
114   Toolkit::AccessibilityManager::FocusOvershotDirection mFocusOvershotDirection;
115 };
116
117 // Functor to test whether focused actor activated signal is emitted.
118 class FocusedActorActivatedCallback : public Dali::ConnectionTracker
119 {
120 public:
121   FocusedActorActivatedCallback()
122   {
123   }
124
125   void Callback(Actor activatedActor)
126   {
127     tet_infoline("Verifying FocusedActorActivatedCallback()");
128   }
129 };
130
131 } // namespace
132
133
134 int UtcDaliAccessibilityManagerGet(void)
135 {
136   ToolkitTestApplication application;
137
138   tet_infoline(" UtcDaliAccessibilityManagerGet");
139
140   AccessibilityManager manager;
141
142   //Ensure object is created by checking if it's registered
143   ObjectRegistry registry = Stage::GetCurrent().GetObjectRegistry();
144   DALI_TEST_CHECK(registry);
145
146   gObjectCreatedCallBackCalled = false;
147   registry.ObjectCreatedSignal().Connect( &TestCallback );
148   {
149     manager = AccessibilityManager::Get();
150     DALI_TEST_CHECK(manager);
151   }
152   DALI_TEST_CHECK( gObjectCreatedCallBackCalled );
153
154   AccessibilityManager newManager = AccessibilityManager::Get();
155   DALI_TEST_CHECK(newManager);
156
157   // Check that accessibility manager is a singleton
158   DALI_TEST_CHECK(manager == newManager);
159   END_TEST;
160 }
161
162 int UtcDaliAccessibilityManagerSetAndGetAccessibilityAttribute(void)
163 {
164   ToolkitTestApplication application;
165
166   tet_infoline(" UtcDaliAccessibilityManagerSetAndGetAccessibilityAttribute");
167
168   AccessibilityManager manager = AccessibilityManager::Get();
169   DALI_TEST_CHECK(manager);
170
171   Actor actor = Actor::New();
172   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(actor, AccessibilityManager::ACCESSIBILITY_LABEL) == "");
173
174   manager.SetAccessibilityAttribute(actor, AccessibilityManager::ACCESSIBILITY_LABEL, "Description");
175   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(actor, AccessibilityManager::ACCESSIBILITY_LABEL) == "Description");
176
177   manager.SetAccessibilityAttribute(actor, AccessibilityManager::ACCESSIBILITY_LABEL, "New description");
178   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(actor, AccessibilityManager::ACCESSIBILITY_LABEL) == "New description");
179   END_TEST;
180 }
181
182 int UtcDaliAccessibilityManagerSetAndGetFocusOrder(void)
183 {
184   ToolkitTestApplication application;
185
186   tet_infoline(" UtcDaliAccessibilityManagerSetAndGetFocusOrder");
187
188   AccessibilityManager manager = AccessibilityManager::Get();
189   DALI_TEST_CHECK(manager);
190
191   Actor first = Actor::New();
192   Actor second = Actor::New();
193   DALI_TEST_CHECK(manager.GetFocusOrder(first) == 0);
194   DALI_TEST_CHECK(manager.GetFocusOrder(second) == 0);
195
196   // Set the focus order and description for the first actor
197   manager.SetFocusOrder(first, 1);
198   manager.SetAccessibilityAttribute(first, AccessibilityManager::ACCESSIBILITY_LABEL, "first");
199   DALI_TEST_CHECK(manager.GetFocusOrder(first) == 1);
200   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(first, AccessibilityManager::ACCESSIBILITY_LABEL) == "first");
201
202   // Set the focus order and description for the second actor
203   manager.SetFocusOrder(second, 2);
204   manager.SetAccessibilityAttribute(second, AccessibilityManager::ACCESSIBILITY_LABEL, "second");
205   DALI_TEST_CHECK(manager.GetFocusOrder(second) == 2);
206   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(second, AccessibilityManager::ACCESSIBILITY_LABEL) == "second");
207
208   // check that the focus order of the first actor is changed
209   manager.SetFocusOrder(first, 2);
210   DALI_TEST_CHECK(manager.GetFocusOrder(first) == 2);
211   // make sure the change of focus order doesn't affect the actor's description
212   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(first, AccessibilityManager::ACCESSIBILITY_LABEL) == "first");
213
214   // check that the focus order of the second actor is increased to 3
215   DALI_TEST_CHECK(manager.GetFocusOrder(second) == 3);
216   // make sure the change of focus order doesn't affect the actor's description
217   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(second, AccessibilityManager::ACCESSIBILITY_LABEL) == "second");
218
219   // check that the focus order of the second actor is changed to 1
220   manager.SetFocusOrder(second, 1);
221   DALI_TEST_CHECK(manager.GetFocusOrder(second) == 1);
222   // make sure the change of focus order doesn't affect the actor's description
223   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(second, AccessibilityManager::ACCESSIBILITY_LABEL) == "second");
224
225   // Set the focus order and description for the third actor
226   Actor third = Actor::New();
227   manager.SetFocusOrder(third, 1);
228   manager.SetAccessibilityAttribute(third, AccessibilityManager::ACCESSIBILITY_LABEL, "third");
229   DALI_TEST_CHECK(manager.GetFocusOrder(third) == 1);
230   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(third, AccessibilityManager::ACCESSIBILITY_LABEL) == "third");
231
232   // check that the focus order of the second actor is increased to 2.
233   DALI_TEST_CHECK(manager.GetFocusOrder(second) == 2);
234   // make sure the change of focus order doesn't affect the actor's description
235   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(second, AccessibilityManager::ACCESSIBILITY_LABEL) == "second");
236
237   // check that the focus order of the first actor is increased to 3.
238   DALI_TEST_CHECK(manager.GetFocusOrder(first) == 3);
239   // make sure the change of focus order doesn't affect the actor's description
240   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(first, AccessibilityManager::ACCESSIBILITY_LABEL) == "first");
241   END_TEST;
242 }
243
244 int UtcDaliAccessibilityManagerGenerateNewFocusOrder(void)
245 {
246   ToolkitTestApplication application;
247
248   tet_infoline(" UtcDaliAccessibilityManagerGenerateNewFocusOrder");
249
250   AccessibilityManager manager = AccessibilityManager::Get();
251   DALI_TEST_CHECK(manager);
252
253   DALI_TEST_CHECK(1 == manager.GenerateNewFocusOrder());
254   DALI_TEST_CHECK(1 == manager.GenerateNewFocusOrder());
255
256   Actor first = Actor::New();
257   Actor second = Actor::New();
258
259   // Set the focus order for the first actor
260   manager.SetFocusOrder(first, 1);
261   manager.SetAccessibilityAttribute(first, AccessibilityManager::ACCESSIBILITY_LABEL, "first");
262   DALI_TEST_CHECK(manager.GetFocusOrder(first) == 1);
263
264   //Test for new focus order
265   DALI_TEST_CHECK(2 == manager.GenerateNewFocusOrder());
266
267   // Set the focus order for the first actor
268   manager.SetFocusOrder(second, 2);
269   manager.SetAccessibilityAttribute(second, AccessibilityManager::ACCESSIBILITY_LABEL, "first");
270   DALI_TEST_CHECK(manager.GetFocusOrder(second) == 2);
271   END_TEST;
272 }
273
274 int UtcDaliAccessibilityManagerGetActorByFocusOrder(void)
275 {
276   ToolkitTestApplication application;
277
278   tet_infoline(" UtcDaliAccessibilityManagerGetActorByFocusOrder");
279
280   AccessibilityManager manager = AccessibilityManager::Get();
281   DALI_TEST_CHECK(manager);
282
283   // Create the actors and set their focus orders
284   Actor first = Actor::New();
285   manager.SetFocusOrder(first, 1);
286
287   Actor second = Actor::New();
288   manager.SetFocusOrder(second, 2);
289
290   Actor third = Actor::New();
291   manager.SetFocusOrder(third, 3);
292
293   // Check that we get an empty handle as no actor is added to the stage yet.
294   DALI_TEST_CHECK(manager.GetActorByFocusOrder(1) == Actor());
295   DALI_TEST_CHECK(manager.GetActorByFocusOrder(2) == Actor());
296   DALI_TEST_CHECK(manager.GetActorByFocusOrder(3) == Actor());
297
298   // Add the actors to the stage
299   Stage::GetCurrent().Add(first);
300   Stage::GetCurrent().Add(second);
301   Stage::GetCurrent().Add(third);
302
303   // Check that we get an empty handle because focus order 0 means undefined.
304   DALI_TEST_CHECK(manager.GetActorByFocusOrder(0) == Actor());
305
306   // Check that we get correct actors for the specified focus orders
307   DALI_TEST_CHECK(manager.GetActorByFocusOrder(1) == first);
308   DALI_TEST_CHECK(manager.GetActorByFocusOrder(2) == second);
309   DALI_TEST_CHECK(manager.GetActorByFocusOrder(3) == third);
310
311   // Change the focus order of the third actor to 1
312   manager.SetFocusOrder(third, 1);
313
314   // Check that we still get correct actors after changing their focus orders
315   DALI_TEST_CHECK(manager.GetActorByFocusOrder(1) == third);
316   DALI_TEST_CHECK(manager.GetActorByFocusOrder(2) == first);
317   DALI_TEST_CHECK(manager.GetActorByFocusOrder(3) == second);
318
319   // Check that we get an empty handle because no actor has a focus order of 4
320   DALI_TEST_CHECK(manager.GetActorByFocusOrder(4) == Actor());
321   END_TEST;
322 }
323
324 int UtcDaliAccessibilityManagerSetAndGetCurrentFocusActor(void)
325 {
326   ToolkitTestApplication application;
327
328   tet_infoline(" UtcDaliAccessibilityManagerSetAndGetCurrentFocusActor");
329
330   AccessibilityManager manager = AccessibilityManager::Get();
331   DALI_TEST_CHECK(manager);
332
333   // Create the first actor and add it to the stage
334   Actor first = Actor::New();
335   manager.SetFocusOrder(first, 1);
336   Stage::GetCurrent().Add(first);
337
338   // Create the second actor and add it to the stage
339   Actor second = Actor::New();
340   manager.SetFocusOrder(second, 2);
341   Stage::GetCurrent().Add(second);
342
343   // Create the third actor but don't add it to the stage
344   Actor third = Actor::New();
345   manager.SetFocusOrder(third, 3);
346
347   // Check that no actor is being focused yet.
348   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == Actor());
349
350   // Check that it will fail to set focus on an invalid actor
351   DALI_TEST_CHECK(manager.SetCurrentFocusActor(Actor()) == false);
352
353   // Check that the focus is set on the first actor
354   DALI_TEST_CHECK(manager.SetCurrentFocusActor(first) == true);
355   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == first);
356
357   // Check that the focus is set on the second actor
358   DALI_TEST_CHECK(manager.SetCurrentFocusActor(second) == true);
359   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == second);
360
361   // Check that it will fail to set focus on the third actor as it's not in the stage
362   DALI_TEST_CHECK(manager.SetCurrentFocusActor(third) == false);
363
364   // Add the third actor to the stage
365   Stage::GetCurrent().Add(third);
366
367   // make the third actor invisible
368   third.SetVisible(false);
369   // flush the queue and render once
370   application.SendNotification();
371   application.Render();
372
373   // Check that it will fail to set focus on the third actor as it's invisible
374   DALI_TEST_CHECK(manager.SetCurrentFocusActor(third) == false);
375
376   // Make the third actor visible
377   third.SetVisible(true);
378   // flush the queue and render once
379   application.SendNotification();
380   application.Render();
381
382   // Make the third actor not focusable
383   Property::Index propertyActorFocusable = third.GetPropertyIndex("focusable");
384   third.SetProperty(propertyActorFocusable, false);
385   // flush the queue and render once
386   application.SendNotification();
387   application.Render();
388
389   // Check that it will fail to set focus on the third actor as it's not focusable
390   DALI_TEST_CHECK(manager.SetCurrentFocusActor(third) == false);
391
392   // Make the third actor focusable
393   third.SetProperty(propertyActorFocusable, true);
394   // flush the queue and render once
395   application.SendNotification();
396   application.Render();
397
398   // Check that the focus is successfully moved to the third actor
399   DALI_TEST_CHECK(manager.SetCurrentFocusActor(third) == true);
400
401   // Make the current focused actor to be not focusable by setting its focus order to be 0
402   manager.SetFocusOrder(third, 0);
403
404   // Check that the focus is automatically cleared
405   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == Actor());
406
407   // Set the focus order of the third actor again
408   manager.SetFocusOrder(third, 3);
409
410   // Check that the third actor can be focused successfully now
411   DALI_TEST_CHECK(manager.SetCurrentFocusActor(third) == true);
412   END_TEST;
413 }
414
415 int UtcDaliAccessibilityManagerGetCurrentFocusGroup(void)
416 {
417   ToolkitTestApplication application;
418
419   tet_infoline(" UtcDaliAccessibilityManagerGetCurrentFocusGroup");
420
421   AccessibilityManager manager = AccessibilityManager::Get();
422   DALI_TEST_CHECK(manager);
423
424   // Create an actor with two child actors and add it to the stage
425   Actor parent = Actor::New();
426   Actor firstChild = Actor::New();
427   Actor secondChild = Actor::New();
428   parent.Add(firstChild);
429   parent.Add(secondChild);
430   Stage::GetCurrent().Add(parent);
431
432   // Create three actors and add them as the children of the first child actor
433   Actor firstGrandChild = Actor::New();
434   Actor secondGrandChild = Actor::New();
435   Actor thirdGrandChild = Actor::New();
436   firstChild.Add(firstGrandChild);
437   firstChild.Add(secondGrandChild);
438   firstChild.Add(thirdGrandChild);
439
440   // Set focus order to the actors
441   manager.SetFocusOrder(parent, 1);
442   manager.SetFocusOrder(firstChild, 2);
443   manager.SetFocusOrder(firstGrandChild, 3);
444   manager.SetFocusOrder(secondGrandChild, 4);
445   manager.SetFocusOrder(thirdGrandChild, 5);
446   manager.SetFocusOrder(secondChild, 6);
447
448   // Set the parent and the first child actor as focus groups
449   manager.SetFocusGroup(parent, true);
450   DALI_TEST_CHECK(manager.IsFocusGroup(parent) == true);
451
452   // Set focus to the first grand child actor
453   DALI_TEST_CHECK(manager.SetCurrentFocusActor(firstGrandChild) == true);
454   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == firstGrandChild);
455
456   // The current focus group should be the parent, As it is the immediate parent which is also a focus group.
457   DALI_TEST_CHECK(manager.GetCurrentFocusGroup() == parent);
458
459   manager.SetFocusGroup(firstChild, true);
460   DALI_TEST_CHECK(manager.IsFocusGroup(firstChild) == true);
461
462   // The current focus group should be the firstChild, As it is the immediate parent which is also a focus group.
463   DALI_TEST_CHECK(manager.GetCurrentFocusGroup() == firstChild);
464
465   manager.SetFocusGroup(firstGrandChild, true);
466   DALI_TEST_CHECK(manager.IsFocusGroup(firstGrandChild) == true);
467
468   // The current focus group should be itself, As it is also a focus group.
469   DALI_TEST_CHECK(manager.GetCurrentFocusGroup() == firstGrandChild);
470
471   // Set focus to the second grand child actor
472   DALI_TEST_CHECK(manager.SetCurrentFocusActor(secondGrandChild) == true);
473   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == secondGrandChild);
474
475   // The current focus group should be the firstChild, As it is the immediate parent which is also a
476   // focus group for the current focus actor.
477   DALI_TEST_CHECK(manager.GetCurrentFocusGroup() == firstChild);
478
479   END_TEST;
480 }
481
482 int UtcDaliAccessibilityManagerGetCurrentFocusOrder(void)
483 {
484   ToolkitTestApplication application;
485
486   tet_infoline(" UtcDaliAccessibilityManagerGetCurrentFocusOrder");
487
488   AccessibilityManager manager = AccessibilityManager::Get();
489   DALI_TEST_CHECK(manager);
490
491   Actor first = Actor::New();
492   Stage::GetCurrent().Add(first);
493
494   Actor second = Actor::New();
495   Stage::GetCurrent().Add(second);
496
497   Actor third = Actor::New();
498   Stage::GetCurrent().Add(third);
499
500   // Set the focus order and description for the first actor
501   manager.SetFocusOrder(first, 1);
502   manager.SetAccessibilityAttribute(first, AccessibilityManager::ACCESSIBILITY_LABEL, "first");
503   DALI_TEST_CHECK(manager.GetFocusOrder(first) == 1);
504   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(first, AccessibilityManager::ACCESSIBILITY_LABEL) == "first");
505
506   // Set the focus order and description for the second actor
507   manager.SetFocusOrder(second, 2);
508   manager.SetAccessibilityAttribute(second, AccessibilityManager::ACCESSIBILITY_LABEL, "second");
509   DALI_TEST_CHECK(manager.GetFocusOrder(second) == 2);
510   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(second, AccessibilityManager::ACCESSIBILITY_LABEL) == "second");
511
512   // Set the focus order and description for the second actor
513   manager.SetFocusOrder(third, 3);
514   manager.SetAccessibilityAttribute(third, AccessibilityManager::ACCESSIBILITY_LABEL, "third");
515   DALI_TEST_CHECK(manager.GetFocusOrder(third) == 3);
516   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(third, AccessibilityManager::ACCESSIBILITY_LABEL) == "third");
517
518   // Check that no actor is being focused yet.
519   DALI_TEST_CHECK(manager.GetCurrentFocusOrder() == 0);
520
521   // Set the focus on the first actor and test
522   DALI_TEST_CHECK(manager.SetCurrentFocusActor(first) == true);
523   DALI_TEST_CHECK(manager.GetCurrentFocusOrder() == 1);
524
525   // Move the focus forward to the second actor and test
526   manager.MoveFocusForward();
527   DALI_TEST_CHECK(manager.GetCurrentFocusOrder() == 2);
528
529   // Move the focus forward to the third actor and test
530   manager.MoveFocusForward();
531   DALI_TEST_CHECK(manager.GetCurrentFocusOrder() == 3);
532
533   // Clear focus and test
534   manager.ClearFocus();
535   DALI_TEST_CHECK(manager.GetCurrentFocusOrder() == 0);
536   END_TEST;
537 }
538
539 int UtcDaliAccessibilityManagerMoveFocusForward(void)
540 {
541   ToolkitTestApplication application;
542
543   tet_infoline(" UtcDaliAccessibilityManagerMoveFocusForward");
544
545   AccessibilityManager manager = AccessibilityManager::Get();
546   DALI_TEST_CHECK(manager);
547
548   Actor first = Actor::New();
549   Stage::GetCurrent().Add(first);
550
551   Actor second = Actor::New();
552   Stage::GetCurrent().Add(second);
553
554   Actor third = Actor::New();
555   Stage::GetCurrent().Add(third);
556
557   // Set the focus order and description for the first actor
558   manager.SetFocusOrder(first, 1);
559   manager.SetAccessibilityAttribute(first, AccessibilityManager::ACCESSIBILITY_LABEL, "first");
560   DALI_TEST_CHECK(manager.GetFocusOrder(first) == 1);
561   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(first, AccessibilityManager::ACCESSIBILITY_LABEL) == "first");
562
563   // Set the focus order and description for the second actor
564   manager.SetFocusOrder(second, 2);
565   manager.SetAccessibilityAttribute(second, AccessibilityManager::ACCESSIBILITY_LABEL, "second");
566   DALI_TEST_CHECK(manager.GetFocusOrder(second) == 2);
567   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(second, AccessibilityManager::ACCESSIBILITY_LABEL) == "second");
568
569   // Set the focus order and description for the second actor
570   manager.SetFocusOrder(third, 3);
571   manager.SetAccessibilityAttribute(third, AccessibilityManager::ACCESSIBILITY_LABEL, "third");
572   DALI_TEST_CHECK(manager.GetFocusOrder(third) == 3);
573   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(third, AccessibilityManager::ACCESSIBILITY_LABEL) == "third");
574
575   // Check that no actor is being focused yet.
576   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == Actor());
577
578   // Set the focus on the first actor
579   DALI_TEST_CHECK(manager.SetCurrentFocusActor(first) == true);
580   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == first);
581   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), AccessibilityManager::ACCESSIBILITY_LABEL) == "first");
582
583   // Test the non-wrapped move first
584   manager.SetWrapMode(false);
585   DALI_TEST_CHECK(manager.GetWrapMode() == false);
586
587   // Move the focus forward to the second actor
588   manager.MoveFocusForward();
589   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == second);
590   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), AccessibilityManager::ACCESSIBILITY_LABEL) == "second");
591
592   // Move the focus forward to the third actor
593   manager.MoveFocusForward();
594   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == third);
595   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), AccessibilityManager::ACCESSIBILITY_LABEL) == "third");
596
597   // Check that it will fail to move the focus forward again as the third actor is the last
598   // focusable actor in the focus chain
599   manager.MoveFocusForward();
600   // The focus should still be set on the third actor
601   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == third);
602   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), AccessibilityManager::ACCESSIBILITY_LABEL) == "third");
603
604   // Now test the wrapped move
605   manager.SetWrapMode(true);
606   DALI_TEST_CHECK(manager.GetWrapMode() == true);
607
608   // Move the focus forward recursively and this time the first actor should be focused
609   manager.MoveFocusForward();
610   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == first);
611   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), AccessibilityManager::ACCESSIBILITY_LABEL) == "first");
612
613   // Make the second actor not focusable
614   Property::Index propertyActorFocusable = second.GetPropertyIndex("focusable");
615   second.SetProperty(propertyActorFocusable, false);
616   // flush the queue and render once
617   application.SendNotification();
618   application.Render();
619
620   // Move the focus forward and check that the second actor should be skipped and
621   // the third actor should be focused now.
622   manager.MoveFocusForward();
623   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == third);
624   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), AccessibilityManager::ACCESSIBILITY_LABEL) == "third");
625
626   // Make the first actor invisible
627   first.SetVisible(false);
628   // flush the queue and render once
629   application.SendNotification();
630   application.Render();
631
632   // Move the focus forward and check that the first actor should be skipped as it's
633   // invisible and the second actor should also be skipped as it's not focusable,
634   // so the focus will still be on the third actor
635   manager.MoveFocusForward();
636   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == third);
637   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), AccessibilityManager::ACCESSIBILITY_LABEL) == "third");
638
639   // Make the third actor invisible so that no actor can be focused.
640   third.SetVisible(false);
641   // flush the queue and render once
642   application.SendNotification();
643   application.Render();
644
645   // Check that the focus move is failed as all the three actors can not be focused
646   manager.MoveFocusForward();
647   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == third);
648   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), AccessibilityManager::ACCESSIBILITY_LABEL) == "third");
649   END_TEST;
650 }
651
652 int UtcDaliAccessibilityManagerMoveFocusBackward(void)
653 {
654   ToolkitTestApplication application;
655
656   tet_infoline(" UtcDaliAccessibilityManagerMoveFocusBackward");
657
658   AccessibilityManager manager = AccessibilityManager::Get();
659   DALI_TEST_CHECK(manager);
660
661   Actor first = Actor::New();
662   Stage::GetCurrent().Add(first);
663
664   Actor second = Actor::New();
665   Stage::GetCurrent().Add(second);
666
667   Actor third = Actor::New();
668   Stage::GetCurrent().Add(third);
669
670   // Set the focus order and description for the first actor
671   manager.SetFocusOrder(first, 1);
672   manager.SetAccessibilityAttribute(first, AccessibilityManager::ACCESSIBILITY_LABEL, "first");
673   DALI_TEST_CHECK(manager.GetFocusOrder(first) == 1);
674   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(first, AccessibilityManager::ACCESSIBILITY_LABEL) == "first");
675
676   // Set the focus order and description for the second actor
677   manager.SetFocusOrder(second, 2);
678   manager.SetAccessibilityAttribute(second, AccessibilityManager::ACCESSIBILITY_LABEL, "second");
679   DALI_TEST_CHECK(manager.GetFocusOrder(second) == 2);
680   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(second, AccessibilityManager::ACCESSIBILITY_LABEL) == "second");
681
682   // Set the focus order and description for the second actor
683   manager.SetFocusOrder(third, 3);
684   manager.SetAccessibilityAttribute(third, AccessibilityManager::ACCESSIBILITY_LABEL, "third");
685   DALI_TEST_CHECK(manager.GetFocusOrder(third) == 3);
686   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(third, AccessibilityManager::ACCESSIBILITY_LABEL) == "third");
687
688   // Check that no actor is being focused yet.
689   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == Actor());
690
691   // Set the focus on the third actor
692   DALI_TEST_CHECK(manager.SetCurrentFocusActor(third) == true);
693   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == third);
694   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), AccessibilityManager::ACCESSIBILITY_LABEL) == "third");
695
696   // Test the non-wrapped move first
697   manager.SetWrapMode(false);
698   DALI_TEST_CHECK(manager.GetWrapMode() == false);
699
700   // Move the focus backward to the second actor
701   manager.MoveFocusBackward();
702   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == second);
703   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), AccessibilityManager::ACCESSIBILITY_LABEL) == "second");
704
705   // Move the focus backward to the first actor
706   manager.MoveFocusBackward();
707   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == first);
708   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), AccessibilityManager::ACCESSIBILITY_LABEL) == "first");
709
710   // Check that it will fail to move the focus backward again as the first actor is the first
711   // focusable actor in the focus chain
712   manager.MoveFocusBackward();
713   // The focus should still be set on the first actor
714   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == first);
715   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), AccessibilityManager::ACCESSIBILITY_LABEL) == "first");
716
717   // Now test the wrapped move
718   manager.SetWrapMode(true);
719   DALI_TEST_CHECK(manager.GetWrapMode() == true);
720
721   // Move the focus backward recursively and this time the third actor should be focused
722   manager.MoveFocusBackward();
723   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == third);
724   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), AccessibilityManager::ACCESSIBILITY_LABEL) == "third");
725
726   // Make the second actor not focusable
727   Property::Index propertyActorFocusable = second.GetPropertyIndex("focusable");
728   second.SetProperty(propertyActorFocusable, false);
729   // flush the queue and render once
730   application.SendNotification();
731   application.Render();
732
733   // Move the focus backward and check that the second actor should be skipped and
734   // the first actor should be focused now.
735   manager.MoveFocusBackward();
736   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == first);
737   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), AccessibilityManager::ACCESSIBILITY_LABEL) == "first");
738
739   // Make the third actor invisible
740   third.SetVisible(false);
741   // flush the queue and render once
742   application.SendNotification();
743   application.Render();
744
745   // Move the focus backward and check that the third actor should be skipped as it's
746   // invisible and the second actor should also be skipped as it's not focusable,
747   // so the focus will still be on the first actor
748   manager.MoveFocusBackward();
749   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == first);
750   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), AccessibilityManager::ACCESSIBILITY_LABEL) == "first");
751
752   // Make the first actor invisible so that no actor can be focused.
753   first.SetVisible(false);
754   // flush the queue and render once
755   application.SendNotification();
756   application.Render();
757
758   // Check that the focus move is failed as all the three actors can not be focused
759   manager.MoveFocusBackward();
760   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == first);
761   DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), AccessibilityManager::ACCESSIBILITY_LABEL) == "first");
762   END_TEST;
763 }
764
765 int UtcDaliAccessibilityManagerClearFocus(void)
766 {
767   ToolkitTestApplication application;
768
769   tet_infoline(" UtcDaliAccessibilityManagerClearFocus");
770
771   AccessibilityManager manager = AccessibilityManager::Get();
772   DALI_TEST_CHECK(manager);
773
774   // Create the first actor and add it to the stage
775   Actor first = Actor::New();
776   manager.SetFocusOrder(first, 1);
777   Stage::GetCurrent().Add(first);
778
779   // Create the second actor and add it to the stage
780   Actor second = Actor::New();
781   manager.SetFocusOrder(second, 2);
782   Stage::GetCurrent().Add(second);
783
784   // Check that no actor is being focused yet.
785   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == Actor());
786
787   // Check that the focus is set on the first actor
788   DALI_TEST_CHECK(manager.SetCurrentFocusActor(first) == true);
789   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == first);
790
791   // Check that the focus is set on the second actor
792   DALI_TEST_CHECK(manager.SetCurrentFocusActor(second) == true);
793   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == second);
794
795   // Clear the focus
796   manager.ClearFocus();
797
798   // Check that no actor is being focused now.
799   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == Actor());
800   END_TEST;
801 }
802
803 int UtcDaliAccessibilityManagerReset(void)
804 {
805   ToolkitTestApplication application;
806
807   tet_infoline(" UtcDaliAccessibilityManagerReset");
808
809   AccessibilityManager manager = AccessibilityManager::Get();
810   DALI_TEST_CHECK(manager);
811
812   // Create the first actor and add it to the stage
813   Actor first = Actor::New();
814   manager.SetFocusOrder(first, 1);
815   Stage::GetCurrent().Add(first);
816
817   // Create the second actor and add it to the stage
818   Actor second = Actor::New();
819   manager.SetFocusOrder(second, 2);
820   Stage::GetCurrent().Add(second);
821
822   // Check that no actor is being focused yet.
823   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == Actor());
824
825   // Check that the focus is set on the first actor
826   DALI_TEST_CHECK(manager.SetCurrentFocusActor(first) == true);
827   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == first);
828
829   // Check that the focus is set on the second actor
830   DALI_TEST_CHECK(manager.SetCurrentFocusActor(second) == true);
831   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == second);
832
833   // Clear the focus
834   manager.Reset();
835
836   // Check that no actor is being focused now and the focus order of actors have been cleared
837   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == Actor());
838   DALI_TEST_CHECK(manager.GetFocusOrder(first) == 0);
839   DALI_TEST_CHECK(manager.GetFocusOrder(first) == 0);
840   END_TEST;
841 }
842
843 int UtcDaliAccessibilityManagerFocusGroup(void)
844 {
845   ToolkitTestApplication application;
846
847   tet_infoline(" UtcDaliAccessibilityManagerFocusGroup");
848
849   AccessibilityManager manager = AccessibilityManager::Get();
850   DALI_TEST_CHECK(manager);
851
852   // Create an actor with two child actors and add it to the stage
853   Actor parent = Actor::New();
854   Actor firstChild = Actor::New();
855   Actor secondChild = Actor::New();
856   parent.Add(firstChild);
857   parent.Add(secondChild);
858   Stage::GetCurrent().Add(parent);
859
860   // Create three actors and add them as the children of the first child actor
861   Actor firstGrandChild = Actor::New();
862   Actor secondGrandChild = Actor::New();
863   Actor thirdGrandChild = Actor::New();
864   firstChild.Add(firstGrandChild);
865   firstChild.Add(secondGrandChild);
866   firstChild.Add(thirdGrandChild);
867
868   // Set focus order to the actors
869   manager.SetFocusOrder(parent, 1);
870   manager.SetFocusOrder(firstChild, 2);
871   manager.SetFocusOrder(firstGrandChild, 3);
872   manager.SetFocusOrder(secondGrandChild, 4);
873   manager.SetFocusOrder(thirdGrandChild, 5);
874   manager.SetFocusOrder(secondChild, 6);
875
876   // Set the parent and the first child actor as focus groups
877   manager.SetFocusGroup(parent, true);
878   DALI_TEST_CHECK(manager.IsFocusGroup(parent) == true);
879
880   // The focus group of the parent should be itself, as it is set to be a focus group.
881   DALI_TEST_CHECK(manager.GetFocusGroup(parent) == parent);
882
883   // The focus group of the firstChild should be its parent, as it is the immediate parent which is also a group.
884   DALI_TEST_CHECK(manager.GetFocusGroup(firstChild) == parent);
885
886   manager.SetFocusGroup(firstChild, true);
887   DALI_TEST_CHECK(manager.IsFocusGroup(firstChild) == true);
888
889   // The focus group of the firstChild should be itself, as it is set to be a focus group now.
890   DALI_TEST_CHECK(manager.GetFocusGroup(firstChild) == firstChild);
891
892   // Enable wrap mode for focus movement.
893   manager.SetWrapMode(true);
894   DALI_TEST_CHECK(manager.GetWrapMode() == true);
895
896   // Check that no actor is being focused yet.
897   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == Actor());
898
899   // Check that the focus is set on the parent actor.
900   DALI_TEST_CHECK(manager.SetCurrentFocusActor(parent) == true);
901   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == parent);
902
903   // Check that group mode is disabled.
904   DALI_TEST_CHECK(manager.GetGroupMode() == false);
905
906   // Check that the focus movement is wrapped as normal.
907   DALI_TEST_CHECK(manager.MoveFocusForward() == true);
908   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == firstChild);
909   DALI_TEST_CHECK(manager.MoveFocusForward() == true);
910   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == firstGrandChild);
911   DALI_TEST_CHECK(manager.MoveFocusForward() == true);
912   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == secondGrandChild);
913   DALI_TEST_CHECK(manager.MoveFocusForward() == true);
914   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == thirdGrandChild);
915   DALI_TEST_CHECK(manager.MoveFocusForward() == true);
916   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == secondChild);
917   DALI_TEST_CHECK(manager.MoveFocusForward() == true);
918   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == parent);
919   DALI_TEST_CHECK(manager.MoveFocusForward() == true);
920   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == firstChild);
921   DALI_TEST_CHECK(manager.MoveFocusForward() == true);
922   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == firstGrandChild);
923
924   // Enable the group mode.
925   manager.SetGroupMode(true);
926   DALI_TEST_CHECK(manager.GetGroupMode() == true);
927
928   // Check that the focus movement is now limited to the current focus group.
929   DALI_TEST_CHECK(manager.MoveFocusForward() == true);
930   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == secondGrandChild);
931   DALI_TEST_CHECK(manager.MoveFocusForward() == true);
932   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == thirdGrandChild);
933   DALI_TEST_CHECK(manager.MoveFocusForward() == true);
934   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == firstChild);
935   DALI_TEST_CHECK(manager.MoveFocusForward() == true);
936   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == firstGrandChild);
937   END_TEST;
938 }
939
940 int UtcDaliAccessibilityManagerSetAndGetFocusIndicator(void)
941 {
942   ToolkitTestApplication application;
943
944   tet_infoline(" UtcDaliAccessibilityManagerSetAndGetFocusIndicator");
945
946   AccessibilityManager manager = AccessibilityManager::Get();
947   DALI_TEST_CHECK(manager);
948
949   Actor defaultFocusIndicatorActor = manager.GetFocusIndicatorActor();
950   DALI_TEST_CHECK(defaultFocusIndicatorActor);
951
952   Actor newFocusIndicatorActor = Actor::New();
953   manager.SetFocusIndicatorActor(newFocusIndicatorActor);
954   DALI_TEST_CHECK(manager.GetFocusIndicatorActor() == newFocusIndicatorActor);
955   END_TEST;
956 }
957
958 int UtcDaliAccessibilityManagerSignalFocusChanged(void)
959 {
960   ToolkitTestApplication application;
961
962   tet_infoline(" UtcDaliAccessibilityManagerSignalFocusChanged");
963
964   AccessibilityManager manager = AccessibilityManager::Get();
965   DALI_TEST_CHECK(manager);
966
967   bool signalVerified = false;
968   FocusChangedCallback callback(signalVerified);
969   manager.FocusChangedSignal().Connect( &callback, &FocusChangedCallback::Callback );
970
971   // Create the first actor and add it to the stage
972   Actor first = Actor::New();
973   manager.SetFocusOrder(first, 1);
974   Stage::GetCurrent().Add(first);
975
976   // Create the second actor and add it to the stage
977   Actor second = Actor::New();
978   manager.SetFocusOrder(second, 2);
979   Stage::GetCurrent().Add(second);
980
981   // Check that no actor is being focused yet.
982   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == Actor());
983
984   // Check that the focus is set on the first actor
985   DALI_TEST_CHECK(manager.SetCurrentFocusActor(first) == true);
986   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == first);
987   DALI_TEST_CHECK(callback.mSignalVerified);
988   callback.Reset();
989
990   // Check that the focus is set on the second actor
991   DALI_TEST_CHECK(manager.SetCurrentFocusActor(second) == true);
992   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == second);
993   DALI_TEST_CHECK(callback.mSignalVerified);
994   callback.Reset();
995
996   // Clear the focus
997   manager.ClearFocus();
998
999   // Check that no actor is being focused now.
1000   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == Actor());
1001   DALI_TEST_CHECK(callback.mSignalVerified);
1002   END_TEST;
1003 }
1004
1005 int UtcDaliAccessibilityManagerSignalFocusOvershot(void)
1006 {
1007   ToolkitTestApplication application;
1008
1009   tet_infoline(" UtcDaliAccessibilityManagerSignalFocusOvershot");
1010
1011   AccessibilityManager manager = AccessibilityManager::Get();
1012   DALI_TEST_CHECK(manager);
1013
1014   bool signalVerified = false;
1015   FocusOvershotCallback callback(signalVerified);
1016   manager.FocusOvershotSignal().Connect(&callback, &FocusOvershotCallback::Callback);
1017
1018   // Create the first actor and add it to the stage
1019   Actor first = Actor::New();
1020   manager.SetFocusOrder(first, 1);
1021   Stage::GetCurrent().Add(first);
1022
1023   // Create the second actor and add it to the stage
1024   Actor second = Actor::New();
1025   manager.SetFocusOrder(second, 2);
1026   Stage::GetCurrent().Add(second);
1027
1028   // Check that the wrap mode is disabled
1029   DALI_TEST_CHECK(manager.GetWrapMode() == false);
1030
1031   // Check that the focus is set on the first actor
1032   DALI_TEST_CHECK(manager.SetCurrentFocusActor(first) == true);
1033   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == first);
1034
1035   // Check that the focus is moved to the second actor successfully.
1036   DALI_TEST_CHECK(manager.MoveFocusForward() == true);
1037   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == second);
1038
1039   // Check that the forward focus movement is overshot.
1040   callback.mCurrentFocusedActor = second;
1041   callback.mFocusOvershotDirection = Toolkit::AccessibilityManager::OVERSHOT_NEXT;
1042   DALI_TEST_CHECK(manager.MoveFocusForward() == false);
1043   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == second);
1044   DALI_TEST_CHECK(signalVerified);
1045   callback.Reset();
1046
1047   // Enable the wrap mode
1048   manager.SetWrapMode(true);
1049   DALI_TEST_CHECK(manager.GetWrapMode() == true);
1050
1051   // Check that the forward focus movement is wrapped and no overshot happens.
1052   DALI_TEST_CHECK(manager.MoveFocusForward() == true);
1053   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == first);
1054   DALI_TEST_CHECK(signalVerified == false);
1055
1056   // Disable the wrap mode
1057   manager.SetWrapMode(false);
1058   DALI_TEST_CHECK(manager.GetWrapMode() == false);
1059
1060   // Check that the backward focus movement is overshot.
1061   callback.mCurrentFocusedActor = first;
1062   callback.mFocusOvershotDirection = Toolkit::AccessibilityManager::OVERSHOT_PREVIOUS;
1063   DALI_TEST_CHECK(manager.MoveFocusBackward() == false);
1064   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == first);
1065   DALI_TEST_CHECK(signalVerified);
1066   END_TEST;
1067 }
1068
1069 int UtcDaliAccessibilityManagerSignalFocusedActorActivated(void)
1070 {
1071   ToolkitTestApplication application;
1072
1073   tet_infoline(" UtcDaliAccessibilityManagerSignalFocusedActorActivated");
1074
1075   AccessibilityManager manager = AccessibilityManager::Get();
1076   DALI_TEST_CHECK(manager);
1077
1078   FocusedActorActivatedCallback callback;
1079   manager.FocusedActorActivatedSignal().Connect(&callback, &FocusedActorActivatedCallback::Callback);
1080   DALI_TEST_CHECK(true);
1081
1082   END_TEST;
1083 }