Changeset 82489 in webkit


Ignore:
Timestamp:
Mar 30, 2011 1:14:13 PM (13 years ago)
Author:
robert@webkit.org
Message:

2011-03-30 Robert Hogan <robert@webkit.org>

Reviewed by Antonio Gomes.

[Qt] Fix LoadHTMLStringItem::invoke() after r75966

Unskip http/tests/navigation/go-back-to-error-page.html

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

  • platform/qt/Skipped:

2011-03-30 Robert Hogan <robert@webkit.org>

Reviewed by Antonio Gomes.

[Qt] Fix LoadHTMLStringItem::invoke() after r75966

Add DRT support for loading an alternate HTML string
for error pages. This allows Qt to unskip
http/tests/navigation/go-back-to-error-page.html.

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

  • WebCoreSupport/DumpRenderTreeSupportQt.cpp: (DumpRenderTreeSupportQt::setAlternateHtml):
  • WebCoreSupport/DumpRenderTreeSupportQt.h:

2011-03-30 Robert Hogan <robert@webkit.org>

Reviewed by Antonio Gomes.

[Qt] Fix LoadHTMLStringItem::invoke() after r75966
Unskip http/tests/navigation/go-back-to-error-page.html

Also add the location of DumpRenderTreeSupportQt.h
to DRT's include paths.

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

  • DumpRenderTree/qt/DumpRenderTree.pro:
  • DumpRenderTree/qt/DumpRenderTreeQt.cpp:
  • DumpRenderTree/qt/DumpRenderTreeQt.h:
  • DumpRenderTree/qt/GCControllerQt.cpp:
  • DumpRenderTree/qt/LayoutTestControllerQt.cpp: (LayoutTestController::queueLoadHTMLString):
  • DumpRenderTree/qt/LayoutTestControllerQt.h:
  • DumpRenderTree/qt/PlainTextControllerQt.cpp:
  • DumpRenderTree/qt/TextInputControllerQt.cpp:
  • DumpRenderTree/qt/WorkQueueItemQt.cpp: (LoadAlternateHTMLStringItem::invoke):
  • DumpRenderTree/qt/WorkQueueItemQt.h: (LoadAlternateHTMLStringItem::LoadAlternateHTMLStringItem):
  • QtTestBrowser/QtTestBrowser.pro:
  • QtTestBrowser/launcherwindow.h:
Location:
trunk
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r82488 r82489  
     12011-03-30  Robert Hogan  <robert@webkit.org>
     2
     3        Reviewed by Antonio Gomes.
     4
     5        [Qt] Fix LoadHTMLStringItem::invoke() after r75966
     6
     7        Unskip http/tests/navigation/go-back-to-error-page.html
     8
     9        https://bugs.webkit.org/show_bug.cgi?id=52614
     10
     11        * platform/qt/Skipped:
     12
    1132011-03-30  Mihai Parparita  <mihaip@chromium.org>
    214
  • trunk/LayoutTests/platform/qt/Skipped

    r82476 r82489  
    31753175fast/xmlhttprequest/xmlhttprequest-nonexistent-file.html
    31763176
    3177 # [Qt] Fix LoadHTMLStringItem::invoke() after r75966
    3178 # https://bugs.webkit.org/show_bug.cgi?id=52614
    3179 http/tests/navigation/go-back-to-error-page.html
    3180 
    31813177# [Qt] LayoutTests/media/video-currentTime-delay.html fails
    31823178# https://bugs.webkit.org/show_bug.cgi?id=52859
  • trunk/Source/WebKit/qt/ChangeLog

    r82243 r82489  
     12011-03-30  Robert Hogan  <robert@webkit.org>
     2
     3        Reviewed by Antonio Gomes.
     4
     5        [Qt] Fix LoadHTMLStringItem::invoke() after r75966
     6
     7        Add DRT support for loading an alternate HTML string
     8        for error pages. This allows Qt to unskip
     9        http/tests/navigation/go-back-to-error-page.html.
     10
     11        https://bugs.webkit.org/show_bug.cgi?id=52614
     12
     13        * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
     14        (DumpRenderTreeSupportQt::setAlternateHtml):
     15        * WebCoreSupport/DumpRenderTreeSupportQt.h:
     16
    1172011-03-29  Alexis Menard  <alexis.menard@openbossa.org>
    218
  • trunk/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp

    r82059 r82489  
    951951}
    952952
     953// API Candidate?
    953954QString DumpRenderTreeSupportQt::responseMimeType(QWebFrame* frame)
    954955{
     
    10401041}
    10411042
     1043// API Candidate?
     1044void DumpRenderTreeSupportQt::setAlternateHtml(QWebFrame* frame, const QString& html, const QUrl& baseUrl, const QUrl& failingUrl)
     1045{
     1046    KURL kurl(baseUrl);
     1047    WebCore::Frame* coreFrame = QWebFramePrivate::core(frame);
     1048    WebCore::ResourceRequest request(kurl);
     1049    const QByteArray utf8 = html.toUtf8();
     1050    WTF::RefPtr<WebCore::SharedBuffer> data = WebCore::SharedBuffer::create(utf8.constData(), utf8.length());
     1051    WebCore::SubstituteData substituteData(data, WTF::String("text/html"), WTF::String("utf-8"), failingUrl);
     1052    coreFrame->loader()->load(request, substituteData, false);
     1053}
     1054
    10421055// Provide a backward compatibility with previously exported private symbols as of QtWebKit 4.6 release
    10431056
  • trunk/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h

    r80319 r82489  
    199199
    200200    static QUrl mediaContentUrlByElementId(QWebFrame*, const QString& elementId);
     201    static void setAlternateHtml(QWebFrame*, const QString& html, const QUrl& baseUrl, const QUrl& failingUrl);
    201202};
    202203
  • trunk/Tools/ChangeLog

    r82484 r82489  
     12011-03-30  Robert Hogan  <robert@webkit.org>
     2
     3        Reviewed by Antonio Gomes.
     4
     5        [Qt] Fix LoadHTMLStringItem::invoke() after r75966
     6        Unskip http/tests/navigation/go-back-to-error-page.html
     7
     8        Also add the location of DumpRenderTreeSupportQt.h
     9        to DRT's include paths.
     10
     11        https://bugs.webkit.org/show_bug.cgi?id=52614
     12
     13        * DumpRenderTree/qt/DumpRenderTree.pro:
     14        * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
     15        * DumpRenderTree/qt/DumpRenderTreeQt.h:
     16        * DumpRenderTree/qt/GCControllerQt.cpp:
     17        * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
     18        (LayoutTestController::queueLoadHTMLString):
     19        * DumpRenderTree/qt/LayoutTestControllerQt.h:
     20        * DumpRenderTree/qt/PlainTextControllerQt.cpp:
     21        * DumpRenderTree/qt/TextInputControllerQt.cpp:
     22        * DumpRenderTree/qt/WorkQueueItemQt.cpp:
     23        (LoadAlternateHTMLStringItem::invoke):
     24        * DumpRenderTree/qt/WorkQueueItemQt.h:
     25        (LoadAlternateHTMLStringItem::LoadAlternateHTMLStringItem):
     26        * QtTestBrowser/QtTestBrowser.pro:
     27        * QtTestBrowser/launcherwindow.h:
     28
    1292011-03-30  Adam Barth  <abarth@webkit.org>
    230
  • trunk/Tools/DumpRenderTree/qt/DumpRenderTree.pro

    r82125 r82489  
    1010INCLUDEPATH += ../../../Source/JavaScriptCore
    1111INCLUDEPATH += ../../../Source/JavaScriptCore/ForwardingHeaders
     12INCLUDEPATH += ../../../Source/WebKit/qt/WebCoreSupport
    1213INCLUDEPATH += $$BASEDIR
    1314DESTDIR = ../../bin
  • trunk/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp

    r81588 r82489  
    3333
    3434#include "DumpRenderTreeQt.h"
    35 #include "../../../Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h"
     35#include "DumpRenderTreeSupportQt.h"
    3636#include "EventSenderQt.h"
    3737#include "GCControllerQt.h"
  • trunk/Tools/DumpRenderTree/qt/DumpRenderTreeQt.h

    r81588 r82489  
    4141#endif
    4242
    43 #include "../../../Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h"
     43#include "DumpRenderTreeSupportQt.h"
    4444#include <qgraphicsview.h>
    4545#include <qgraphicswebview.h>
  • trunk/Tools/DumpRenderTree/qt/GCControllerQt.cpp

    r75908 r82489  
    3030#include "config.h"
    3131#include "GCControllerQt.h"
    32 #include "../../../Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h"
     32#include "DumpRenderTreeSupportQt.h"
    3333
    3434#include <qwebpage.h>
  • trunk/Tools/DumpRenderTree/qt/LayoutTestControllerQt.cpp

    r82172 r82489  
    2929#include "config.h"
    3030#include "LayoutTestControllerQt.h"
    31 #include "../../../Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h"
     31#include "DumpRenderTreeSupportQt.h"
    3232
    3333#include "DumpRenderTreeQt.h"
     
    316316}
    317317
    318 void LayoutTestController::queueLoadHTMLString(const QString& content, const QString& baseURL)
    319 {
    320     WorkQueue::shared()->queue(new LoadHTMLStringItem(content, baseURL, m_drt->webPage()));
     318void LayoutTestController::queueLoadHTMLString(const QString& content, const QString& baseURL, const QString& failingURL)
     319{
     320    if (failingURL.isEmpty())
     321        WorkQueue::shared()->queue(new LoadHTMLStringItem(content, baseURL, m_drt->webPage()));
     322    else
     323        WorkQueue::shared()->queue(new LoadAlternateHTMLStringItem(content, baseURL, failingURL, m_drt->webPage()));
    321324}
    322325
  • trunk/Tools/DumpRenderTree/qt/LayoutTestControllerQt.h

    r81733 r82489  
    122122    void queueForwardNavigation(int howFarForward);
    123123    void queueLoad(const QString& url, const QString& target = QString());
    124     void queueLoadHTMLString(const QString& content, const QString& baseURL = QString());
     124    void queueLoadHTMLString(const QString& content, const QString& baseURL = QString(), const QString& failingURL = QString());
    125125    void queueReload();
    126126    void queueLoadingScript(const QString& script);
  • trunk/Tools/DumpRenderTree/qt/PlainTextControllerQt.cpp

    r75908 r82489  
    2929#include "PlainTextControllerQt.h"
    3030
    31 #include "../../../Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h"
     31#include "DumpRenderTreeSupportQt.h"
    3232#include <QApplication>
    3333#include <QInputMethodEvent>
  • trunk/Tools/DumpRenderTree/qt/TextInputControllerQt.cpp

    r75908 r82489  
    2929#include "config.h"
    3030#include "TextInputControllerQt.h"
    31 #include "../../../Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h"
     31#include "DumpRenderTreeSupportQt.h"
    3232
    3333#include <QApplication>
  • trunk/Tools/DumpRenderTree/qt/WorkQueueItemQt.cpp

    r63191 r82489  
    2929#include "config.h"
    3030#include "WorkQueueItemQt.h"
     31#include "DumpRenderTreeSupportQt.h"
    3132
    3233QWebFrame* findFrameNamed(const QString& frameName, QWebFrame* frame)
     
    7374}
    7475
     76bool LoadAlternateHTMLStringItem::invoke() const
     77{
     78    Q_ASSERT(m_webPage);
     79
     80    QWebFrame* frame = m_webPage->mainFrame();
     81    if (!frame)
     82        return false;
     83
     84    DumpRenderTreeSupportQt::setAlternateHtml(frame, m_content, QUrl(m_baseURL), QUrl(m_failingURL));
     85    return true;
     86}
     87
    7588bool ReloadItem::invoke() const
    7689{
  • trunk/Tools/DumpRenderTree/qt/WorkQueueItemQt.h

    r63191 r82489  
    8181};
    8282
     83class LoadAlternateHTMLStringItem : public WorkQueueItem {
     84public:
     85    LoadAlternateHTMLStringItem(const QString& content, const QString& baseURL,  const QString &failingURL, QWebPage *page)
     86        : WorkQueueItem(page)
     87        , m_content(content)
     88        , m_baseURL(baseURL)
     89        , m_failingURL(failingURL)
     90    {
     91    }
     92
     93private:
     94    virtual bool invoke() const;
     95
     96    QString m_content;
     97    QString m_baseURL;
     98    QString m_failingURL;
     99};
     100
    83101class ReloadItem : public WorkQueueItem {
    84102public:
  • trunk/Tools/QtTestBrowser/QtTestBrowser.pro

    r82125 r82489  
    2727isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../..
    2828include(../../Source/WebKit.pri)
     29INCLUDEPATH += ../../Source/WebKit/qt/WebCoreSupport
    2930
    3031DESTDIR = $$OUTPUT_DIR/bin
  • trunk/Tools/QtTestBrowser/launcherwindow.h

    r82244 r82489  
    6262#endif
    6363
     64#include "DumpRenderTreeSupportQt.h"
    6465#include "mainwindow.h"
    6566#include "urlloader.h"
     
    6869#include "webpage.h"
    6970#include "webview.h"
    70 #include "../../Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h"
    7171
    7272#ifdef Q_WS_MAEMO_5
Note: See TracChangeset for help on using the changeset viewer.