Merge remote-tracking branch 'origin/tizen' into new_text
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit-unmanaged / utc-Dali-PageTurnView.cpp
index 07265ed..4b314c0 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) 2014 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>
 using namespace Dali;
 using namespace Dali::Toolkit;
 
-void dali_page_turn_view_startup(void)
-{
-  test_return_value = TET_UNDEF;
-}
-
-void dali_page_turn_view_cleanup(void)
-{
-  test_return_value = TET_PASS;
-}
-
-
-
 namespace
 {
 const int RENDER_FRAME_INTERVAL = 16;                           ///< Duration of each frame in ms. (at approx 60FPS)
@@ -60,20 +49,14 @@ static void TestCallback(BaseHandle handle)
  *
  * @param application Test application instance
  * @param duration Time to pass in milliseconds.
- * @return The actual time passed in milliseconds
  */
-int Wait(ToolkitTestApplication& application, int duration = 0)
+void Wait(ToolkitTestApplication& application, int duration = 0)
 {
-  int time = 0;
-
   for(int i = 0; i <= ( duration / RENDER_FRAME_INTERVAL); i++)
   {
     application.SendNotification();
     application.Render(RENDER_FRAME_INTERVAL);
-    time += RENDER_FRAME_INTERVAL;
   }
-
-  return time;
 }
 
 // Generate a PanGestureEvent to send to Core
@@ -255,6 +238,15 @@ private:
 
 }// namespace
 
+void dali_page_turn_view_startup(void)
+{
+  test_return_value = TET_UNDEF;
+}
+
+void dali_page_turn_view_cleanup(void)
+{
+  test_return_value = TET_PASS;
+}
 
 int UtcDaliPageTurnPortraitViewNew(void)
 {
@@ -373,6 +365,8 @@ int UtcDaliPageTurnViewEnterLeaveEditMode(void)
 
   tet_infoline( " UtcDaliPageTurnViewEnterLeaveEditMode " );
 
+  application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE );
+
   TestPageFactory factory(application);
   factory.EnableOffscreenRendering( );
 
@@ -422,6 +416,8 @@ int UtcDaliPageTurnViewGetHitActor(void)
 
   tet_infoline(" UtcDaliPageTurnViewGetHitActor ");
 
+  application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE );
+
   TestPageFactory factory(application);
   factory.EnableOffscreenRendering( );
 
@@ -457,6 +453,8 @@ int UtcDaliPageTurnViewRefresh(void)
 
   tet_infoline(" UtcDaliPageTurnViewRefresh ");
 
+  application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE );
+
   TestPageFactory factory(application);
   factory.EnableOffscreenRendering( );
   PageTurnView pageTurnView = PageTurnPortraitView::New( factory, PAGE_SIZE );
@@ -495,6 +493,8 @@ int UtcDaliPageTurnViewSignals(void)
 
   tet_infoline(" UtcDaliPageTurnViewSignals ");
 
+  application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE );
+
   TestPageFactory factory(application);
   Vector2 size = Stage::GetCurrent().GetSize();
   PageTurnView portraitView = PageTurnPortraitView::New( factory, size );