[Non-ACR][NUI][Fix TC block issue which occurs only in RPI3] 22/232022/1
authorDongsug Song <dongsug.song@samsung.com>
Mon, 27 Apr 2020 11:01:02 +0000 (20:01 +0900)
committerDongsug Song <dongsug.song@samsung.com>
Mon, 27 Apr 2020 11:01:50 +0000 (20:01 +0900)
Change-Id: I5f88030406fba13b8581f0232f1261d34d625512

tct-suite-vs/Tizen.NUI.Tests/testcase/TSVideoView.cs

index 03f7490..df0a51d 100755 (executable)
@@ -371,21 +371,37 @@ namespace Tizen.NUI.Tests
         {
             /* TEST CODE */
             VideoView videoView = new VideoView();
+            Tizen.Log.Debug(TAG, $"Finished_CHECK_EVENT() start");
             videoView.Size2D = new Size2D(200, 200);
+            Tizen.Log.Debug(TAG, $"Set Size2D");
             videoView.ResourceUrl = videoPath;
-            videoView.Underlay = false;
+            Tizen.Log.Debug(TAG, $"videoPath={videoPath}, delay 3s");
+            //videoView.Underlay = false;  not needed!!!
+            await Task.Delay(3000);
             Window.Instance.GetDefaultLayer().Add(videoView);
+            Tizen.Log.Debug(TAG, $"Add on window, delay 3s");
             await Task.Delay(3000);
 
             //Assert.IsInstanceOf<VideoView>(videoView, "Should be an instance of VideoView type.");
 
             try
             {
+                videoView.Stop(); //make sure to be stopped
                 flagOnFinished = false;
                 videoView.Finished += OnFinished;
+                Tizen.Log.Debug(TAG, $"Add Finished event");
                 Assert.False(flagOnFinished, "flagOnFinished should false initial");
                 videoView.Play();
-                await Task.Delay(2000);
+                Tizen.Log.Debug(TAG, $"play, delay 3s");
+                await Task.Delay(3000);
+                if(flagOnFinished == false)
+                {
+                    //just for in case, add stop(). this is Finished event TC, so no problem
+                    Tizen.Log.Debug(TAG, $"stop, delay 1s");
+                    videoView.Stop();
+                    await Task.Delay(1000);
+                }
+                Tizen.Log.Debug(TAG, $"flagOnFinished={flagOnFinished}");
                 Assert.True(flagOnFinished, "flagOnFinished should be true after Finished triggered");
                 videoView.Unparent();
             }