[Webkit-unassigned] [Bug 72952] [GTK] Implement DownloadClient in WebKit2 GTK+ API
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Dec 26 05:49:33 PST 2011
https://bugs.webkit.org/show_bug.cgi?id=72952
--- Comment #19 from Carlos Garcia Campos <cgarcia at igalia.com> 2011-12-26 05:49:33 PST ---
(In reply to comment #15)
> > Source/WebKit2/UIProcess/API/gtk/tests/TestDownloads.cpp:185
> > + static const char* webkit1TestResoucesDir = "Source/WebKit/gtk/tests/resources";
> > + GRefPtr<GFile> file = adoptGRef(g_file_new_for_path(WEBKIT_EXEC_PATH));
> > + GRefPtr<GFile> parent = adoptGRef(g_file_get_parent(file.get()));
> > + file = g_file_get_parent(parent.get());
> > + GOwnPtr<char> rootDir(g_file_get_path(file.get()));
> > + GOwnPtr<char> resourcesDir(g_build_filename(rootDir.get(), webkit1TestResoucesDir, NULL));
> > + return resourcesDir.get();
>
> I think this is actually written as if things are built into WebKitBuild directly, instead of WebKitBuild/Release. :) Hard-coding the relative path to this file will fail on somebody's system. For instance, Xan even builds on the other end of symmlink. I think a safer approach here is to just write a file into the temporary directory you create for the test. For the test, give the URL to that file you've written.
WEBKIT_EXEC_PATH already contains Relese/Debug, so it should work. Maybe we should move test resources to another common dir, but I think it's useful to use real files, maybe not for download tests, but we will need it for mime handling tests.
--
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