Changeset 18901 in webkit


Ignore:
Timestamp:
Jan 17, 2007 1:14:51 AM (17 years ago)
Author:
lars
Message:

Add a message handler to DumpRenderTree that will
suppress all debug output coming from qDebug() statements.
Like this we can get rid of all the noise coming
from the notImplemented() macro when running the
layout tests. You can get it back by adding -v to
DumpRenderTree's command line.

Changed run-webkit-tests slightly, so we by default
don't fail anymore when our output differs from what
is generated on the Mac. Added a --strict option, so
that we can still see this cases and fix them one by one.

change all notImplemented() macros to use qDebug
instead of fprintf(stder, ...)

Location:
trunk
Files:
1 deleted
25 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r18900 r18901  
     12007-01-17  Lars Knoll <lars@trolltech.com>
     2
     3        Reviewed by Zack
     4
     5        change all notImplemented() macros to use qDebug
     6        instead of fprintf(stder, ...)
     7
     8        * loader/qt/DocumentLoaderQt.cpp:
     9        * loader/qt/FrameLoaderQt.cpp:
     10        * page/qt/EventHandlerQt.cpp:
     11        * page/qt/FrameQt.cpp:
     12        * platform/graphics/qt/GraphicsContextQt.cpp:
     13        * platform/graphics/qt/IconQt.cpp:
     14        * platform/network/qt/ResourceHandleManagerQt.cpp:
     15        * platform/network/qt/ResourceHandleQt.cpp:
     16        * platform/qt/CursorQt.cpp:
     17        * platform/qt/FileChooserQt.cpp:
     18        * platform/qt/MimeTypeRegistryQt.cpp:
     19        * platform/qt/PageQt.cpp: Removed.
     20        * platform/qt/PopupMenuQt.cpp:
     21        * platform/qt/ScrollViewQt.cpp:
     22        * platform/qt/TemporaryLinkStubs.cpp:
     23        * platform/qt/TextBoundaries.cpp:
     24        * platform/qt/WidgetQt.cpp:
     25
    1262007-01-16  Brady Eidson  <beidson@apple.com>
    227
  • trunk/WebCore/loader/qt/DocumentLoaderQt.cpp

    r18757 r18901  
    4040#include <QDateTime>
    4141
    42 #define notImplemented() do { fprintf(stderr, "FIXME: UNIMPLEMENTED: %s:%d\n", __FILE__, __LINE__); } while(0)
     42#define notImplemented() qDebug("FIXME: UNIMPLEMENTED: %s:%d (%s)", __FILE__, __LINE__, __FUNCTION__)
    4343
    4444namespace WebCore {
  • trunk/WebCore/loader/qt/FrameLoaderQt.cpp

    r18805 r18901  
    7676#include <qdebug.h>
    7777
    78 #define notImplemented() do { fprintf(stderr, "FIXME: UNIMPLEMENTED: %s:%d (%s)\n", __FILE__, __LINE__, __FUNCTION__); } while(0)
     78#define notImplemented() qDebug("FIXME: UNIMPLEMENTED: %s:%d (%s)", __FILE__, __LINE__, __FUNCTION__)
    7979
    8080namespace WebCore {
  • trunk/WebCore/page/qt/EventHandlerQt.cpp

    r18142 r18901  
    5050using namespace EventNames;
    5151
    52 #define notImplemented() do { fprintf(stderr, "FIXME: UNIMPLEMENTED: %s:%d (%s)\n", \
    53            __FILE__, __LINE__, __FUNCTION__); } while(0)
     52#define notImplemented() qDebug("FIXME: UNIMPLEMENTED: %s:%d (%s)", __FILE__, __LINE__, __FUNCTION__)
    5453
    5554static bool isKeyboardOptionTab(KeyboardEvent* event)
  • trunk/WebCore/page/qt/FrameQt.cpp

    r18742 r18901  
    6969using namespace KJS;
    7070
    71 #define notImplemented() do { fprintf(stderr, "FIXME: UNIMPLEMENTED: %s:%d (%s)\n", \
    72            __FILE__, __LINE__, __FUNCTION__); } while(0)
     71#define notImplemented() qDebug("FIXME: UNIMPLEMENTED: %s:%d (%s)", __FILE__, __LINE__, __FUNCTION__)
    7372
    7473namespace WebCore {
  • trunk/WebCore/platform/graphics/qt/GraphicsContextQt.cpp

    r18862 r18901  
    5050#endif
    5151
    52 #define notImplemented() do { fprintf(stderr, "FIXME: UNIMPLEMENTED: %s:%d\n", __FILE__, __LINE__); } while(0)
     52#define notImplemented() qDebug("FIXME: UNIMPLEMENTED: %s:%d (%s)", __FILE__, __LINE__, __FUNCTION__)
    5353
    5454namespace WebCore {
  • trunk/WebCore/platform/graphics/qt/IconQt.cpp

    r17727 r18901  
    2020
    2121#include "config.h"
    22 
    23 #include <stdio.h>
    2422#include "Icon.h"
    2523
    26 #define notImplemented() do { fprintf(stderr, "FIXME: UNIMPLEMENTED: %s:%d\n", __FILE__, __LINE__); } while(0)
     24#include <qglobal.h>
     25
     26#define notImplemented() qDebug("FIXME: UNIMPLEMENTED: %s:%d (%s)", __FILE__, __LINE__, __FUNCTION__)
    2727
    2828namespace WebCore {
  • trunk/WebCore/platform/network/qt/ResourceHandleManagerQt.cpp

    r18886 r18901  
    4545#include <qdebug.h>
    4646
    47 #define notImplemented() do { fprintf(stderr, "FIXME: UNIMPLEMENTED: %s:%d (%s)\n", \
    48            __FILE__, __LINE__, __FUNCTION__); } while(0)
     47#define notImplemented() qDebug("FIXME: UNIMPLEMENTED: %s:%d (%s)", __FILE__, __LINE__, __FUNCTION__)
    4948
    5049#if 0
  • trunk/WebCore/platform/network/qt/ResourceHandleQt.cpp

    r18744 r18901  
    4141#include "ResourceHandleInternal.h"
    4242
    43 #define notImplemented() do { fprintf(stderr, "FIXME: UNIMPLEMENTED: %s:%d (%s)\n", \
    44            __FILE__, __LINE__, __FUNCTION__); } while(0)
     43#define notImplemented() qDebug("FIXME: UNIMPLEMENTED: %s:%d (%s)", __FILE__, __LINE__, __FUNCTION__)
    4544
    4645namespace WebCore {
  • trunk/WebCore/platform/qt/CursorQt.cpp

    r18270 r18901  
    3636#include <stdlib.h>
    3737
    38 #define notImplemented() do { fprintf(stderr, "FIXME: UNIMPLEMENTED: %s:%d\n", __FILE__, __LINE__); } while(0)
     38#define notImplemented() qDebug("FIXME: UNIMPLEMENTED: %s:%d (%s)", __FILE__, __LINE__, __FUNCTION__)
    3939
    4040namespace WebCore {
  • trunk/WebCore/platform/qt/FileChooserQt.cpp

    r17034 r18901  
    2222#include "FileChooser.h"
    2323
    24 #define notImplemented() do { fprintf(stderr, "FIXME: UNIMPLEMENTED: %s:%d\n", __FILE__, __LINE__); } while(0)
     24#define notImplemented() qDebug("FIXME: UNIMPLEMENTED: %s:%d (%s)", __FILE__, __LINE__, __FUNCTION__)
    2525
    2626namespace WebCore {
  • trunk/WebCore/platform/qt/MimeTypeRegistryQt.cpp

    r17703 r18901  
    2828#include "MimeTypeRegistry.h"
    2929
    30 #define notImplemented() do { fprintf(stderr, "FIXME: UNIMPLEMENTED: %s:%d\n", __FILE__, __LINE__); } while(0)
     30#define notImplemented() qDebug("FIXME: UNIMPLEMENTED: %s:%d (%s)", __FILE__, __LINE__, __FUNCTION__)
    3131
    3232namespace WebCore
  • trunk/WebCore/platform/qt/PopupMenuQt.cpp

    r18232 r18901  
    2626#include "PopupMenu.h"
    2727
    28 #include <stdio.h>
     28#include <qglobal.h>
    2929
    30 #define notImplemented() do { fprintf(stderr, "FIXME: UNIMPLEMENTED: %s:%d\n", __FILE__, __LINE__); } while(0)
     30#define notImplemented() qDebug("FIXME: UNIMPLEMENTED: %s:%d (%s)", __FILE__, __LINE__, __FUNCTION__)
    3131
    3232namespace WebCore {
  • trunk/WebCore/platform/qt/ScrollViewQt.cpp

    r18886 r18901  
    4242#include <QScrollArea>
    4343
    44 #define notImplemented() do { fprintf(stderr, "FIXME: UNIMPLEMENTED: %s:%d\n", __FILE__, __LINE__); } while(0)
     44#define notImplemented() qDebug("FIXME: UNIMPLEMENTED: %s:%d (%s)", __FILE__, __LINE__, __FUNCTION__)
    4545
    4646namespace WebCore {
  • trunk/WebCore/platform/qt/TemporaryLinkStubs.cpp

    r18650 r18901  
    6868using namespace WebCore;
    6969
    70 #define notImplemented() do { fprintf(stderr, "FIXME: UNIMPLEMENTED: %s:%d (%s)\n", \
    71            __FILE__, __LINE__, __FUNCTION__); } while(0)
     70#define notImplemented() qDebug("FIXME: UNIMPLEMENTED: %s:%d (%s)", __FILE__, __LINE__, __FUNCTION__)
    7271
    7372FloatRect Font::selectionRectForComplexText(const TextRun&, const TextStyle&, const IntPoint&, int) const { notImplemented(); return FloatRect(); }
  • trunk/WebCore/platform/qt/TextBoundaries.cpp

    r17571 r18901  
    3636#include <stdio.h>
    3737
    38 #define notImplemented() do { fprintf(stderr, "FIXME: UNIMPLEMENTED: %s:%d\n", __FILE__, __LINE__); } while(0)
     38#define notImplemented() qDebug("FIXME: UNIMPLEMENTED: %s:%d (%s)", __FILE__, __LINE__, __FUNCTION__)
    3939
    4040
  • trunk/WebCore/platform/qt/WidgetQt.cpp

    r18886 r18901  
    4141#include <QWidget>
    4242
    43 #define notImplemented() do { fprintf(stderr, "FIXME: UNIMPLEMENTED: %s:%d\n", __FILE__, __LINE__); } while(0)
     43#define notImplemented() qDebug("FIXME: UNIMPLEMENTED: %s:%d (%s)", __FILE__, __LINE__, __FUNCTION__)
    4444
    4545namespace WebCore {
  • trunk/WebKitQt/ChangeLog

    r18899 r18901  
     12007-01-17  Lars Knoll <lars@trolltech.com>
     2
     3        Reviewed by Zack
     4
     5        change all notImplemented() macros to use qDebug
     6        instead of fprintf(stder, ...)
     7
     8        * WebCoreSupport/ChromeClientQt.cpp:
     9        * WebCoreSupport/ContextMenuClientQt.cpp:
     10        * WebCoreSupport/EditorClientQt.cpp:
     11        * WebCoreSupport/FrameLoaderClientQt.cpp:
     12
    1132007-01-16  Alice Liu  <alice.liu@apple.com>
    214
  • trunk/WebKitQt/WebCoreSupport/ChromeClientQt.cpp

    r18886 r18901  
    3535#include "qwebpage.h"
    3636
    37 #define notImplemented() do { fprintf(stderr, "FIXME: UNIMPLEMENTED: %s:%d\n", __FILE__, __LINE__); } while(0)
     37#define notImplemented() qDebug("FIXME: UNIMPLEMENTED: %s:%d (%s)", __FILE__, __LINE__, __FUNCTION__)
    3838
    3939namespace WebCore
  • trunk/WebKitQt/WebCoreSupport/ContextMenuClientQt.cpp

    r18757 r18901  
    3333#include <stdio.h>
    3434
    35 #define notImplemented() do { fprintf(stderr, "FIXME: UNIMPLEMENTED: %s:%d (%s)\n", \
    36            __FILE__, __LINE__, __FUNCTION__); } while(0)
     35#define notImplemented() qDebug("FIXME: UNIMPLEMENTED: %s:%d (%s)", __FILE__, __LINE__, __FUNCTION__);
    3736
    3837namespace WebCore {
  • trunk/WebKitQt/WebCoreSupport/EditorClientQt.cpp

    r18899 r18901  
    3535#include <stdio.h>
    3636
    37 #define notImplemented() do { fprintf(stderr, "FIXME: UNIMPLEMENTED: %s:%d(%s)\n", __FILE__, __LINE__, __FUNCTION__); } while(0)
     37#define notImplemented() qDebug("FIXME: UNIMPLEMENTED: %s:%d (%s)", __FILE__, __LINE__, __FUNCTION__)
    3838
    3939namespace WebCore {
  • trunk/WebKitQt/WebCoreSupport/FrameLoaderClientQt.cpp

    r18886 r18901  
    3434#include "qwebframe.h"
    3535
    36 #define notImplemented() do { fprintf(stderr, "FIXME: UNIMPLEMENTED: %s:%d (%s)\n", __FILE__, __LINE__, __FUNCTION__); } while(0)
    37 
     36#define notImplemented() qDebug("FIXME: UNIMPLEMENTED: %s:%d (%s)", __FILE__, __LINE__, __FUNCTION__)
    3837
    3938namespace WebCore
  • trunk/WebKitTools/ChangeLog

    r18886 r18901  
     12007-01-17  Lars Knoll <lars@trolltech.com>
     2
     3        Reviewed by Zack
     4
     5        Add a message handler to DumpRenderTree that will
     6        suppress all debug output coming from qDebug() statements.
     7        Like this we can get rid of all the noise coming
     8        from the notImplemented() macro when running the
     9        layout tests. You can get it back by adding -v to
     10        DumpRenderTree's command line.
     11
     12        Changed run-webkit-tests slightly, so we by default
     13        don't fail anymore when our output differs from what
     14        is generated on the Mac. Added a --strict option, so
     15        that we can still see this cases and fix them one by one.
     16
     17        * DumpRenderTree/DumpRenderTree.qtproj/main.cpp:
     18        (messageHandler):
     19        (main):
     20        * Scripts/run-webkit-tests:
     21
    1222007-01-16  Lars Knoll <lars@trolltech.com>
    223
  • trunk/WebKitTools/DumpRenderTree/DumpRenderTree.qtproj/main.cpp

    r18886 r18901  
    2828
    2929#include "DumpRenderTree.h"
    30 #include "qurl.h"
    31 #include "qdir.h"
    3230
    3331#include <qstringlist.h>
    3432#include <qapplication.h>
     33#include <qurl.h>
     34#include <qdir.h>
     35#include <qdebug.h>
     36
     37void messageHandler(QtMsgType, const char *)
     38{
     39    // do nothing
     40}
    3541
    3642
     
    4046
    4147    QStringList args = app.arguments();
     48    if (args.count() < 2) {
     49        qDebug() << "Usage: DumpRenderTree [-v] filename";
     50        exit(0);
     51    }
     52       
     53    // supress debug output from Qt if not started with -v
     54    if (!args.contains(QLatin1String("-v")))
     55        qInstallMsgHandler(messageHandler);
    4256
    4357    WebCore::DumpRenderTree dumper;
    44 
    45     if (args.count() == 2 && args[1] == QLatin1String("-"))
     58   
     59    if (args.last() == QLatin1String("-"))
    4660        dumper.open();
    47     else if (args.count() == 2) {
    48         if (!args[1].startsWith("/")
    49             && !args[1].startsWith("file:")) {
     61    else {
     62        if (!args.last().startsWith("/")
     63            && !args.last().startsWith("file:")) {
    5064            QString path = QDir::currentPath();
    5165            if (!path.endsWith('/'))
    5266                path.append('/');
    53             args[1].prepend(path);
     67            args.last().prepend(path);
    5468        }
    55         dumper.open(QUrl(args[1]));
     69        dumper.open(QUrl(args.last()));
    5670    }
    5771    return app.exec();
  • trunk/WebKitTools/Scripts/run-webkit-tests

    r18804 r18901  
    9393my $threaded = 0;
    9494my $verbose = 0;
    95 my $use_valgrind = 0;
     95my $useValgrind = 0;
     96my $strictTesting = 0;
    9697
    9798my $expectedTag = "expected";
     
    140141    "  -v|--verbose            More verbose output (overrides --quiet)\n" .
    141142    "  --debug|--release       Set DumpRenderTree build configuration\n" .
    142     "  --valgrind              Run DumpRenderTree inside valgrind (Linux only)\n";
     143    "  --valgrind              Run DumpRenderTree inside valgrind (Qt/Linux only)\n" .
     144    "  --strict                Do a comparison with the output on Mac (Qt only)\n";
    143145
    144146# Parse out build options (--debug or --release) first
     
    164166    'threaded|t' => \$threaded,
    165167    'verbose|v' => \$verbose,
    166     'valgrind' => \$use_valgrind,
     168    'valgrind' => \$useValgrind,
     169    'strict' => \$strictTesting,
    167170);
    168171
     
    373376    }
    374377    my $expectedMac;
    375     if (isQt()) {
     378    if (isQt() && $strictTesting) {
    376379      if (!$resetResults && open EXPECTED, "<", "$expectedTestResultsDirectory/$base-$expectedTagMac.txt") {
    377380        $expectedMac = "";
     
    449452    }
    450453
    451     if (isQt()) {
     454    if (isQt() && $strictTesting) {
    452455      if (defined $expectedMac) {
    453456        my $simplified_actual;
     
    904907    $ENV{DYLD_INSERT_LIBRARIES} = "/usr/lib/libgmalloc.dylib" if $guardMalloc;
    905908    my @args = ();
    906     if ($use_valgrind) {
     909    if ($useValgrind) {
    907910      push @args, $tool;
    908911    }
    909912    push @args, @toolArgs;
    910     if ($use_valgrind) {
     913    if ($useValgrind) {
    911914      $tool = "valgrind";
    912915    }
Note: See TracChangeset for help on using the changeset viewer.