[webkit-reviews] review granted: [Bug 24259] [Gtk] get the HTTP layout tests going : [Attachment 28134] dump according to the frame's mime type. Also enable the http tests

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Mar 1 07:13:06 PST 2009


Holger Freyther <zecke at selfish.org> has granted Jan Alonzo
<jmalonzo at gmail.com>'s request for review:
Bug 24259: [Gtk] get the HTTP layout tests going
https://bugs.webkit.org/show_bug.cgi?id=24259

Attachment 28134: dump according to the frame's mime type. Also enable the http
tests
https://bugs.webkit.org/attachment.cgi?id=28134&action=review

------- Additional Comments from Holger Freyther <zecke at selfish.org>
> Index: WebKit/WebKit/gtk/webkit/webkitprivate.h
> ===================================================================
> --- WebKit.orig/WebKit/gtk/webkit/webkitprivate.h	2009-03-01
15:56:10.000000000 +1100
> +++ WebKit/WebKit/gtk/webkit/webkitprivate.h	2009-03-01 15:57:53.000000000
+1100
> @@ -158,6 +158,10 @@
>      void
>      webkit_web_policy_decision_cancel (WebKitWebPolicyDecision* decision);
>  
> +    // FIXME: move this functionality into a 'WebKitWebDataSource' once
implemented
> +    WEBKIT_API gchar*
> +    webkit_web_frame_get_response_mime_type(WebKitWebFrame* frame);
> +
>      // FIXME: Move these to webkitwebframe.h once their API has been
discussed.
>  
>      WEBKIT_API GSList*
> Index: WebKit/WebKit/gtk/webkit/webkitwebframe.cpp
> ===================================================================
> --- WebKit.orig/WebKit/gtk/webkit/webkitwebframe.cpp	2009-03-01
15:58:07.000000000 +1100
> +++ WebKit/WebKit/gtk/webkit/webkitwebframe.cpp	2009-03-01
15:59:16.000000000 +1100
> @@ -5,6 +5,7 @@
>   * Copyright (C) 2008 Christian Dywan <christian at imendio.com>
>   * Copyright (C) 2008 Collabora Ltd.
>   * Copyright (C) 2008 Nuanti Ltd.
> + * Copyright (C) 2009 Jan Alonzo <jmalonzo at gmail.com>
>   *
>   * This library is free software; you can redistribute it and/or
>   * modify it under the terms of the GNU Library General Public
> @@ -31,6 +32,7 @@
>  
>  #include "AnimationController.h"
>  #include "CString.h"
> +#include "DocumentLoader.h"
>  #include "FrameLoader.h"
>  #include "FrameLoaderClientGtk.h"
>  #include "FrameTree.h"
> @@ -717,4 +719,12 @@
>      return controller->numberOfActiveAnimations();
>  }
>  
> +gchar* webkit_web_frame_get_response_mime_type(WebKitWebFrame* frame)
> +{
> +    Frame* coreFrame = core(frame);
> +    DocumentLoader* docLoader = coreFrame->loader()->documentLoader();
> +    String mimeType = docLoader->responseMIMEType();
> +    return g_strdup(mimeType.utf8().data());
> +}
> +
>  }
> Index: WebKit/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp
> ===================================================================
> --- WebKit.orig/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp    
2009-03-01 16:01:06.000000000 +1100
> +++ WebKit/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp	2009-03-01
16:02:35.000000000 +1100
> @@ -57,6 +57,7 @@
>  extern gchar* webkit_web_frame_get_inner_text(WebKitWebFrame* frame);
>  extern gchar* webkit_web_frame_dump_render_tree(WebKitWebFrame* frame);
>  extern void webkit_web_settings_add_extra_plugin_directory(WebKitWebView*
view, const gchar* directory);
> +extern gchar* webkit_web_frame_get_response_mime_type(WebKitWebFrame*
frame);
>  }
>  
>  volatile bool done;
> @@ -221,11 +222,13 @@
>  void dump()
>  {
>      invalidateAnyPreviousWaitToDumpWatchdog();

> -	   bool dumpAsText = gLayoutTestController->dumpAsText();
> -	   // FIXME: Also dump text resuls as text.
> +	   dumpAsText = g_ascii_strcasecmp(responseMimeType, "text/plain");

g_free(responseMImeType) missing here?

looks good so far. It might be wise to land this patch last though.


More information about the webkit-reviews mailing list