[GTK] Some WebKit2 GTK+ unit tests are failing in 32 bits bot
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Mar 2013 19:32:03 +0000 (19:32 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Mar 2013 19:32:03 +0000 (19:32 +0000)
commit821e0e131413efe5d2261b973b059de9deff3aec
tree82875bf0ddba80d6988c60410abcde61551b9dc2
parent4c3fb199eb00c3155268e99fec1ee4c691f3fefb
[GTK] Some WebKit2 GTK+ unit tests are failing in 32 bits bot
https://bugs.webkit.org/show_bug.cgi?id=111346

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2013-03-04
Reviewed by Martin Robinson.

The problem is the use of a temporary CString object in the macro
g_assert_cmpstr. It's a common mistake because we usually forget
that g_assert_cmpstr is not a function but a macro, that expands
to multiple lines. This patch adds a new macro ASSERT_CMP_CSTRING
with the same implementation that g_assert_cmpstr, but using
CStrings instead of const char*. It fixes all the cases where a
temporary CString was used in g_assert_cmpstr, and uses the new
macro also for the cases where we were caching the CString just
for g_assert_cmpstr.

* UIProcess/API/gtk/tests/TestDownloads.cpp:
(testDownloadRemoteFile):
* UIProcess/API/gtk/tests/TestInspectorServer.cpp:
(testInspectorServerPageList):
* UIProcess/API/gtk/tests/TestLoaderClient.cpp:
* UIProcess/API/gtk/tests/TestMain.h:
* UIProcess/API/gtk/tests/TestResources.cpp:
* UIProcess/API/gtk/tests/TestWebKitFaviconDatabase.cpp:
(testGetFaviconURI):
* UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
(assertThatUserAgentIsSentInHeaders):
(testWebKitSettingsUserAgent):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144652 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/gtk/tests/TestDownloads.cpp
Source/WebKit2/UIProcess/API/gtk/tests/TestInspectorServer.cpp
Source/WebKit2/UIProcess/API/gtk/tests/TestLoaderClient.cpp
Source/WebKit2/UIProcess/API/gtk/tests/TestMain.h
Source/WebKit2/UIProcess/API/gtk/tests/TestResources.cpp
Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFaviconDatabase.cpp
Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitSettings.cpp