Merge "Simplified actor depth traversal algorithms" into devel/master
[platform/core/uifw/dali-core.git] / automated-tests / src / dali / utc-Dali-Texture.cpp
index 8620381..5613e17 100644 (file)
@@ -612,3 +612,41 @@ int UtcDaliTextureGetHeight(void)
   END_TEST;
 }
 
+int UtcDaliTextureContextLoss(void)
+{
+  tet_infoline("UtcDaliTextureContextLoss\n");
+  TestApplication application; // Default config: DALI_DISCARDS_ALL_DATA
+
+  //Create the texture
+  unsigned int width(64);
+  unsigned int height(64);
+  Texture texture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, width, height );
+  DALI_TEST_CHECK( texture );
+
+  application.SendNotification();
+  application.Render(16);
+
+  // Lose & regain context (in render 'thread')
+  application.ResetContext();
+  DALI_TEST_CHECK( texture );
+
+  END_TEST;
+}
+
+int UtcDaliNativeImageTexture(void)
+{
+  TestApplication application;
+  tet_infoline( "UtcDaliNativeImageTexture" );
+
+  TestNativeImagePointer imageInterface = TestNativeImage::New( 16, 16 );
+  Texture texture = Texture::New( *(imageInterface.Get()) );
+  DALI_TEST_CHECK( texture );
+
+  application.SendNotification();
+  application.Render(16);
+
+  DALI_TEST_CHECK( texture );
+
+  END_TEST;
+}
+