/*
- * Copyright (c) 2022 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.
#include <dali.h>
#include <dali/devel-api/adaptor-framework/web-engine/web-engine-certificate.h>
#include <dali/devel-api/adaptor-framework/web-engine/web-engine-console-message.h>
-#include <dali/devel-api/adaptor-framework/web-engine/web-engine-context.h>
#include <dali/devel-api/adaptor-framework/web-engine/web-engine-context-menu-item.h>
#include <dali/devel-api/adaptor-framework/web-engine/web-engine-context-menu.h>
+#include <dali/devel-api/adaptor-framework/web-engine/web-engine-context.h>
#include <dali/devel-api/adaptor-framework/web-engine/web-engine-cookie-manager.h>
#include <dali/devel-api/adaptor-framework/web-engine/web-engine-form-repost-decision.h>
#include <dali/devel-api/adaptor-framework/web-engine/web-engine-frame.h>
{
gNewWindowCreatedCallbackCalled++;
WebView newView = WebView::New();
- outPlugin = newView.GetPlugin();
+ outPlugin = newView.GetPlugin();
}
static void OnUrlChanged(const std::string& url)
application.Render();
Test::EmitGlobalTimerSignal();
- result = view.LoadContents(html, html.length(), "html/text", "utf-8", basicUri);
+ result = view.LoadContents((const int8_t*)html.c_str(), html.length(), "html/text", "utf-8", basicUri);
DALI_TEST_CHECK(result);
END_TEST;
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