Changeset 59623 in webkit


Ignore:
Timestamp:
May 17, 2010 12:36:36 PM (14 years ago)
Author:
robert@webkit.org
Message:

2010-05-17 Robert Hogan <robert@webkit.org>

Reviewed by Kenneth Rohde Christiansen.

[Qt] Disable Icon Database by default in Qt DRT

Unskip:

http/tests/misc/favicon-loads-with-images-disabled.html
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

Qt returns 5 (QNetworkReply::OperationCanceledError) instead of -999 for the XFrameOptions tests,
so update accordingly.

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

  • platform/qt/Skipped:
  • platform/qt/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-expected.txt: Added. Qt returns 5 instead of -999.
  • platform/qt/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body-expected.txt: Added. Qt returns 5 instead of -999.
  • platform/qt/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny-expected.txt: Added. Qt returns 5 instead of -999.

2010-05-17 Robert Hogan <robert@webkit.org>

Reviewed by Kenneth Rohde Christiansen.

[Qt] Disable Icon Database by default in Qt DRT

Unskip:

http/tests/misc/favicon-loads-with-images-disabled.html
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=37382

Add support for layoutTestController.setIconDatabaseEnabled and layoutTestController.disableImageLoading().
The XFrameOptions tests were failing because of an extra resource load callback for favicon.ico requests.
These extra callbacks are removed by supporting both of the above layoutTestContoller commands.

  • DumpRenderTree/qt/DumpRenderTreeQt.cpp: (WebCore::WebPage::resetSettings): (WebCore::DumpRenderTree::DumpRenderTree):
  • DumpRenderTree/qt/DumpRenderTreeQt.h: (WebCore::DumpRenderTree::drtStoragePath):
  • DumpRenderTree/qt/LayoutTestControllerQt.cpp: (LayoutTestController::reset): (LayoutTestController::disableImageLoading): (LayoutTestController::setIconDatabaseEnabled):
  • DumpRenderTree/qt/LayoutTestControllerQt.h:
Location:
trunk
Files:
4 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r59616 r59623  
     12010-05-17  Robert Hogan  <robert@webkit.org>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        [Qt] Disable Icon Database by default in Qt DRT
     6
     7        Unskip:
     8         http/tests/misc/favicon-loads-with-images-disabled.html
     9         http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body.html
     10         http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny.html
     11         http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag.html
     12
     13        Qt returns 5 (QNetworkReply::OperationCanceledError) instead of -999 for the XFrameOptions tests,
     14        so update accordingly.
     15
     16        https://bugs.webkit.org/show_bug.cgi?id=37382
     17
     18        * platform/qt/Skipped:
     19        * platform/qt/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-expected.txt: Added. Qt returns 5 instead of -999.
     20        * platform/qt/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body-expected.txt: Added. Qt returns 5 instead of -999.
     21        * platform/qt/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny-expected.txt: Added. Qt returns 5 instead of -999.
     22
    1232010-05-17  David Hyatt  <hyatt@apple.com>
    224
  • trunk/LayoutTests/platform/qt/Skipped

    r59602 r59623  
    275275http/tests/xmlhttprequest/default-content-type-dashboard.html
    276276http/tests/xmlhttprequest/svg-created-by-xhr-disallowed-in-dashboard.html
    277 
    278 # Missing layoutTestController.setIconDatabaseEnabled()
    279 http/tests/misc/favicon-loads-with-images-disabled.html
    280277
    281278# Missing layoutTestController.setCustomPolicyDelegate()
     
    47524749
    47534750
    4754 # Have an additional line in results for GET of favicon.ico. Probably innocuous.
    4755 # https://bugs.webkit.org/show_bug.cgi?id=37382
    4756 http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body.html
    4757 http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny.html
    4758 http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag.html
    4759 
    47604751# Skip failing http/tests/security tests
    47614752http/tests/security/cross-frame-access-callback-explicit-domain-ALLOW.html
  • trunk/WebKitTools/ChangeLog

    r59595 r59623  
     12010-05-17  Robert Hogan  <robert@webkit.org>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        [Qt] Disable Icon Database by default in Qt DRT
     6
     7        Unskip:
     8         http/tests/misc/favicon-loads-with-images-disabled.html
     9         http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body.html
     10         http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny.html
     11         http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag.html
     12
     13        https://bugs.webkit.org/show_bug.cgi?id=37382
     14
     15        Add support for layoutTestController.setIconDatabaseEnabled and layoutTestController.disableImageLoading().
     16        The XFrameOptions tests were failing because of an extra resource load callback for favicon.ico requests.
     17        These extra callbacks are removed by supporting both of the above layoutTestContoller commands.
     18
     19        * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
     20        (WebCore::WebPage::resetSettings):
     21        (WebCore::DumpRenderTree::DumpRenderTree):
     22        * DumpRenderTree/qt/DumpRenderTreeQt.h:
     23        (WebCore::DumpRenderTree::drtStoragePath):
     24        * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
     25        (LayoutTestController::reset):
     26        (LayoutTestController::disableImageLoading):
     27        (LayoutTestController::setIconDatabaseEnabled):
     28        * DumpRenderTree/qt/LayoutTestControllerQt.h:
     29
    1302010-05-17  Fumitoshi Ukai  <ukai@chromium.org>
    231
  • trunk/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp

    r59580 r59623  
    189189    settings()->resetAttribute(QWebSettings::PluginsEnabled);
    190190    settings()->resetAttribute(QWebSettings::JavaScriptCanAccessClipboard);
     191    settings()->resetAttribute(QWebSettings::AutoLoadImages);
    191192
    192193    m_drt->layoutTestController()->setCaretBrowsingEnabled(false);
     
    340341    , m_enableTextOutput(false)
    341342    , m_singleFileMode(false)
     343    , m_persistentStoragePath(QString(getenv("DUMPRENDERTREE_TEMP")))
    342344{
    343345    DumpRenderTreeSupportQt::overwritePluginDirectories();
    344346
    345     char* dumpRenderTreeTemp = getenv("DUMPRENDERTREE_TEMP");
    346     if (dumpRenderTreeTemp)
    347         QWebSettings::enablePersistentStorage(QString(dumpRenderTreeTemp));
    348     else
    349         QWebSettings::enablePersistentStorage();
     347    QWebSettings::enablePersistentStorage(m_persistentStoragePath);
    350348
    351349    // create our primary testing page/view.
  • trunk/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.h

    r59076 r59623  
    8787    EventSender *eventSender() const { return m_eventSender; }
    8888    TextInputController *textInputController() const { return m_textInputController; }
     89    QString persistentStoragePath() const { return m_persistentStoragePath; }
    8990
    9091    QWebPage *createWindow();
     
    142143    bool m_enableTextOutput;
    143144    bool m_singleFileMode;
     145    QString m_persistentStoragePath;
    144146};
    145147
  • trunk/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp

    r59580 r59623  
    7171    DumpRenderTreeSupportQt::setWillSendRequestReturnsNull(false);
    7272    DumpRenderTreeSupportQt::setWillSendRequestClearHeaders(QStringList());
     73    setIconDatabaseEnabled(false);
    7374    emit hidePage();
    7475}
     
    457458void LayoutTestController::disableImageLoading()
    458459{
    459     // FIXME: Implement for testing fix for https://bugs.webkit.org/show_bug.cgi?id=27896
    460     // Also need to make sure image loading is re-enabled for each new test.
     460    m_drt->webPage()->settings()->setAttribute(QWebSettings::AutoLoadImages, false);
    461461}
    462462
     
    631631}
    632632
     633void LayoutTestController::setIconDatabaseEnabled(bool enable)
     634{
     635    if (enable && !m_drt->persistentStoragePath().isEmpty())
     636        QWebSettings::setIconDatabasePath(m_drt->persistentStoragePath());
     637    else
     638        QWebSettings::setIconDatabasePath(QString());
     639}
     640
    633641const unsigned LayoutTestController::maxViewWidth = 800;
    634642const unsigned LayoutTestController::maxViewHeight = 600;
  • trunk/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h

    r59573 r59623  
    170170    void setDatabaseQuota(int size);
    171171    void clearAllDatabases();
     172    void setIconDatabaseEnabled(bool enable);
    172173
    173174    void waitForPolicyDelegate();
Note: See TracChangeset for help on using the changeset viewer.