Changeset 51410 in webkit


Ignore:
Timestamp:
Nov 26, 2009 2:34:50 AM (14 years ago)
Author:
zecke@webkit.org
Message:

[Qt] Add automatic test case for plugins that use QWidget

https://bugs.webkit.org/show_bug.cgi?id=31203

Change the RenderTreeAsText to look into the WebCore::Widget
and print the state of the platformWidget. Change the DRT to
use QtUiTools to be able to initiate QProgressBar and such
as a plugin. Add the test case, add the result, update the
other results due the new test.

WebCore:

  • rendering/RenderTreeAsText.cpp:

(WebCore::operator<<): Add special case for RenderPart

WebKitTools:

  • DumpRenderTree/qt/DumpRenderTree.cpp:

(WebCore::WebPage::createPlugin):

  • DumpRenderTree/qt/DumpRenderTree.h:
  • DumpRenderTree/qt/DumpRenderTree.pro:

LayoutTest:

  • platform/gtk/Skipped:
  • platform/mac/Skipped:
  • platform/qt/plugins/netscape-dom-access-expected.txt: Added
  • platform/qt/plugins/qt-qwidget-plugin-expected.txt: Added
  • platform/win/Skipped:
  • plugins/qt-qwidget-plugin.html: Added.
Location:
trunk
Files:
2 added
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r51401 r51410  
     12009-11-21  Holger Hans Peter Freyther  <zecke@selfish.org>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        [Qt] Add automatic test for Qt Plugins.
     6        https://bugs.webkit.org/show_bug.cgi?id=31203
     7
     8        Add a test case for Qt plugins. In this case one
     9        RenderPart should be visible on screen and the other
     10        should be invisible. The internal QWidget should
     11        have the same state as the WebCore::Widget.
     12
     13        Add Qt specific netscape-dom-access-expected.txt because
     14        that was using a native widget inside a RenderPart as well.
     15
     16        * platform/gtk/Skipped:
     17        * platform/mac/Skipped:
     18        * platform/qt/plugins/netscape-dom-access-expected.txt: Added
     19        * platform/qt/plugins/qt-qwidget-plugin-expected.txt: Added
     20        * platform/win/Skipped:
     21        * plugins/qt-qwidget-plugin.html: Added.
     22
    1232009-11-25  Csaba Osztrogonác  <ossy@webkit.org>
    224
  • trunk/LayoutTests/platform/gtk/Skipped

    r51390 r51410  
    36253625plugins/throw-on-dealloc.html
    36263626plugins/undefined-property-crash.html
     3627#   These test require Qt Widgets
     3628plugins/qt-qwidget-plugin.html
    36273629#   Tests failing
    36283630plugins/embed-attributes-setting.html
  • trunk/LayoutTests/platform/mac/Skipped

    r51258 r51410  
    107107plugins/reloadplugins-no-pages.html
    108108
     109# These test require Qt Widgets
     110plugins/qt-qwidget-plugin.html
  • trunk/LayoutTests/platform/qt/plugins/netscape-dom-access-expected.txt

    r50878 r51410  
    1010          text run at (0,20) width 107: "3px red border."
    1111      RenderBlock (anonymous) at (0,56) size 784x206
    12         RenderPartObject {EMBED} at (0,0) size 206x206 [border: (3px solid #FF0000)]
     12        RenderPartObject {EMBED} at (0,0) size 206x206 [border: (3px solid #FF0000)] [QT: geometry: {at (8,64) size 200x200} isHidden: 0 isSelfVisible: 1 isParentVisible: 1 mask: {at (0,0) size 200x200} ]
    1313        RenderText {#text} at (0,0) size 0x0
    1414        RenderText {#text} at (0,0) size 0x0
  • trunk/LayoutTests/platform/win/Skipped

    r51393 r51410  
    713713plugins/reloadplugins-and-pages.html
    714714plugins/reloadplugins-no-pages.html
     715
     716# These tests require Qt Widgets
     717plugins/qt-qwidget-plugin.html
     718
  • trunk/WebCore/ChangeLog

    r51409 r51410  
     12009-11-21  Holger Hans Peter Freyther  <zecke@selfish.org>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        [Qt] Add Qt specific information of RenderPart
     6        https://bugs.webkit.org/show_bug.cgi?id=31203
     7
     8        The WebCore::Widget of the RenderPart (RenderWidget) might be
     9        backed with a platform widget. Print both the WebCore::Widget
     10        and platform widget state. In the above bug we had a problem
     11        that the WebCore::Widget was invisible but the QWidget was
     12        visible.
     13
     14        * rendering/RenderTreeAsText.cpp:
     15        (WebCore::operator<<): Add special case for RenderPart
     16
    1172009-11-17  Holger Hans Peter Freyther  <zecke@selfish.org>
    218
  • trunk/WebCore/rendering/RenderTreeAsText.cpp

    r50976 r51410  
    4040#include "RenderInline.h"
    4141#include "RenderListMarker.h"
     42#include "RenderPart.h"
    4243#include "RenderTableCell.h"
    4344#include "RenderView.h"
     
    5556#include "RenderSVGText.h"
    5657#include "SVGRenderTreeAsText.h"
     58#endif
     59
     60#if PLATFORM(QT)
     61#include <QWidget>
    5762#endif
    5863
     
    341346    }
    342347
     348#if PLATFORM(QT)
     349    // Print attributes of embedded QWidgets. E.g. when the WebCore::Widget
     350    // is invisible the QWidget should be invisible too.
     351    if (o.isRenderPart()) {
     352        const RenderPart* part = toRenderPart(const_cast<RenderObject*>(&o));
     353        if (part->widget() && part->widget()->platformWidget()) {
     354            QWidget* wid = part->widget()->platformWidget();
     355
     356            ts << " [QT: ";
     357            ts << "geometry: {" << wid->geometry() << "} ";
     358            ts << "isHidden: " << wid->isHidden() << " ";
     359            ts << "isSelfVisible: " << part->widget()->isSelfVisible() << " ";
     360            ts << "isParentVisible: " << part->widget()->isParentVisible() << " ";
     361            ts << "mask: {" << wid->mask().boundingRect() << "} ] ";
     362        }
     363    }
     364#endif
     365
    343366    return ts;
    344367}
  • trunk/WebKitTools/ChangeLog

    r51406 r51410  
     12009-11-21  Holger Hans Peter Freyther  <zecke@selfish.org>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        Link DumpRenderTree to the Qt Ui Tools
     6        https://bugs.webkit.org/show_bug.cgi?id=31203
     7
     8        Implement QWebPage::createPlugin using the Qt Ui Tools
     9        to be able to create classes like QProgressBar from within
     10        the <object></object> tags This is required for the
     11        new automatic test of Qt Plugins.
     12
     13        * DumpRenderTree/qt/DumpRenderTree.cpp:
     14        (WebCore::WebPage::createPlugin):
     15        * DumpRenderTree/qt/DumpRenderTree.h:
     16        * DumpRenderTree/qt/DumpRenderTree.pro:
     17
    1182009-11-25  Yuzo Fujishima  <yuzo@google.com>
    219
  • trunk/WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp

    r51316 r51410  
    6161#include <qwebsecurityorigin.h>
    6262
     63#ifndef QT_NO_UITOOLS
     64#include <QtUiTools/QUiLoader>
     65#endif
     66
    6367#ifdef Q_WS_X11
    6468#include <fontconfig/fontconfig.h>
     
    271275}
    272276
     277QObject* WebPage::createPlugin(const QString& classId, const QUrl& url, const QStringList& paramNames, const QStringList& paramValues)
     278{
     279    Q_UNUSED(url);
     280    Q_UNUSED(paramNames);
     281    Q_UNUSED(paramValues);
     282#ifndef QT_NO_UITOOLS
     283    QUiLoader loader;
     284    return loader.createWidget(classId, view());
     285#else
     286    Q_UNUSED(classId);
     287    return 0;
     288#endif
     289}
     290
    273291DumpRenderTree::DumpRenderTree()
    274292    : m_dumpPixels(false)
  • trunk/WebKitTools/DumpRenderTree/qt/DumpRenderTree.h

    r51298 r51410  
    155155    virtual bool extension(Extension extension, const ExtensionOption *option, ExtensionReturn *output);
    156156
     157    QObject* createPlugin(const QString&, const QUrl&, const QStringList&, const QStringList&);
     158
    157159public slots:
    158160    bool shouldInterruptJavaScript() { return false; }
  • trunk/WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro

    r51174 r51410  
    11TARGET = DumpRenderTree
    22CONFIG  -= app_bundle
     3CONFIG += uitools
    34
    45mac:!static:contains(QT_CONFIG, qt_framework):!CONFIG(webkit_no_framework) {
Note: See TracChangeset for help on using the changeset viewer.