2008-09-30 Simon Fraser <simon.fraser@apple.com>
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Oct 2008 00:43:19 +0000 (00:43 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Oct 2008 00:43:19 +0000 (00:43 +0000)
        Reviewed by Dan Bernstein

        Don't run pixel comparison for text-only tests.
        https://bugs.webkit.org/show_bug.cgi?id=21124

        * DumpRenderTree/mac/DumpRenderTree.mm:
        (dump):
        * Scripts/run-webkit-tests:

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

WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm
WebKitTools/Scripts/run-webkit-tests

index fedb678..51575ba 100644 (file)
@@ -1,3 +1,14 @@
+2008-09-30  Simon Fraser  <simon.fraser@apple.com>
+
+        Reviewed by Dan Bernstein
+
+        Don't run pixel comparison for text-only tests.
+        https://bugs.webkit.org/show_bug.cgi?id=21124
+        
+        * DumpRenderTree/mac/DumpRenderTree.mm:
+        (dump):
+        * Scripts/run-webkit-tests:
+
 2008-09-29  Thiago Macieira  <thiago.macieira@nokia.com>
 
         Reviewed by Simon.
index 9e9f239..7a4babb 100644 (file)
@@ -867,12 +867,12 @@ void dump()
 {
     invalidateAnyPreviousWaitToDumpWatchdog();
 
+    bool dumpAsText = gLayoutTestController->dumpAsText();
     if (dumpTree) {
         NSString *resultString = nil;
         NSData *resultData = nil;
         NSString *resultMimeType = @"text/plain";
 
-        bool dumpAsText = gLayoutTestController->dumpAsText();
         dumpAsText |= [[[mainFrame dataSource] _responseMIMEType] isEqualToString:@"text/plain"];
         gLayoutTestController->setDumpAsText(dumpAsText);
         if (gLayoutTestController->dumpAsText()) {
@@ -915,7 +915,7 @@ void dump()
         }            
     }
     
-    if (dumpPixels)
+    if (dumpAllPixels || (dumpPixels && !dumpAsText))
         dumpWebViewAsPixelsAndCompareWithExpected([currentTest UTF8String], dumpAllPixels);
 
     fflush(stdout);
index 8a05e8d..345f8ca 100755 (executable)
@@ -627,7 +627,7 @@ for my $test (@tests) {
     my $diffPercentage = "";
     my $diffResult = "passed";
     
-    if ($pixelTests) {
+    if ($pixelTests && !$isText) {
         my $expectedPixelDir = expectedDirectoryForTest($base, $isText, "png");
 
         my $actualHash = "";