Bug 25405

Summary: [GTK] layout tests cleanup
Product: WebKit Reporter: Gustavo Noronha (kov) <gustavo>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: xan.lopez
Priority: P2 Keywords: Gtk
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Attachments:
Description Flags
fix timeout in post-goback-same-url.html
none
fix timeout in post-goback-same-url.html
none
Use SoupURI to resolve URLs aroben: review+

Description Gustavo Noronha (kov) 2009-04-25 21:09:40 PDT
I intend to do some work to cleanup/fix issues with current failing tests in the GTK+ port. I'm opening this bug to track progress, instead of opening one for each thing.
Comment 1 Gustavo Noronha (kov) 2009-04-25 21:12:20 PDT
Created attachment 29797 [details]
fix timeout in post-goback-same-url.html

 WebKitTools/ChangeLog                              |   10 ++++++++++
 .../DumpRenderTree/gtk/LayoutTestControllerGtk.cpp |   15 +++++++++++++--
 2 files changed, 23 insertions(+), 2 deletions(-)
Comment 2 Gustavo Noronha (kov) 2009-04-25 21:14:22 PDT
Comment on attachment 29797 [details]
fix timeout in post-goback-same-url.html

This fixes LayoutTestController::queueLoad to "resolve" relative URLs. It's a pitty it seems we have no sane API to do such things in glib, so I did it using some string handling. It fixes the timeout for that test.
Comment 3 Gustavo Noronha (kov) 2009-04-26 11:03:57 PDT
Created attachment 29804 [details]
fix timeout in post-goback-same-url.html

 WebKitTools/ChangeLog                              |   10 ++++++++++
 .../DumpRenderTree/gtk/LayoutTestControllerGtk.cpp |   15 +++++++++++++--
 2 files changed, 23 insertions(+), 2 deletions(-)
Comment 4 Gustavo Noronha (kov) 2009-04-26 11:05:32 PDT
Comment on attachment 29804 [details]
fix timeout in post-goback-same-url.html

Fixes the way we figure out the size of the string to init the GString, as Xan pointed out the other method would go wrong with utf8 file names.
Comment 5 Xan Lopez 2009-04-26 11:07:01 PDT
Comment on attachment 29804 [details]
fix timeout in post-goback-same-url.html

Looks good.
Comment 6 Gustavo Noronha (kov) 2009-04-26 21:02:04 PDT
I actually found that my method has problems with other tests that had escaped my tests, unfortunately. I cooked a new patch using SoupURI, which thankfully has a way of creating SoupURIs with base/relative.
Comment 7 Gustavo Noronha (kov) 2009-04-26 21:02:34 PDT
Created attachment 29811 [details]
Use SoupURI to resolve URLs

 WebKitTools/ChangeLog                              |   10 ++++++++++
 .../DumpRenderTree/gtk/LayoutTestControllerGtk.cpp |   18 ++++++++++--------
 2 files changed, 20 insertions(+), 8 deletions(-)
Comment 8 Adam Roben (:aroben) 2009-04-27 06:37:17 PDT
Comment on attachment 29811 [details]
Use SoupURI to resolve URLs

Do we need any error-checking in queueLoad?

r=me
Comment 9 Gustavo Noronha (kov) 2009-04-27 07:55:39 PDT
Landed as r42890, with a null-check for absoluteURI.