Title: [130677] trunk/Source/WebKit2
- Revision
- 130677
- Author
- [email protected]
- Date
- 2012-10-08 13:22:42 -0700 (Mon, 08 Oct 2012)
Log Message
[EFL][WK2] EWK2UnitTestBase.ewk_cookie_manager_accept_policy unit test is failing
https://bugs.webkit.org/show_bug.cgi?id=98663
Patch by Christophe Dumez <[email protected]> on 2012-10-08
Reviewed by Laszlo Gombos.
EWK2UnitTestBase.ewk_cookie_manager_accept_policy unit test was
failing because the elements of a list were checked in a given
order but the list was not sorted beforehand.
* UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp:
(sortHostNames):
(TEST_F):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (130676 => 130677)
--- trunk/Source/WebKit2/ChangeLog 2012-10-08 20:10:22 UTC (rev 130676)
+++ trunk/Source/WebKit2/ChangeLog 2012-10-08 20:22:42 UTC (rev 130677)
@@ -1,3 +1,18 @@
+2012-10-08 Christophe Dumez <[email protected]>
+
+ [EFL][WK2] EWK2UnitTestBase.ewk_cookie_manager_accept_policy unit test is failing
+ https://bugs.webkit.org/show_bug.cgi?id=98663
+
+ Reviewed by Laszlo Gombos.
+
+ EWK2UnitTestBase.ewk_cookie_manager_accept_policy unit test was
+ failing because the elements of a list were checked in a given
+ order but the list was not sorted beforehand.
+
+ * UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp:
+ (sortHostNames):
+ (TEST_F):
+
2012-10-08 Jinwoo Song <[email protected]>
[EFL][WK2] Avoid useless converting to WKPage
Modified: trunk/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp (130676 => 130677)
--- trunk/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp 2012-10-08 20:10:22 UTC (rev 130676)
+++ trunk/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp 2012-10-08 20:22:42 UTC (rev 130677)
@@ -116,6 +116,11 @@
return count;
}
+static int compareHostNames(const void* hostName1, const void* hostName2)
+{
+ return strcmp(static_cast<const char*>(hostName1), static_cast<const char*>(hostName2));
+}
+
TEST_F(EWK2UnitTestBase, ewk_cookie_manager_accept_policy)
{
OwnPtr<EWK2UnitTestServer> httpServer = adoptPtr(new EWK2UnitTestServer);
@@ -141,6 +146,7 @@
hostnames = getHostnamesWithCookies(cookieManager);
ASSERT_EQ(2, eina_list_count(hostnames));
+ hostnames = eina_list_sort(hostnames, eina_list_count(hostnames), compareHostNames);
ASSERT_STREQ(FIRST_PARTY_DOMAIN, static_cast<char*>(eina_list_nth(hostnames, 0)));
ASSERT_STREQ(THIRD_PARTY_DOMAIN, static_cast<char*>(eina_list_nth(hostnames, 1)));
freeHostNames(hostnames);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes