[Webkit-unassigned] [Bug 84446] [GTK] Build and run TestWebKitAPI WebKit2 unit tests
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Apr 24 09:04:50 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=84446
--- Comment #7 from Martin Robinson <mrobinson at webkit.org> 2012-04-24 09:04:49 PST ---
(From update of attachment 138083)
View in context: https://bugs.webkit.org/attachment.cgi?id=138083&action=review
>>> Tools/TestWebKitAPI/gtk/PlatformUtilitiesGtk.cpp:65
>>> + return g_filename_to_utf8(value, -1, 0, &bytesWritten, 0);
>>
>> I find it a bit strange to use g_filename_to_utf8() here. Maybe some day we'll have env variables not dealing with file paths. Or maybe it's just this function that should be renamed :)
>
> I copied this from WTR
I think the reason this is so confusing is that it's doing two things (perhaps this is a problem with WebKitTestRunner too). The first thing it does is get a path from an environment variable. The second thing it does is convert the path from the system encoding to UTF-8. Perhaps this should be split into two functions.
const char* getEnvironmentVariable(const char* variableName);
String convertFilenameToString();
Then each call site could call both functions. The reasoning here is that for any environment variable that is not a path, converting from the system encoding is not necessarily the right thing to do.
Note that I use a String for the return value of convertFilenameToString, to avoid encoding ambiguity. You should have access to String in this code.
--
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