[Webkit-unassigned] [Bug 91351] [EFL][WK2] Add ewk_view_user_agent_set / ewk_view_user_agent_get API.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Aug 22 03:57:07 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=91351
--- Comment #35 from Kenneth Rohde Christiansen <kenneth at webkit.org> 2012-08-22 03:57:04 PST ---
(From update of attachment 159894)
View in context: https://bugs.webkit.org/attachment.cgi?id=159894&action=review
> Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:1396
> +Eina_Bool ewk_view_user_agent_set(Evas_Object* ewkView, const char* userAgent)
> +{
Qt WebKit1 had the more powerful api of userAgentForUrl(...) where you could return a different UA for certain URLs.
Maybe such a similar api (not callback based, as that would block) could be useful
> Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp:201
> +TEST_F(EWK2UnitTestBase, ewk_view_user_agent)
> +{
> + const char* defaultUserAgent = ewk_view_user_agent_get(webView());
> +
> + ASSERT_TRUE(ewk_view_user_agent_set(webView(), "Foo"));
> + ASSERT_STREQ(ewk_view_user_agent_get(webView()), "Foo");
> + // Set the default user agent.
> + ASSERT_TRUE(ewk_view_user_agent_set(webView(), 0));
> + ASSERT_STREQ(ewk_view_user_agent_get(webView()), defaultUserAgent);
> +}
Such an api is a bit useless if you don't have accessors to actually get the webkit versions. Do you? same with platform etc. Qt had something like qWebKitMinorVersion() etc
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list