2009-03-01 Jan Michael Alonzo <jmalonzo@webkit.org>
authorjmalonzo@webkit.org <jmalonzo@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 1 Mar 2009 19:22:13 +0000 (19:22 +0000)
committerjmalonzo@webkit.org <jmalonzo@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 1 Mar 2009 19:22:13 +0000 (19:22 +0000)
        Reviewed by Holger Freyther.

         [Gtk] get the HTTP layout tests going
         https://bugs.webkit.org/show_bug.cgi?id=24259

        Added API to get the response mime type from a frame. We need this
        so we can decide if we need to dump the frame as text or its
        render tree

        * webkit/webkitprivate.h:
        * webkit/webkitwebframe.cpp:

2009-03-01  Jan Michael Alonzo  <jmalonzo@webkit.org>

        Reviewed by Holger Freyther.

         [Gtk] get the HTTP layout tests going
         https://bugs.webkit.org/show_bug.cgi?id=24259

        Determine the frame's response and decide whether to dump as text
        or the render tree

        * DumpRenderTree/gtk/DumpRenderTree.cpp:
        (dump):

2009-02-28  Jan Michael Alonzo  <jmalonzo@webkit.org>

        Reviewed by Holger Freyther.

        [Gtk] get the HTTP layout tests going
        https://bugs.webkit.org/show_bug.cgi?id=24259

        Enable http tests, excluding tests/folders that fail or untested

        * platform/gtk/Skipped:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@41341 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/gtk/Skipped
WebKit/gtk/ChangeLog
WebKit/gtk/webkit/webkitprivate.h
WebKit/gtk/webkit/webkitwebframe.cpp
WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp

index 50dcb74342bc9bac7e0bbf63e21913437701e6e5..979b4525350bd412cc48b82de60ad6ebd21bdb06 100644 (file)
@@ -1,3 +1,14 @@
+2009-02-28  Jan Michael Alonzo  <jmalonzo@webkit.org>
+
+        Reviewed by Holger Freyther.
+
+        [Gtk] get the HTTP layout tests going
+        https://bugs.webkit.org/show_bug.cgi?id=24259
+
+        Enable http tests, excluding tests/folders that fail or untested
+
+        * platform/gtk/Skipped:
+
 2009-03-01  Dan Bernstein  <mitz@apple.com>
 
         Reviewed by Darin Adler.
index dac5a135878856a5645398b6180fcb9b9f793efd..c1020ec6365730aa4041ac01128c22a7415470db 100644 (file)
@@ -2151,7 +2151,6 @@ css2.1
 css3
 editing
 geolocation
-http
 media
 platform
 printing
@@ -2216,3 +2215,72 @@ plugins/netscape-dom-access.html
 # Tests in transitions/ directory
 # Tests generating new results
 transitions/transition-drt-api.html
+
+# HTTP tests
+# Tests in http/ directory
+
+# blacklist untested/failing folders
+http/tests/appcache
+http/tests/history
+http/tests/media
+http/tests/misc
+http/tests/navigation
+http/tests/plugins
+http/tests/security
+http/tests/ssl
+http/tests/webarchive
+http/tests/wml
+
+# tests that failed
+http/tests/incremental/slow-utf8-text.pl
+http/tests/loading/bad-scheme-subframe.html
+http/tests/loading/bad-server-subframe.html
+http/tests/loading/basic.html
+http/tests/loading/empty-subframe.html
+http/tests/loading/gmail-assert-on-load.html
+http/tests/loading/location-hash-reload-cycle.html
+http/tests/loading/onload-vs-immediate-refresh.pl
+http/tests/loading/slow-parsing-subframe.html
+http/tests/loading/text-content-type-with-binary-extension.html
+http/tests/xmlhttprequest/abort-should-cancel-load.html
+http/tests/xmlhttprequest/basic-auth.html
+http/tests/xmlhttprequest/close-window.html
+http/tests/xmlhttprequest/default-content-type-dashboard.html
+http/tests/xmlhttprequest/frame-load-cancelled-abort.html
+http/tests/xmlhttprequest/methods-async.html
+http/tests/xmlhttprequest/methods-lower-case.html
+http/tests/xmlhttprequest/methods.html
+http/tests/xmlhttprequest/svg-created-by-xhr-disallowed-in-dashboard.html
+http/tests/xmlhttprequest/upload-onload-event.html
+http/tests/xmlhttprequest/upload-onprogress-event.html
+http/tests/xmlhttprequest/upload-progress-events.html
+http/tests/xmlhttprequest/xhr-onunload.html
+
+# Tests that timed out
+http/tests/xmlhttprequest/XMLHttpRequestException.html
+http/tests/xmlhttprequest/connection-error-sync.html
+
+# Crashing tests
+http/tests/xmlhttprequest/web-apps/002.html
+http/tests/xmlhttprequest/zero-length-response.html
+
+# Tests that had stderr output
+http/tests/incremental/frame-focus-before-load.html
+http/tests/incremental/pause-in-script-element.pl
+http/tests/multipart/invalid-image-data-standalone.html
+http/tests/multipart/invalid-image-data.html
+http/tests/xmlhttprequest/abort-crash.html
+http/tests/xmlhttprequest/abort-should-cancel-load.html
+http/tests/xmlhttprequest/basic-auth.html
+http/tests/xmlhttprequest/close-window.html
+http/tests/xmlhttprequest/cookies.html
+http/tests/xmlhttprequest/default-content-type-dashboard.html
+http/tests/xmlhttprequest/web-apps/003.html
+http/tests/xmlhttprequest/web-apps/004.html
+
+# Tests that had no expected results (probably new):
+http/tests/loading/simple-subframe.html
+http/tests/local/file-url-sent-as-referer.html
+http/tests/multipart/invalid-image-data-standalone.html
+http/tests/multipart/invalid-image-data.html
+http/tests/uri/css-href.php
index e6890b5e6381bef456e8f28dd2e56610fec3aebf..65823c1fd2a85c329e205f9d3e3e81b64304921a 100644 (file)
@@ -1,3 +1,17 @@
+2009-03-01  Jan Michael Alonzo  <jmalonzo@webkit.org>
+
+        Reviewed by Holger Freyther.
+
+         [Gtk] get the HTTP layout tests going
+         https://bugs.webkit.org/show_bug.cgi?id=24259
+
+        Added API to get the response mime type from a frame. We need this
+        so we can decide if we need to dump the frame as text or its
+        render tree
+
+        * webkit/webkitprivate.h:
+        * webkit/webkitwebframe.cpp:
+
 2009-03-01  Jan Michael Alonzo  <jmalonzo@webkit.org>
 
         Reviewed by Holger Freyther.
index 3fdd4119bb269745c98cba171faa5229ecf364b1..ce4726dbc016e80c293a44c62f3084b8c172a1bd 100644 (file)
@@ -159,6 +159,10 @@ extern "C" {
     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 7b5def577ecccebfcf59e08145319fcbce97eb40..e2b10b6d4922276c6ae323cfd823dfd8470b2f6a 100644 (file)
@@ -5,6 +5,7 @@
  * Copyright (C) 2008 Christian Dywan <christian@imendio.com>
  * Copyright (C) 2008 Collabora Ltd.
  * Copyright (C) 2008 Nuanti Ltd.
+ * Copyright (C) 2009 Jan Alonzo <jmalonzo@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 @@ unsigned int webkit_web_frame_number_of_active_animations(WebKitWebFrame* frame)
     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 58de9f59f1fddde730f75f018eeee145bf7220e0..3b3345bb089be51294bb2a853581a4e0538f30c2 100644 (file)
@@ -1,3 +1,16 @@
+2009-03-01  Jan Michael Alonzo  <jmalonzo@webkit.org>
+
+        Reviewed by Holger Freyther.
+
+         [Gtk] get the HTTP layout tests going
+         https://bugs.webkit.org/show_bug.cgi?id=24259
+
+        Determine the frame's response and decide whether to dump as text
+        or the render tree
+
+        * DumpRenderTree/gtk/DumpRenderTree.cpp:
+        (dump):
+
 2009-03-01  Jan Michael Alonzo  <jmalonzo@webkit.org>
 
         Reviewed by Holger Freyther.
index f9bec96efa9956c46031486ce405dfae44b39c28..3feb4a9d7383c712a7ac3e2b0a922be2bcc82eb9 100644 (file)
@@ -57,6 +57,7 @@ extern GSList* webkit_web_frame_get_children(WebKitWebFrame* frame);
 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;
@@ -222,11 +223,15 @@ static void invalidateAnyPreviousWaitToDumpWatchdog()
 void dump()
 {
     invalidateAnyPreviousWaitToDumpWatchdog();
+
+    bool dumpAsText = gLayoutTestController->dumpAsText();
     if (dumpTree) {
         char* result = 0;
+        gchar* responseMimeType = webkit_web_frame_get_response_mime_type(mainFrame);
+
+        dumpAsText = g_ascii_strcasecmp(responseMimeType, "text/plain");
+        g_free(responseMimeType);
 
-        bool dumpAsText = gLayoutTestController->dumpAsText();
-        // FIXME: Also dump text resuls as text.
         gLayoutTestController->setDumpAsText(dumpAsText);
         if (gLayoutTestController->dumpAsText())
             result = dumpFramesAsText(mainFrame);