Bug 105866 - [GTK] TestInspectorServer unit test is timing out
Summary: [GTK] TestInspectorServer unit test is timing out
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2012-12-30 01:44 PST by Zan Dobersek
Modified: 2013-07-24 08:26 PDT (History)
5 users (show)

See Also:


Attachments
Patch (7.60 KB, patch)
2013-07-15 03:57 PDT, Anton Obzhirov
no flags Details | Formatted Diff | Diff
Patch (8.19 KB, patch)
2013-07-16 09:00 PDT, Anton Obzhirov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zan Dobersek 2012-12-30 01:44:45 PST
Both on release and debug builds. Will skip it.
Comment 1 Anton Obzhirov 2013-01-18 08:43:24 PST
Going check this one. Probably started to fail after GTK inspector server has been re-factored to Soup inspector server.
Comment 2 Anton Obzhirov 2013-01-21 10:49:37 PST
It does time out in debug mode - managed to reproduce it. Will debug tomorrow
Comment 3 Anton Obzhirov 2013-07-12 05:27:49 PDT
Well, found out the problem finally - webinspector resources are not installed in default folder. Going to fix it now.
Comment 4 Anton Obzhirov 2013-07-15 03:57:36 PDT
Created attachment 206654 [details]
Patch
Comment 5 WebKit Commit Bot 2013-07-15 03:58:19 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 6 Gustavo Noronha (kov) 2013-07-15 08:05:09 PDT
Comment on attachment 206654 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=206654&action=review

r- because we should move copying of files to the build system

> Source/WebKit2/UIProcess/API/gtk/tests/InspectorTestServer.cpp:48
> +    // Overwrite WEBKIT_INSPECTOR_SERVER_PATH variable to point to inspector resources folder.
> +    const gchar* inspectorResourcesPath = g_getenv("WEBKIT_INSPECTOR_PATH");    
> +    g_setenv("WEBKIT_INSPECTOR_SERVER_PATH", inspectorResourcesPath, TRUE);

It makes sense to have this variable being set here, but when you say overwrite, do you mean the variable is already set but set to the wrong path?

> Source/WebKit2/UIProcess/API/gtk/tests/InspectorTestServer.cpp:55
> +    // Copy inspectorPageIndex.html to inspector resources folder
> +    GOwnPtr<char> sourcePath(g_build_filename(WEBKIT_SRC_DIR, "Source", "WebKit2", "UIProcess", "InspectorServer", "front-end", "inspectorPageIndex.html", NULL));
> +    GRefPtr<GFile> source = adoptGRef(g_file_new_for_path(sourcePath.get()));
> +    GOwnPtr<char> destinationPath(g_build_filename(inspectorResourcesPath, "inspectorPageIndex.html", NULL));
> +    GRefPtr<GFile> destination = adoptGRef(g_file_new_for_path(destinationPath.get()));
> +    g_file_copy(source.get(), destination.get(), G_FILE_COPY_OVERWRITE, NULL, NULL, NULL, NULL); 

We should do this in the build system like we do for that other bits, instead.
Comment 7 Anton Obzhirov 2013-07-15 08:51:58 PDT
(In reply to comment #6)
> (From update of attachment 206654 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=206654&action=review
> 
> r- because we should move copying of files to the build system
> 
> > Source/WebKit2/UIProcess/API/gtk/tests/InspectorTestServer.cpp:48
> > +    // Overwrite WEBKIT_INSPECTOR_SERVER_PATH variable to point to inspector resources folder.
> > +    const gchar* inspectorResourcesPath = g_getenv("WEBKIT_INSPECTOR_PATH");    
> > +    g_setenv("WEBKIT_INSPECTOR_SERVER_PATH", inspectorResourcesPath, TRUE);
> 
> It makes sense to have this variable being set here, but when you say overwrite, do you mean the variable is already set but set to the wrong path?
No, it shouldn’t be set. But just in case if there is "leftover" after another test. It feels safer for me to overwrite it.
> 
> > Source/WebKit2/UIProcess/API/gtk/tests/InspectorTestServer.cpp:55
> > +    // Copy inspectorPageIndex.html to inspector resources folder
> > +    GOwnPtr<char> sourcePath(g_build_filename(WEBKIT_SRC_DIR, "Source", "WebKit2", "UIProcess", "InspectorServer", "front-end", "inspectorPageIndex.html", NULL));
> > +    GRefPtr<GFile> source = adoptGRef(g_file_new_for_path(sourcePath.get()));
> > +    GOwnPtr<char> destinationPath(g_build_filename(inspectorResourcesPath, "inspectorPageIndex.html", NULL));
> > +    GRefPtr<GFile> destination = adoptGRef(g_file_new_for_path(destinationPath.get()));
> > +    g_file_copy(source.get(), destination.get(), G_FILE_COPY_OVERWRITE, NULL, NULL, NULL, NULL); 
> 
> We should do this in the build system like we do for that other bits, instead.
Yep, I will update GNUmakefile.am for WebKit2 to copy the file.
Comment 8 Carlos Garcia Campos 2013-07-15 09:02:04 PDT
run-gtk-tests sets WEBKIT_INSPECTOR_PATH
Comment 9 Anton Obzhirov 2013-07-15 09:12:36 PDT
(In reply to comment #8)
> run-gtk-tests sets WEBKIT_INSPECTOR_PATH
Yes, and then I use it to set WEBKIT_INSPECTOR_SERVER_PATH inside the test. Or you mean I should set WEBKIT_INSPECTOR_SERVER_PATH in run-gtk-tests as well?
Comment 10 Carlos Garcia Campos 2013-07-15 09:18:01 PDT
(In reply to comment #9)
> (In reply to comment #8)
> > run-gtk-tests sets WEBKIT_INSPECTOR_PATH
> Yes, and then I use it to set WEBKIT_INSPECTOR_SERVER_PATH inside the test. Or you mean I should set WEBKIT_INSPECTOR_SERVER_PATH in run-gtk-tests as well?

Ah, SERVER_PATH, I see, sorry, I read too fast. I think it's fine to set it in the test then.
Comment 11 Anton Obzhirov 2013-07-16 09:00:59 PDT
Created attachment 206787 [details]
Patch
Comment 12 Gustavo Noronha (kov) 2013-07-24 07:50:10 PDT
Comment on attachment 206787 [details]
Patch

OK
Comment 13 WebKit Commit Bot 2013-07-24 08:26:11 PDT
Comment on attachment 206787 [details]
Patch

Clearing flags on attachment: 206787

Committed r153085: <http://trac.webkit.org/changeset/153085>
Comment 14 WebKit Commit Bot 2013-07-24 08:26:14 PDT
All reviewed patches have been landed.  Closing bug.