From 6095d0c8c78404e2db33f71d2f36872961edf76f Mon Sep 17 00:00:00 2001 From: Dongsug Song Date: Fri, 17 Apr 2020 17:45:39 +0900 Subject: [PATCH] [Non-ACR][NUI][Fix TCT fails] Change-Id: Iad871d79d046b965b6c4720c4bdb63668181f21a --- .../testcase/TSInputMethodContext.cs | 50 ++++++++++++++-------- .../Tizen.NUI.Tests/testcase/TSVideoView.cs | 13 ++++-- 2 files changed, 42 insertions(+), 21 deletions(-) diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSInputMethodContext.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSInputMethodContext.cs index 45e4f0f..7a92844 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSInputMethodContext.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSInputMethodContext.cs @@ -635,22 +635,26 @@ namespace Tizen.NUI.Tests }; NUIApplication.GetDefaultWindow().GetDefaultLayer().Add(editor); var inputMethodContext = editor.GetInputMethodContext(); + await Task.Delay(500); if (inputMethodContext) { _temp = 0; inputMethodContext.EventReceived += OnEventReceived; - inputMethodContext.Deactivate(); - inputMethodContext.HideInputPanel(); - await Task.Delay(500); + tlog.Debug(TAG, $"EventReceived_EVENT, OnEventReceived added, State={inputMethodContext.GetInputPanelState()}"); inputMethodContext.Activate(); inputMethodContext.ShowInputPanel(); - await Task.Delay(500); - - tlog.Debug(TAG, "EventReceived_EVENT Add 500ms delay"); - + await Task.Delay(500); + tlog.Debug(TAG, $"EventReceived_EVENT, ShowInputPanel() 500ms delay, State={inputMethodContext.GetInputPanelState()}"); + inputMethodContext.HideInputPanel(); + await Task.Delay(500); + tlog.Debug(TAG, $"EventReceived_EVENT, HideInputPanel() 500ms delay, State={inputMethodContext.GetInputPanelState()}"); Assert.AreEqual(10, _temp, "Should be 10"); inputMethodContext.EventReceived -= OnEventReceived; } + else + { + tlog.Debug(TAG, $"EventReceived_EVENT, error : inputMethodContext is null !"); + } editor.Unparent(); editor.Dispose(); editor = null; @@ -671,23 +675,29 @@ namespace Tizen.NUI.Tests Position2D = new Position2D(10, 550), BackgroundColor = Color.Magenta, Focusable = true, - }; + }; NUIApplication.GetDefaultWindow().GetDefaultLayer().Add(editor); var inputMethodContext = editor.GetInputMethodContext(); + await Task.Delay(500); if (inputMethodContext) { _temp = 0; inputMethodContext.StatusChanged += OnInputMethodContextEvent; - inputMethodContext.Deactivate(); - inputMethodContext.HideInputPanel(); - await Task.Delay(500); + tlog.Debug(TAG, $"StatusChanged_EVENT, OnInputMethodContextEvent added, State={inputMethodContext.GetInputPanelState()}"); inputMethodContext.Activate(); inputMethodContext.ShowInputPanel(); await Task.Delay(500); - tlog.Debug(TAG, "StatusChanged_EVENT Add 500ms delay"); + tlog.Debug(TAG, $"StatusChanged_EVENT, ShowInputPanel() 500ms delay, State={inputMethodContext.GetInputPanelState()}"); + inputMethodContext.HideInputPanel(); + await Task.Delay(500); + tlog.Debug(TAG, $"StatusChanged_EVENT, HideInputPanel() 500ms delay, State={inputMethodContext.GetInputPanelState()}"); Assert.AreEqual(10, _temp, "Should be 10"); inputMethodContext.StatusChanged -= OnInputMethodContextEvent; } + else + { + tlog.Debug(TAG, $"StatusChanged_EVENT, error : inputMethodContext is null !"); + } editor.Unparent(); editor.Dispose(); editor = null; @@ -708,23 +718,29 @@ namespace Tizen.NUI.Tests Position2D = new Position2D(10, 550), BackgroundColor = Color.Magenta, Focusable = true, - }; + }; NUIApplication.GetDefaultWindow().GetDefaultLayer().Add(editor); var inputMethodContext = editor.GetInputMethodContext(); + await Task.Delay(500); if (inputMethodContext) { _temp = 0; inputMethodContext.Resized += OnInputMethodContextEvent; + tlog.Debug(TAG, $"Resized_EVENT, OnInputMethodContextEvent added, State={inputMethodContext.GetInputPanelState()}"); inputMethodContext.Activate(); inputMethodContext.ShowInputPanel(); await Task.Delay(500); - inputMethodContext.Deactivate(); + tlog.Debug(TAG, $"Resized_EVENT, ShowInputPanel() 500ms delay, State={inputMethodContext.GetInputPanelState()}"); inputMethodContext.HideInputPanel(); - await Task.Delay(500); - tlog.Debug(TAG, "Resized_EVENT Add 500ms delay"); + await Task.Delay(500); + tlog.Debug(TAG, $"Resized_EVENT, HideInputPanel() 500ms delay, State={inputMethodContext.GetInputPanelState()}"); Assert.AreEqual(10, _temp, "Should be 10"); inputMethodContext.Resized -= OnInputMethodContextEvent; - } + } + else + { + tlog.Debug(TAG, $"Resized_EVENT, error : inputMethodContext is null !"); + } editor.Unparent(); editor.Dispose(); editor = null; diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSVideoView.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSVideoView.cs index 6110933..bb123c9 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSVideoView.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSVideoView.cs @@ -376,16 +376,21 @@ namespace Tizen.NUI.Tests videoView.Underlay = false; Window.Instance.GetDefaultLayer().Add(videoView); await Task.Delay(3000); - - //Assert.IsInstanceOf(videoView, "Should be an instance of VideoView type."); - + Assert.IsInstanceOf(videoView, "Should be an instance of VideoView type."); try { _flagOnFinished = false; videoView.Finished += OnFinished; Assert.False(_flagOnFinished, "_flagOnFinished should false initial"); videoView.Play(); - await Task.Delay(2000); + Tizen.Log.Error(TAG, $"Finished_CHECK_EVENT, videoPath={videoPath}"); + await Task.Delay(3000); + if (false == _flagOnFinished) + { + Tizen.Log.Error(TAG, $"Finished_CHECK_EVENT, _flagOnFinished is false! this is just Finished event test, so Stop() forcefully"); + videoView.Stop(); + await Task.Delay(1000); + } Assert.True(_flagOnFinished, "_flagOnFinished should be true after Finished triggered"); videoView.Unparent(); } -- 2.7.4