{
}
+ bool SetViewportMetaTag(bool enable) override
+ {
+ return true;
+ }
+
+ bool SetForceZoom(bool enable) override
+ {
+ return true;
+ }
+
+ bool IsZoomForced() const override
+ {
+ return true;
+ }
+
+ bool SetTextZoomEnabled(bool enable) override
+ {
+ return true;
+ }
+
+ bool IsTextZoomEnabled() const override
+ {
+ return true;
+ }
+
+ void SetExtraFeature(const std::string& feature, bool enable) override
+ {
+ }
+
+ bool IsExtraFeatureEnabled(const std::string& feature) const override
+ {
+ return true;
+ }
+
private:
int mockDefaultFontSize;
bool mockJavaScriptEnabled;
END_TEST;
}
+int UtcDaliWebSettingsSetViewportMetaTag(void)
+{
+ ToolkitTestApplication application;
+
+ WebView view = WebView::New();
+ DALI_TEST_CHECK( view );
+
+ Dali::Toolkit::WebSettings* settings = view.GetSettings();
+ DALI_TEST_CHECK( settings != 0 )
+
+ // Check the value is true or not
+ bool value = settings->SetViewportMetaTag(true);
+ DALI_TEST_CHECK( value );
+
+ END_TEST;
+}
+
+int UtcDaliWebSettingsSetForceZoom(void)
+{
+ ToolkitTestApplication application;
+
+ WebView view = WebView::New();
+ DALI_TEST_CHECK( view );
+
+ Dali::Toolkit::WebSettings* settings = view.GetSettings();
+ DALI_TEST_CHECK( settings != 0 )
+
+ // Check the value is true or not
+ bool value = settings->SetForceZoom(true);
+ DALI_TEST_CHECK( value );
+
+ value = settings->IsZoomForced();
+ DALI_TEST_CHECK( value );
+
+ END_TEST;
+}
+
+int UtcDaliWebSettingsSetTextZoomEnabled(void)
+{
+ ToolkitTestApplication application;
+
+ WebView view = WebView::New();
+ DALI_TEST_CHECK( view );
+
+ Dali::Toolkit::WebSettings* settings = view.GetSettings();
+ DALI_TEST_CHECK( settings != 0 )
+
+ // Check the value is true or not
+ bool value = settings->SetTextZoomEnabled(true);
+ DALI_TEST_CHECK( value );
+
+ value = settings->IsTextZoomEnabled();
+ DALI_TEST_CHECK( value );
+
+ END_TEST;
+}
+
+int UtcDaliWebSettingsSetExtraFeature(void)
+{
+ ToolkitTestApplication application;
+
+ WebView view = WebView::New();
+ DALI_TEST_CHECK( view );
+
+ Dali::Toolkit::WebSettings* settings = view.GetSettings();
+ DALI_TEST_CHECK( settings != 0 )
+
+ // Check the value is true or not
+ settings->SetExtraFeature("test", true);
+ bool value = settings->IsExtraFeatureEnabled("test");
+ DALI_TEST_CHECK( value );
+
+ END_TEST;
+}
+
mWebEngineSettings.SetDefaultTextEncodingName(defaultTextEncodingName);
}
+bool WebSettings::SetViewportMetaTag(bool enable)
+{
+ return mWebEngineSettings.SetViewportMetaTag(enable);
+}
+
+bool WebSettings::SetForceZoom(bool enable)
+{
+ return mWebEngineSettings.SetForceZoom(enable);
+}
+
+bool WebSettings::IsZoomForced() const
+{
+ return mWebEngineSettings.IsZoomForced();
+}
+
+bool WebSettings::SetTextZoomEnabled(bool enable)
+{
+ return mWebEngineSettings.SetTextZoomEnabled(enable);
+}
+
+bool WebSettings::IsTextZoomEnabled() const
+{
+ return mWebEngineSettings.IsTextZoomEnabled();
+}
+
+void WebSettings::SetExtraFeature(const std::string& feature, bool enable)
+{
+ mWebEngineSettings.SetExtraFeature(feature, enable);
+}
+
+bool WebSettings::IsExtraFeatureEnabled(const std::string& feature) const
+{
+ return mWebEngineSettings.IsExtraFeatureEnabled(feature);
+}
+
+
} // namespace Toolkit
} // namespace Dali
*/
void SetDefaultTextEncodingName(const std::string& defaultTextEncodingName);
+ /**
+ * @brief Enables/disables the viewport meta tag.
+ *
+ * By default, the viewport meta tag is enabled on mobile and wearable,
+ * but it is disabled on TV.
+ *
+ * @param[in] enable @c true to enable the viewport meta tag
+ * @c false to disable
+ *
+ * @return @c true on success or @c false on failure
+ */
+ bool SetViewportMetaTag(bool enable);
+
+ /**
+ * @brief Requests setting of force zoom.
+ *
+ * @param[in] enable to force zoom
+ *
+ * @return @c true on success or @c false on failure
+ */
+ bool SetForceZoom(bool enable);
+
+ /**
+ * @brief Returns the force zoom status.
+ *
+ * @return @c true if enable force zoom or @c false.
+ */
+ bool IsZoomForced() const;
+
+ /**
+ * @brief Requests setting use of text zoom.
+ *
+ * @param[in] enable to text zoom.
+ *
+ * @return @c true on success or @c false on failure
+ */
+ bool SetTextZoomEnabled(bool enable);
+
+ /**
+ * @brief Returns whether text zoom is enabled or not.
+ *
+ * @return @c true if enable text zoom or @c false.
+ */
+ bool IsTextZoomEnabled() const;
+
+ /**
+ * @brief Requests enables/disables to the specific extra feature
+ *
+ * @param[in] feature feature name
+ * @param[in] enable @c true to enable the specific extra feature
+ * @c false to disable
+ */
+ void SetExtraFeature(const std::string& feature, bool enable);
+
+ /**
+ * @brief Returns enable/disable to the specific extra feature
+ *
+ * @param[in] feature feature name
+ *
+ * @return @c true on enable or @c false on disable
+ */
+ bool IsExtraFeatureEnabled(const std::string& feature) const;
+
private:
Dali::WebEngineSettings& mWebEngineSettings;
};