static std::unique_ptr<Dali::WebEngineContextMenu> gContextMenuHiddenInstance = nullptr;
static int gHitTestCreatedCallbackCalled = 0;
static int gCookieManagerChangsWatchCallbackCalled = 0;
+static int gPlainTextReceivedCallbackCalled = 0;
struct CallbackFunctor
{
return true;
}
+static bool OnPlainTextReceived(const std::string& plainText)
+{
+ gPlainTextReceivedCallbackCalled++;
+ return true;
+}
+
static void OnPageLoadError(std::unique_ptr<Dali::WebEngineLoadError> error)
{
gPageLoadErrorCallbackCalled++;
WebView view = WebView::New();
DALI_TEST_CHECK( view );
- const bool kDefaultValue = true;
- const bool kTestValue = false;
+ const bool kDefaultValue = false;
+ const bool kTestValue = true;
// Check default value
bool output;
END_TEST;
}
+int UtcDaliWebViewGetPlainText(void)
+{
+ ToolkitTestApplication application;
+
+ WebView view = WebView::New();
+ DALI_TEST_CHECK(view);
+
+ view.LoadUrl(TEST_URL1);
+
+ view.GetPlainTextAsynchronously(&OnPlainTextReceived);
+ Test::EmitGlobalTimerSignal();
+ DALI_TEST_EQUALS(gPlainTextReceivedCallbackCalled, 1, TEST_LOCATION);
+
+ END_TEST;
+}
+