X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Futc-Dali-WebView.cpp;h=4e553e8c8c1f1ac512522378f1b94467c31e77bc;hp=90d24a5152fa29d45dc342b91c499ce84e1fceb2;hb=HEAD;hpb=b4b0e14f550ed243a65d56e2ba1eccc66c6c3dd9 diff --git a/automated-tests/src/dali-toolkit/utc-Dali-WebView.cpp b/automated-tests/src/dali-toolkit/utc-Dali-WebView.cpp old mode 100755 new mode 100644 index 90d24a5..2ede899 --- a/automated-tests/src/dali-toolkit/utc-Dali-WebView.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-WebView.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -29,9 +29,9 @@ #include #include #include -#include #include #include +#include #include #include #include @@ -153,7 +153,7 @@ static void OnNewWindowCreated(Dali::WebEnginePlugin*& outPlugin) { gNewWindowCreatedCallbackCalled++; WebView newView = WebView::New(); - outPlugin = newView.GetPlugin(); + outPlugin = newView.GetPlugin(); } static void OnUrlChanged(const std::string& url) @@ -2367,3 +2367,50 @@ int UtcDaliWebViewGetPlainText(void) END_TEST; } + +int UtcDaliWebViewVisibilityChange(void) +{ + ToolkitTestApplication application; + + WebView view = WebView::New(); + Control dummy = Control::New(); + DALI_TEST_CHECK(view); + DALI_TEST_CHECK(dummy); + + view.LoadUrl(TEST_URL1); + + dummy.Add(view); + auto window = application.GetWindow(); + window.Add(dummy); + + application.SendNotification(); + application.Render(); + + try + { + // TODO : There is no way to check visiblity setting result from web engine. + // Just call API and exception check. + view.SetProperty(Actor::Property::VISIBLE, false); + view.SetProperty(Actor::Property::VISIBLE, true); + dummy.SetProperty(Actor::Property::VISIBLE, false); + dummy.SetProperty(Actor::Property::VISIBLE, true); + dummy.Unparent(); + window.Hide(); + window.Add(dummy); + window.Show(); + window.Hide(); + window.Show(); + dummy.SetProperty(Actor::Property::VISIBLE, false); + view.SetProperty(Actor::Property::VISIBLE, false); + dummy.SetProperty(Actor::Property::VISIBLE, true); + view.SetProperty(Actor::Property::VISIBLE, true); + tet_result(TET_PASS); + } + catch(...) + { + // Should not throw exception + tet_result(TET_FAIL); + } + + END_TEST; +} \ No newline at end of file