2009-04-16 Zan Dobersek <zandobersek@gmail.com>
authorkov@webkit.org <kov@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Apr 2009 18:11:06 +0000 (18:11 +0000)
committerkov@webkit.org <kov@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Apr 2009 18:11:06 +0000 (18:11 +0000)
        Reviewed by Adam Roben.

        Compare test's response mime type and dump test as text properly.

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

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

WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp

index ed17d5b..190fa76 100644 (file)
@@ -1,3 +1,13 @@
+2009-04-16  Zan Dobersek  <zandobersek@gmail.com>
+
+        Reviewed by Adam Roben.
+
+        Compare test's response mime type and dump test as text properly.
+
+        * DumpRenderTree/gtk/DumpRenderTree.cpp:
+        (dump):
+
+
 2009-04-16  Adam Roben  <aroben@apple.com>
 
         Skip yet another JavaScriptCore test that sometimes fails on Windows
 2009-04-16  Adam Roben  <aroben@apple.com>
 
         Skip yet another JavaScriptCore test that sometimes fails on Windows
index 24e8d62..42175bf 100644 (file)
@@ -241,10 +241,15 @@ void dump()
         char* result = 0;
         gchar* responseMimeType = webkit_web_frame_get_response_mime_type(mainFrame);
 
         char* result = 0;
         gchar* responseMimeType = webkit_web_frame_get_response_mime_type(mainFrame);
 
-        dumpAsText = g_ascii_strcasecmp(responseMimeType, "text/plain");
+        dumpAsText = g_str_equal(responseMimeType, "text/plain");
         g_free(responseMimeType);
 
         g_free(responseMimeType);
 
-        gLayoutTestController->setDumpAsText(dumpAsText);
+        // Test can request controller to be dumped as text even
+        // while test's response mime type is not text/plain.
+        // Overriding this behavior with dumpAsText being false is a bad idea.
+        if (dumpAsText)
+            gLayoutTestController->setDumpAsText(dumpAsText);
+
         if (gLayoutTestController->dumpAsText())
             result = dumpFramesAsText(mainFrame);
         else
         if (gLayoutTestController->dumpAsText())
             result = dumpFramesAsText(mainFrame);
         else