WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
146337
[EFL] Implement ewk_favicon_database_clear() API
https://bugs.webkit.org/show_bug.cgi?id=146337
Summary
[EFL] Implement ewk_favicon_database_clear() API
Hyungwook Lee
Reported
2015-06-25 23:32:16 PDT
We need to provide ewk_favicon_database_clear() API for make able to clear all favicon data.
Attachments
Patch
(4.19 KB, patch)
2015-06-26 02:48 PDT
,
Hyungwook Lee
no flags
Details
Formatted Diff
Diff
Patch
(4.19 KB, patch)
2015-06-29 23:51 PDT
,
Hyungwook Lee
no flags
Details
Formatted Diff
Diff
Patch
(6.58 KB, patch)
2015-06-30 04:30 PDT
,
Hyungwook Lee
no flags
Details
Formatted Diff
Diff
Patch
(5.92 KB, patch)
2015-06-30 05:31 PDT
,
Hyungwook Lee
no flags
Details
Formatted Diff
Diff
Patch
(5.91 KB, patch)
2015-06-30 09:12 PDT
,
Hyungwook Lee
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Hyungwook Lee
Comment 1
2015-06-26 02:48:38 PDT
Created
attachment 255627
[details]
Patch
Gyuyoung Kim
Comment 2
2015-06-29 19:36:04 PDT
Comment on
attachment 255627
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=255627&action=review
Patch looks good to me except for my comment.
> Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp:124 > + data.icon = ewk_favicon_database_icon_get(database, httpServer->getURLForPath("/").data(), evas_object_evas_get(webView()));
Though I'm not sure whether I fully understand ewk_favicon_database_clear() behavior, It seems that this test is not enough to test this new API. In order to test this API, I think we need to register some favicons for a couple of urls, then we call ewk_favicon_database_clear(). After calling it, we have to check each favicon for each URL to verify if all favicons are cleared successfully. It would be good if you add new test for the test as below, TEST_F(EWK2FaviconDatabaseTest, ewk_favicon_database_clear) { ... }
Gyuyoung Kim
Comment 3
2015-06-29 19:36:43 PDT
Comment on
attachment 255627
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=255627&action=review
> Source/WebKit2/UIProcess/API/efl/ewk_favicon_database.h:100 > + * @param database database object to clear all favicon data.
Do not add a period in @param line.
Hyungwook Lee
Comment 4
2015-06-29 23:49:28 PDT
Comment on
attachment 255627
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=255627&action=review
>> Source/WebKit2/UIProcess/API/efl/ewk_favicon_database.h:100 >> + * @param database database object to clear all favicon data. > > Do not add a period in @param line.
Done
>> Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp:124 >> + data.icon = ewk_favicon_database_icon_get(database, httpServer->getURLForPath("/").data(), evas_object_evas_get(webView())); > > Though I'm not sure whether I fully understand ewk_favicon_database_clear() behavior, It seems that this test is not enough to test this new API. In order to test this API, I think we need to register some favicons for a couple of urls, then we call ewk_favicon_database_clear(). After calling it, we have to check each favicon for each URL to verify if all favicons are cleared successfully. It would be good if you add new test for the test as below, > > TEST_F(EWK2FaviconDatabaseTest, ewk_favicon_database_clear) > { > ... > }
To test ewk_favicon_database_clear(), it required favicon data. ewk_favicon_database_async_icon_get test case already has favicon data that retrieved by ewk_favicon_database_icon_change_callback_add(). Hence I think ewk_favicon_database_async_icon_get() is good position to test ewk_favicon_database_clear() API.
Hyungwook Lee
Comment 5
2015-06-29 23:51:21 PDT
Created
attachment 255814
[details]
Patch
Gyuyoung Kim
Comment 6
2015-06-29 23:55:55 PDT
Comment on
attachment 255627
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=255627&action=review
>>> Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp:124 >>> + data.icon = ewk_favicon_database_icon_get(database, httpServer->getURLForPath("/").data(), evas_object_evas_get(webView())); >> >> Though I'm not sure whether I fully understand ewk_favicon_database_clear() behavior, It seems that this test is not enough to test this new API. In order to test this API, I think we need to register some favicons for a couple of urls, then we call ewk_favicon_database_clear(). After calling it, we have to check each favicon for each URL to verify if all favicons are cleared successfully. It would be good if you add new test for the test as below, >> >> TEST_F(EWK2FaviconDatabaseTest, ewk_favicon_database_clear) >> { >> ... >> } > > To test ewk_favicon_database_clear(), it required favicon data. > ewk_favicon_database_async_icon_get test case already has favicon data that retrieved by ewk_favicon_database_icon_change_callback_add(). > Hence I think ewk_favicon_database_async_icon_get() is good position to test ewk_favicon_database_clear() API.
Now I understand, ewk_favicon_database_clear() can remove all favicon datas, right ? So I meant that we have to test if ewk_favicon_database_clear() removes all favicon datas. However this test seems to test only one favicon. If not, I agree to land current implementation.
Hyungwook Lee
Comment 7
2015-06-30 04:30:25 PDT
Created
attachment 255819
[details]
Patch
Hyungwook Lee
Comment 8
2015-06-30 04:41:49 PDT
(In reply to
comment #6
)
> Comment on
attachment 255627
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=255627&action=review
> > >>> Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp:124 > >>> + data.icon = ewk_favicon_database_icon_get(database, httpServer->getURLForPath("/").data(), evas_object_evas_get(webView())); > >> > >> Though I'm not sure whether I fully understand ewk_favicon_database_clear() behavior, It seems that this test is not enough to test this new API. In order to test this API, I think we need to register some favicons for a couple of urls, then we call ewk_favicon_database_clear(). After calling it, we have to check each favicon for each URL to verify if all favicons are cleared successfully. It would be good if you add new test for the test as below, > >> > >> TEST_F(EWK2FaviconDatabaseTest, ewk_favicon_database_clear) > >> { > >> ... > >> } > > > > To test ewk_favicon_database_clear(), it required favicon data. > > ewk_favicon_database_async_icon_get test case already has favicon data that retrieved by ewk_favicon_database_icon_change_callback_add(). > > Hence I think ewk_favicon_database_async_icon_get() is good position to test ewk_favicon_database_clear() API. > > Now I understand, ewk_favicon_database_clear() can remove all favicon datas, > right ? So I meant that we have to test if ewk_favicon_database_clear() > removes all favicon datas. However this test seems to test only one favicon. > If not, I agree to land current implementation.
I've update the test case to support multiple favicon loading.
Gyuyoung Kim
Comment 9
2015-06-30 04:54:12 PDT
Comment on
attachment 255819
[details]
Patch Patch looks better ! However I would like to recommend to add new test for the ewk_favicon_database_clear() because I think TEST_F(EWK2FaviconDatabaseTest, ewk_favicon_database_async_icon_get) is not a proper place to test all icons removals. This test is just to test if we can get a favicon correctly. Thus how about adding a new test instead of modifying the test as below ? TEST_F(EWK2FaviconDatabaseTest, ewk_favicon_database_clear)
Hyungwook Lee
Comment 10
2015-06-30 05:31:38 PDT
Created
attachment 255820
[details]
Patch
Hyungwook Lee
Comment 11
2015-06-30 05:32:13 PDT
(In reply to
comment #9
)
> Comment on
attachment 255819
[details]
> Patch > > Patch looks better ! However I would like to recommend to add new test for > the ewk_favicon_database_clear() because I think > TEST_F(EWK2FaviconDatabaseTest, ewk_favicon_database_async_icon_get) is not > a proper place to test all icons removals. This test is just to test if we > can get a favicon correctly. Thus how about adding a new test instead of > modifying the test as below ? > > TEST_F(EWK2FaviconDatabaseTest, ewk_favicon_database_clear)
Done
Gyuyoung Kim
Comment 12
2015-06-30 08:25:13 PDT
Comment on
attachment 255820
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=255820&action=review
LGTM.
> Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp:147 > + // Runs another httpServer for loading another favicon
Missing a period at the end of line.
Hyungwook Lee
Comment 13
2015-06-30 09:12:11 PDT
Created
attachment 255821
[details]
Patch
WebKit Commit Bot
Comment 14
2015-06-30 17:47:51 PDT
Comment on
attachment 255821
[details]
Patch Clearing flags on attachment: 255821 Committed
r186153
: <
http://trac.webkit.org/changeset/186153
>
WebKit Commit Bot
Comment 15
2015-06-30 17:47:55 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug