#include "dali-toolkit-test-utils/toolkit-timer.h"
#include <dali-toolkit/devel-api/controls/web-view/web-back-forward-list.h>
-#include <dali-toolkit/devel-api/controls/web-view/web-context.h>
-#include <dali-toolkit/devel-api/controls/web-view/web-cookie-manager.h>
#include <dali-toolkit/devel-api/controls/web-view/web-settings.h>
#include <dali-toolkit/devel-api/controls/web-view/web-view.h>
#include <dali-toolkit/public-api/controls/image-view/image-view.h>
#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>
#include <dali/devel-api/adaptor-framework/web-engine/web-engine-hit-test.h>
{
ToolkitTestApplication application;
- WebView view = WebView::New();
- DALI_TEST_CHECK(view);
-
- Dali::Toolkit::WebContext* context = view.GetContext();
- DALI_TEST_CHECK(context != 0);
+ Dali::WebEngineContext* context = WebView::GetContext();
+ DALI_TEST_CHECK(context != nullptr);
END_TEST;
}
{
ToolkitTestApplication application;
- WebView view = WebView::New();
- DALI_TEST_CHECK(view);
-
- Dali::Toolkit::WebCookieManager* cookieManager = view.GetCookieManager();
+ Dali::WebEngineCookieManager* cookieManager = WebView::GetCookieManager();
DALI_TEST_CHECK(cookieManager != 0);
END_TEST;
// test cases for web context.
-int UtcDaliWebContextGetSetCacheModel(void)
+int UtcDaliWebContextGetSetCacheModelEtc(void)
{
ToolkitTestApplication application;
- WebView view = WebView::New();
- DALI_TEST_CHECK(view);
-
- Dali::Toolkit::WebContext* context = view.GetContext();
+ Dali::WebEngineContext* context = WebView::GetContext();
DALI_TEST_CHECK(context != 0)
std::string kDefaultValue;
{
ToolkitTestApplication application;
- WebView view = WebView::New();
- DALI_TEST_CHECK(view);
-
- Dali::Toolkit::WebContext* context = view.GetContext();
+ Dali::WebEngineContext* context = WebView::GetContext();
DALI_TEST_CHECK(context != 0)
std::string kDefaultValue;
{
ToolkitTestApplication application;
+ Dali::WebEngineContext* context = WebView::GetContext();
+ DALI_TEST_CHECK(context != 0)
+
WebView view = WebView::New();
DALI_TEST_CHECK(view);
- Dali::Toolkit::WebContext* context = view.GetContext();
- DALI_TEST_CHECK(context != 0)
+ // Check if web view is found or not when plugin is null.
+ DALI_TEST_CHECK(!WebView::FindWebView(nullptr));
// load url.
context->RegisterRequestInterceptedCallback(&OnRequestIntercepted);
DALI_TEST_CHECK(gRequestInterceptorInstance->AddResponseBody((const int8_t*)"test", 4));
DALI_TEST_CHECK(gRequestInterceptorInstance->AddResponse("key:value", (const int8_t*)"test", 4));
DALI_TEST_CHECK(gRequestInterceptorInstance->WriteResponseChunk((const int8_t*)"test", 4));
+
+ DALI_TEST_CHECK(gRequestInterceptorInstance->GetWebEngine());
+ // Check if web view is found or not when plugin is not null.
+ DALI_TEST_CHECK(WebView::FindWebView(gRequestInterceptorInstance->GetWebEngine()));
+
std::string testUrl("http://test.html");
DALI_TEST_EQUALS(gRequestInterceptorInstance->GetUrl(), testUrl, TEST_LOCATION);
std::string testMethod("GET");
Dali::Property::Map resultHeaders = gRequestInterceptorInstance->GetHeaders();
DALI_TEST_EQUALS(resultHeaders.Count(), 2, TEST_LOCATION);
+ // Destroy web view.
+ view.Reset();
gRequestInterceptorInstance = nullptr;
END_TEST;
{
ToolkitTestApplication application;
- WebView view = WebView::New();
- DALI_TEST_CHECK(view);
-
- Dali::Toolkit::WebCookieManager* cookieManager = view.GetCookieManager();
+ Dali::WebEngineCookieManager* cookieManager = WebView::GetCookieManager();
DALI_TEST_CHECK(cookieManager != 0)
const std::string kDefaultValue;
{
ToolkitTestApplication application;
- WebView view = WebView::New();
- DALI_TEST_CHECK(view);
-
- Dali::Toolkit::WebCookieManager* cookieManager = view.GetCookieManager();
+ Dali::WebEngineCookieManager* cookieManager = WebView::GetCookieManager();
DALI_TEST_CHECK(cookieManager != 0)
cookieManager->ChangesWatch(&OnChangesWatch);