summaryrefslogtreecommitdiffstats
path: root/WebKit/gtk/tests/testwebview.c
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/gtk/tests/testwebview.c')
-rw-r--r--WebKit/gtk/tests/testwebview.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/WebKit/gtk/tests/testwebview.c b/WebKit/gtk/tests/testwebview.c
index c028a36..34b6867 100644
--- a/WebKit/gtk/tests/testwebview.c
+++ b/WebKit/gtk/tests/testwebview.c
@@ -234,11 +234,12 @@ int main(int argc, char** argv)
/* Hopefully make test independent of the path it's called from. */
while (!g_file_test ("WebKit/gtk/tests/resources/test.html", G_FILE_TEST_EXISTS)) {
- char path_name[PATH_MAX];
+ gchar *path_name;
g_chdir("..");
- g_assert(!g_str_equal(getcwd(path_name, PATH_MAX), "/"));
+ g_assert(!g_str_equal((path_name = g_get_current_dir()), "/"));
+ g_free(path_name);
}
g_chdir("WebKit/gtk/tests/resources/");