Merge "Empty Implementation for INPUT_METHOD_SETTINGS property" into tizen
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / utc-Dali-FocusManager.cpp
index c9fc767..b26edb0 100644 (file)
@@ -1,18 +1,19 @@
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://floralicense.org/license/
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an AS IS BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
 
 #include <iostream>
 #include <stdlib.h>
@@ -21,7 +22,6 @@
 // test harness headers before dali headers.
 #include <dali-toolkit-test-suite-utils.h>
 
-#include <dali/dali.h>
 #include <dali-toolkit/dali-toolkit.h>
 
 using namespace Dali;
@@ -114,6 +114,20 @@ public:
   Toolkit::FocusManager::FocusOvershotDirection mFocusOvershotDirection;
 };
 
+// Functor to test whether focused actor activated signal is emitted.
+class FocusedActorActivatedCallback : public Dali::ConnectionTracker
+{
+public:
+  FocusedActorActivatedCallback()
+  {
+  }
+
+  void Callback(Actor activatedActor)
+  {
+    tet_infoline("Verifying FocusedActorActivatedCallback()");
+  }
+};
+
 } // namespace
 
 
@@ -1051,3 +1065,19 @@ int UtcDaliFocusManagerSignalFocusOvershot(void)
   DALI_TEST_CHECK(signalVerified);
   END_TEST;
 }
+
+int UtcDaliFocusManagerSignalFocusedActorActivated(void)
+{
+  ToolkitTestApplication application;
+
+  tet_infoline(" UtcDaliFocusManagerSignalFocusedActorActivated");
+
+  FocusManager manager = FocusManager::Get();
+  DALI_TEST_CHECK(manager);
+
+  FocusedActorActivatedCallback callback;
+  manager.FocusedActorActivatedSignal().Connect(&callback, &FocusedActorActivatedCallback::Callback);
+  DALI_TEST_CHECK(true);
+
+  END_TEST;
+}