Changeset 57416 in webkit


Ignore:
Timestamp:
Apr 10, 2010 3:12:08 AM (14 years ago)
Author:
robert@webkit.org
Message:

2010-04-11 Robert Hogan <robert@webkit.org>

Reviewed by Simon Hausmann.

[Qt] Update layoutTestController.DumpResourceLoadCallbacks to match other ports.

Unskip http/tests/xmlhttprequest/abort-should-cancel-load.html

http/tests/misc/will-send-request-returns-null-on-redirect.html
fast/loader/user-style-sheet-resource-load-callbacks.html
http/tests/misc/window-dot-stop.html
http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-allow.html
http/tests/security/XFrameOptions/x-frame-options-deny.html
http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-allow.html
http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny.html
http/tests/xmlhttprequest/abort-should-cancel-load.html

QNetworkReply::OperationCanceledError has a value of 5 rather than -999, so add platform-specific results accordingly.

Add platform-specific results for the the following, though leave them skipped for now. They've started failing again
since review was granted (see https://bugs.webkit.org/show_bug.cgi?id=37382):

http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body.html
http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny.html
http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag.html

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

  • platform/qt/Skipped:
  • platform/qt/http/tests/misc/window-dot-stop-expected.txt: Added.
  • platform/qt/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-expected.txt: Added.
  • platform/qt/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body-expected.txt: Added.
  • platform/qt/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny-expected.txt: Added.
  • platform/qt/http/tests/xmlhttprequest/abort-should-cancel-load-expected.txt: Added.

2010-04-11 Robert Hogan <robert@webkit.org>

Reviewed by Simon Hausmann.

[Qt] Update layoutTestController.DumpResourceLoadCallbacks to match other ports.

Unskip http/tests/xmlhttprequest/abort-should-cancel-load.html

http/tests/misc/will-send-request-returns-null-on-redirect.html
fast/loader/user-style-sheet-resource-load-callbacks.html
http/tests/misc/window-dot-stop.html
http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-allow.html
http/tests/security/XFrameOptions/x-frame-options-deny.html
http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-allow.html
http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny.html
http/tests/xmlhttprequest/abort-should-cancel-load.html

QNetworkReply::OperationCanceledError has a value of 5, so update expected results accordingly.

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

  • WebCoreSupport/FrameLoaderClientQt.cpp: (qt_set_will_send_request_returns_null_on_redirect): (drtDescriptionSuitableForTestResult): (WebCore::FrameLoaderClientQt::dispatchWillSendRequest): (WebCore::FrameLoaderClientQt::dispatchDidReceiveResponse): (WebCore::FrameLoaderClientQt::dispatchDidFinishLoading): (WebCore::FrameLoaderClientQt::dispatchDidFailLoading):

2010-04-11 Robert Hogan <robert@webkit.org>

Reviewed by Simon Hausmann.

[Qt] Update layoutTestController.DumpResourceLoadCallbacks to match other ports.

Add support for layoutTestController.setWillSendRequestReturnsNullOnRedirect to Qt DRT.
Prevent dumping resource load callbacks once layout test has dumped.

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

  • DumpRenderTree/qt/DumpRenderTreeQt.cpp: (WebCore::DumpRenderTree::dump):
  • DumpRenderTree/qt/LayoutTestControllerQt.cpp: (LayoutTestController::setWillSendRequestReturnsNullOnRedirect):
  • DumpRenderTree/qt/LayoutTestControllerQt.h:
Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r57415 r57416  
     12010-04-11  Robert Hogan  <robert@webkit.org>
     2
     3        Reviewed by Simon Hausmann.
     4
     5        [Qt] Update layoutTestController.DumpResourceLoadCallbacks to match other ports.
     6
     7        Unskip  http/tests/xmlhttprequest/abort-should-cancel-load.html
     8                http/tests/misc/will-send-request-returns-null-on-redirect.html
     9                fast/loader/user-style-sheet-resource-load-callbacks.html
     10                http/tests/misc/window-dot-stop.html
     11                http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-allow.html
     12                http/tests/security/XFrameOptions/x-frame-options-deny.html
     13                http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-allow.html
     14                http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny.html
     15                http/tests/xmlhttprequest/abort-should-cancel-load.html
     16
     17        QNetworkReply::OperationCanceledError has a value of 5 rather than -999, so add platform-specific results accordingly.
     18
     19        Add platform-specific results for the the following, though leave them skipped for now. They've started failing again
     20        since review was granted (see https://bugs.webkit.org/show_bug.cgi?id=37382):
     21                http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body.html
     22                http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny.html
     23                http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag.html
     24
     25        https://bugs.webkit.org/show_bug.cgi?id=37237
     26
     27        * platform/qt/Skipped:
     28        * platform/qt/http/tests/misc/window-dot-stop-expected.txt: Added.
     29        * platform/qt/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-expected.txt: Added.
     30        * platform/qt/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body-expected.txt: Added.
     31        * platform/qt/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny-expected.txt: Added.
     32        * platform/qt/http/tests/xmlhttprequest/abort-should-cancel-load-expected.txt: Added.
     33
    1342010-04-10  Andrew Scherkus  <scherkus@chromium.org>
    235
  • trunk/LayoutTests/platform/qt/Skipped

    r57409 r57416  
    310310fast/loader/onload-willSendRequest-null-for-script.html
    311311
    312 # Missing layoutTestController.setWillSendRequestReturnsNullOnRedirect()
    313 http/tests/misc/will-send-request-returns-null-on-redirect.html
    314 
    315312# Missing layoutTestController.evaluateScriptInIsolatedWorld()
    316313http/tests/security/isolatedWorld
     
    516513fast/forms/drag-out-of-textarea.html
    517514fast/frames/frame-src-attribute.html
    518 fast/loader/user-style-sheet-resource-load-callbacks.html
    519515fast/overflow/003.xml
    520516fast/text/international/bidi-menulist.html
     
    49614957http/tests/misc/refresh-headers.php
    49624958http/tests/misc/timer-vs-loading.html
    4963 http/tests/misc/window-dot-stop.html
     4959
     4960
     4961# Have an additional line in results for GET of favicon.ico. Probably innocuous.
     4962# https://bugs.webkit.org/show_bug.cgi?id=37382
     4963http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body.html
     4964http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny.html
     4965http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag.html
    49644966
    49654967# Skip failing http/tests/security tests
     
    49714973http/tests/security/xss-DENIED-xsl-document-redirect.xml
    49724974http/tests/security/xss-DENIED-xsl-document.xml
    4973 http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body.html
    4974 http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-allow.html
    4975 http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny.html
    4976 http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag.html
    4977 http/tests/security/XFrameOptions/x-frame-options-deny.html
    4978 http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-allow.html
    4979 http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny.html
    49804975http/tests/security/aboutBlank/security-context-alias.html
    49814976http/tests/security/aboutBlank/security-context-window-open.html
     
    49984993# Many of these tests exercise preflighted requests, which are not supported with Qt older than 4.7.
    49994994http/tests/xmlhttprequest/XMLHttpRequestException.html
    5000 http/tests/xmlhttprequest/abort-should-cancel-load.html
    50014995http/tests/xmlhttprequest/access-control-and-redirects.html
    50024996http/tests/xmlhttprequest/access-control-basic-allow-preflight-cache-invalidation-by-header.html
  • trunk/WebKit/qt/ChangeLog

    r57408 r57416  
     12010-04-11  Robert Hogan  <robert@webkit.org>
     2
     3        Reviewed by Simon Hausmann.
     4
     5        [Qt] Update layoutTestController.DumpResourceLoadCallbacks to match other ports.
     6
     7        Unskip  http/tests/xmlhttprequest/abort-should-cancel-load.html
     8                http/tests/misc/will-send-request-returns-null-on-redirect.html
     9                fast/loader/user-style-sheet-resource-load-callbacks.html
     10                http/tests/misc/window-dot-stop.html
     11                http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-allow.html
     12                http/tests/security/XFrameOptions/x-frame-options-deny.html
     13                http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-allow.html
     14                http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny.html
     15                http/tests/xmlhttprequest/abort-should-cancel-load.html
     16
     17        QNetworkReply::OperationCanceledError has a value of 5, so update expected results accordingly.
     18
     19        https://bugs.webkit.org/show_bug.cgi?id=37237
     20
     21        * WebCoreSupport/FrameLoaderClientQt.cpp:
     22        (qt_set_will_send_request_returns_null_on_redirect):
     23        (drtDescriptionSuitableForTestResult):
     24        (WebCore::FrameLoaderClientQt::dispatchWillSendRequest):
     25        (WebCore::FrameLoaderClientQt::dispatchDidReceiveResponse):
     26        (WebCore::FrameLoaderClientQt::dispatchDidFinishLoading):
     27        (WebCore::FrameLoaderClientQt::dispatchDidFailLoading):
     28
    1292010-04-10  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
    230
  • trunk/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp

    r57277 r57416  
    8080static bool dumpFrameLoaderCallbacks = false;
    8181static bool dumpResourceLoadCallbacks = false;
     82static bool sendRequestReturnsNullOnRedirect = false;
    8283
    8384static QMap<unsigned long, QString> dumpAssignedUrls;
     
    9192{
    9293    dumpResourceLoadCallbacks = b;
     94}
     95
     96void QWEBKIT_EXPORT qt_set_will_send_request_returns_null_on_redirect(bool b)
     97{
     98    sendRequestReturnsNullOnRedirect = b;
    9399}
    94100
     
    126132{
    127133    QString url = request.url().string();
    128     return QString::fromLatin1("<NSURLRequest %1>").arg(url);
     134    QString httpMethod = request.httpMethod();
     135    QString mainDocumentUrl = request.firstPartyForCookies().string();
     136    return QString::fromLatin1("<NSURLRequest URL %1, main document URL %2, http method %3>").arg(url).arg(mainDocumentUrl).arg(httpMethod);
    129137}
    130138
    131139static QString drtDescriptionSuitableForTestResult(const WebCore::ResourceResponse& response)
    132140{
    133     QString text = response.httpStatusText();
    134     if (text.isEmpty())
    135         return QLatin1String("(null)");
    136 
    137     return text;
     141    QString url = response.url().string();
     142    int httpStatusCode = response.httpStatusCode();
     143    return QString::fromLatin1("<NSURLResponse %1, http status code %2>").arg(url).arg(httpStatusCode);
    138144}
    139145
     
    842848void FrameLoaderClientQt::dispatchWillSendRequest(WebCore::DocumentLoader*, unsigned long identifier, WebCore::ResourceRequest& newRequest, const WebCore::ResourceResponse& redirectResponse)
    843849{
     850
    844851    if (dumpResourceLoadCallbacks)
    845852        printf("%s - willSendRequest %s redirectResponse %s\n",
    846853               qPrintable(dumpAssignedUrls[identifier]),
    847854               qPrintable(drtDescriptionSuitableForTestResult(newRequest)),
    848                qPrintable(drtDescriptionSuitableForTestResult(redirectResponse)));
     855               (redirectResponse.isNull()) ? "(null)" : qPrintable(drtDescriptionSuitableForTestResult(redirectResponse)));
     856
     857    if (sendRequestReturnsNullOnRedirect && !redirectResponse.isNull()) {
     858        printf("Returning null for this redirect\n");
     859        newRequest.setURL(QUrl());
     860    }
    849861
    850862    // seems like the Mac code doesn't do anything here by default neither
     
    869881}
    870882
    871 void FrameLoaderClientQt::dispatchDidReceiveResponse(WebCore::DocumentLoader*, unsigned long, const WebCore::ResourceResponse& response)
     883void FrameLoaderClientQt::dispatchDidReceiveResponse(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ResourceResponse& response)
    872884{
    873885
    874886    m_response = response;
    875887    m_firstData = true;
     888    if (dumpResourceLoadCallbacks)
     889        printf("%s - didReceiveResponse %s\n",
     890               qPrintable(dumpAssignedUrls[identifier]),
     891               qPrintable(drtDescriptionSuitableForTestResult(response)));
    876892    //qDebug() << "    got response from" << response.url().string();
    877893}
     
    881897}
    882898
    883 void FrameLoaderClientQt::dispatchDidFinishLoading(WebCore::DocumentLoader*, unsigned long)
    884 {
     899void FrameLoaderClientQt::dispatchDidFinishLoading(WebCore::DocumentLoader*, unsigned long identifier)
     900{
     901    if (dumpResourceLoadCallbacks)
     902        printf("%s - didFinishLoading\n",
     903               (dumpAssignedUrls.contains(identifier) ? qPrintable(dumpAssignedUrls[identifier]) : "<unknown>"));
    885904}
    886905
     
    888907{
    889908    if (dumpResourceLoadCallbacks)
    890         printf("%s - didFailLoadingWithError: %s\n", qPrintable(dumpAssignedUrls[identifier]), qPrintable(drtDescriptionSuitableForTestResult(error)));
     909        printf("%s - didFailLoadingWithError: %s\n",
     910               (dumpAssignedUrls.contains(identifier) ? qPrintable(dumpAssignedUrls[identifier]) : "<unknown>"),
     911               qPrintable(drtDescriptionSuitableForTestResult(error)));
    891912
    892913    if (m_firstData) {
  • trunk/WebKitTools/ChangeLog

    r57408 r57416  
     12010-04-11  Robert Hogan  <robert@webkit.org>
     2
     3        Reviewed by Simon Hausmann.
     4
     5        [Qt] Update layoutTestController.DumpResourceLoadCallbacks to match other ports.
     6
     7        Add support for layoutTestController.setWillSendRequestReturnsNullOnRedirect to Qt DRT.
     8        Prevent dumping resource load callbacks once layout test has dumped.
     9
     10        https://bugs.webkit.org/show_bug.cgi?id=37237
     11
     12        * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
     13        (WebCore::DumpRenderTree::dump):
     14        * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
     15        (LayoutTestController::setWillSendRequestReturnsNullOnRedirect):
     16        * DumpRenderTree/qt/LayoutTestControllerQt.h:
     17
    1182010-04-10  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
    219
  • trunk/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp

    r57328 r57416  
    8787extern void qt_drt_resetOriginAccessWhiteLists();
    8888extern bool qt_drt_hasDocumentElement(QWebFrame* qFrame);
     89extern void qt_dump_resource_load_callbacks(bool b);
    8990
    9091namespace WebCore {
     
    729730void DumpRenderTree::dump()
    730731{
    731     // Prevent any further frame load callbacks from appearing after we dump the result.
     732    // Prevent any further frame load or resource load callbacks from appearing after we dump the result.
    732733    qt_dump_frame_loader(false);
     734    qt_dump_resource_load_callbacks(false);
    733735
    734736    QWebFrame *mainFrame = m_page->mainFrame();
  • trunk/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp

    r57408 r57416  
    4141extern void qt_dump_frame_loader(bool b);
    4242extern void qt_dump_resource_load_callbacks(bool b);
     43extern void qt_set_will_send_request_returns_null_on_redirect(bool b);
    4344extern void qt_drt_setMediaType(QWebFrame* qframe, const QString& type);
    4445extern void qt_drt_setFrameFlatteningEnabled(QWebPage*, bool);
     
    242243}
    243244
     245void LayoutTestController::setWillSendRequestReturnsNullOnRedirect(bool enabled)
     246{
     247    qt_set_will_send_request_returns_null_on_redirect(enabled);
     248}
     249
    244250void LayoutTestController::queueBackNavigation(int howFarBackward)
    245251{
  • trunk/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h

    r57408 r57416  
    102102    void dumpFrameLoadCallbacks();
    103103    void dumpResourceLoadCallbacks();
     104    void setWillSendRequestReturnsNullOnRedirect(bool enabled);
    104105    void queueBackNavigation(int howFarBackward);
    105106    void queueForwardNavigation(int howFarForward);
Note: See TracChangeset for help on using the changeset viewer.