Changeset 52118 in webkit


Ignore:
Timestamp:
Dec 14, 2009 2:09:13 PM (14 years ago)
Author:
eric@webkit.org
Message:

2009-12-14 Robert Hogan <robert@roberthogan.net>

Reviewed by Eric Seidel.

[Qt] Fix https://bugs.webkit.org/show_bug.cgi?id=32437

Amend the behaviour of DRT::notifyDone to dump only when
the page has finished loading.

This fix permits removal of the following tests from the Qt skipped list:
fast/forms/textarea-linewrap-dynamic.html
fast/forms/textarea-setvalue-submit.html
fast/forms/textarea-hard-linewrap-empty.html
fast/forms/submit-to-url-fragment.html
http/tests/misc/percent-sign-in-form-field-name.html
http/tests/security/escape-form-data-field-names.html

However it also requires the following two to be added to the skipped list:

http/tests/xmlhttprequest/access-control-basic-denied-preflight-cache.html
svg/custom/use-instanceRoot-as-event-target.xhtml

It appears the behaviour of notifyDone was masking problems with these two
tests.

  • platform/qt/Skipped:

2009-12-14 Robert Hogan <robert@roberthogan.net>

Reviewed by Eric Seidel.

[Qt] Fix https://bugs.webkit.org/show_bug.cgi?id=32437

Amend the behaviour of DRT::notifyDone to dump only when
the page has finished loading.

This fix permits removal of the following tests from the Qt skipped list:
fast/forms/textarea-linewrap-dynamic.html
fast/forms/textarea-setvalue-submit.html
fast/forms/textarea-hard-linewrap-empty.html
fast/forms/submit-to-url-fragment.html
http/tests/misc/percent-sign-in-form-field-name.html
http/tests/security/escape-form-data-field-names.html

However it also requires the following two to be added to the skipped list:

http/tests/xmlhttprequest/access-control-basic-denied-preflight-cache.html
svg/custom/use-instanceRoot-as-event-target.xhtml

It appears the behaviour of notifyDone was masking problems with these two
tests.

  • DumpRenderTree/qt/DumpRenderTree.cpp: (WebCore::DumpRenderTree::DumpRenderTree):
  • DumpRenderTree/qt/LayoutTestControllerQt.cpp: (LayoutTestController::reset): (LayoutTestController::processWork): (LayoutTestController::maybeDump): (LayoutTestController::notifyDone): (LayoutTestController::provisionalLoad):
  • DumpRenderTree/qt/LayoutTestControllerQt.h: (LayoutTestController::resetLoadFinished):
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r52117 r52118  
     12009-12-14  Robert Hogan  <robert@roberthogan.net>
     2
     3        Reviewed by Eric Seidel.
     4
     5        [Qt] Fix https://bugs.webkit.org/show_bug.cgi?id=32437
     6       
     7        Amend the behaviour of DRT::notifyDone to dump only when
     8        the page has finished loading.
     9       
     10        This fix permits removal of the following tests from the Qt skipped list:
     11        fast/forms/textarea-linewrap-dynamic.html
     12        fast/forms/textarea-setvalue-submit.html
     13        fast/forms/textarea-hard-linewrap-empty.html
     14        fast/forms/submit-to-url-fragment.html
     15        http/tests/misc/percent-sign-in-form-field-name.html
     16        http/tests/security/escape-form-data-field-names.html
     17       
     18        However it also requires the following two to be added to the skipped list:
     19       
     20        http/tests/xmlhttprequest/access-control-basic-denied-preflight-cache.html
     21        svg/custom/use-instanceRoot-as-event-target.xhtml
     22       
     23        It appears the behaviour of notifyDone was masking problems with these two
     24        tests.
     25
     26        * platform/qt/Skipped:
     27
    1282009-12-14  Robert Hogan  <robert@roberthogan.net>
    229
  • trunk/LayoutTests/platform/qt/Skipped

    r52117 r52118  
    48604860fast/forms/slider-transformed.html
    48614861fast/forms/slider-zoomed.html
    4862 fast/forms/submit-to-url-fragment.html
    48634862fast/forms/text-control-intrinsic-widths.html
    4864 fast/forms/textarea-hard-linewrap-empty.html
    4865 fast/forms/textarea-linewrap-dynamic.html
    48664863fast/forms/textarea-metrics.html
    4867 fast/forms/textarea-setvalue-submit.html
    48684864fast/history/back-forward-is-asynchronous.html
    48694865fast/history/window-open.html
     
    49874983http/tests/security/dataTransfer-set-data-file-url.html
    49884984http/tests/security/drag-over-remote-content-iframe.html
    4989 http/tests/security/escape-form-data-field-names.html
    49904985http/tests/security/host-compare-case-insensitive.html
    49914986http/tests/security/window-properties-clear-domain.html
     
    51805175fast/loader/input-element-page-cache-crash.html
    51815176
    5182 # [Qt][LayoutTestController] Output of document.write() is vanished by waitUntilDone()/notifyDone()
    5183 # https://bugs.webkit.org/show_bug.cgi?id=32437
    5184 http/tests/misc/percent-sign-in-form-field-name.html
    5185 
    51865177# Missing forward entries when dumping back/forward list.
    51875178# https://bugs.webkit.org/show_bug.cgi?id=32470
  • trunk/WebKitTools/ChangeLog

    r52113 r52118  
     12009-12-14  Robert Hogan  <robert@roberthogan.net>
     2
     3        Reviewed by Eric Seidel.
     4
     5        [Qt] Fix https://bugs.webkit.org/show_bug.cgi?id=32437
     6       
     7        Amend the behaviour of DRT::notifyDone to dump only when
     8        the page has finished loading.
     9       
     10        This fix permits removal of the following tests from the Qt skipped list:
     11        fast/forms/textarea-linewrap-dynamic.html
     12        fast/forms/textarea-setvalue-submit.html
     13        fast/forms/textarea-hard-linewrap-empty.html
     14        fast/forms/submit-to-url-fragment.html
     15        http/tests/misc/percent-sign-in-form-field-name.html
     16        http/tests/security/escape-form-data-field-names.html
     17       
     18        However it also requires the following two to be added to the skipped list:
     19       
     20        http/tests/xmlhttprequest/access-control-basic-denied-preflight-cache.html
     21        svg/custom/use-instanceRoot-as-event-target.xhtml
     22       
     23        It appears the behaviour of notifyDone was masking problems with these two
     24        tests.
     25
     26        * DumpRenderTree/qt/DumpRenderTree.cpp:
     27        (WebCore::DumpRenderTree::DumpRenderTree):
     28        * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
     29        (LayoutTestController::reset):
     30        (LayoutTestController::processWork):
     31        (LayoutTestController::maybeDump):
     32        (LayoutTestController::notifyDone):
     33        (LayoutTestController::provisionalLoad):
     34        * DumpRenderTree/qt/LayoutTestControllerQt.h:
     35        (LayoutTestController::resetLoadFinished):
     36
    1372009-12-14  Simon Hausmann  <hausmann@webkit.org>
    238
  • trunk/WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp

    r51715 r52118  
    333333    connect(m_page, SIGNAL(loadFinished(bool)),
    334334            m_controller, SLOT(maybeDump(bool)));
     335    // We need to connect to loadStarted() because notifyDone should only
     336    // dump results itself when the last page loaded in the test has finished loading.
     337    connect(m_page, SIGNAL(loadStarted()),
     338            m_controller, SLOT(resetLoadFinished()));
    335339
    336340    connect(m_page->mainFrame(), SIGNAL(titleChanged(const QString&)),
  • trunk/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp

    r51715 r52118  
    5555void LayoutTestController::reset()
    5656{
    57     m_isLoading = true;
     57    m_hasDumped = false;
     58    m_loadFinished = false;
    5859    m_textDump = false;
    5960    m_dumpBackForwardList = false;
     
    7980    if (WorkQueue::shared()->processWork() && !shouldWaitUntilDone()) {
    8081        emit done();
    81         m_isLoading = false;
     82        m_hasDumped = true;
    8283    }
    8384}
     
    8889    Q_ASSERT(sender() == m_topLoadingFrame->page());
    8990
     91    m_loadFinished = true;
    9092    // as the function is called on loadFinished, the test might
    9193    // already have dumped and thus no longer be active, thus
    9294    // bail out here.
    93     if (!m_isLoading)
     95    if (m_hasDumped)
    9496        return;
    9597
    96     m_topLoadingFrame = 0;
    9798    WorkQueue::shared()->setFrozen(true); // first complete load freezes the queue for the rest of this test
    98 
    99     if (!shouldWaitUntilDone()) {
    100         if (WorkQueue::shared()->count())
    101             QTimer::singleShot(0, this, SLOT(processWork()));
    102         else {
    103             if (success)
    104                 emit done();
    105             m_isLoading = false;
    106         }
     99    if (WorkQueue::shared()->count())
     100        QTimer::singleShot(0, this, SLOT(processWork()));
     101    else if (!shouldWaitUntilDone()) {
     102        if (success)
     103            emit done();
     104        m_hasDumped = true;
    107105    }
    108106}
     
    133131
    134132    m_timeoutTimer.stop();
     133    m_waitForDone = false;
     134
     135    // If the page has not finished loading (i.e. loadFinished() has not been emitted) then
     136    // content created by the likes of document.write() JS methods will not be available yet.
     137    // When the page has finished loading, maybeDump above will dump the results now that we have
     138    // just set shouldWaitUntilDone to false.
     139    if (!m_loadFinished)
     140        return;
     141
    135142    emit done();
    136143
    137144    // FIXME: investigate why always resetting these result in timeouts
    138     m_isLoading = false;
    139     m_waitForDone = false;
     145    m_hasDumped = true;
    140146    m_waitForPolicy = false;
    141147}
     
    209215{
    210216    QWebFrame* frame = qobject_cast<QWebFrame*>(sender());
    211     if (!m_topLoadingFrame && m_isLoading)
     217    if (!m_topLoadingFrame && !m_hasDumped)
    212218        m_topLoadingFrame = frame;
    213219}
  • trunk/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h

    r51715 r52118  
    5454public:
    5555    LayoutTestController(WebCore::DumpRenderTree* drt);
    56 
    57     bool isLoading() const { return m_isLoading; }
    58     void setLoading(bool loading) { m_isLoading = loading; }
    5956
    6057    bool shouldDumpAsText() const { return m_textDump; }
     
    116113    void setPopupBlockingEnabled(bool enable);
    117114    void setPOSIXLocale(const QString& locale);
     115    void resetLoadFinished() { m_loadFinished = false; }
    118116
    119117    bool pauseAnimationAtTimeOnElementWithId(const QString& animationName, double time, const QString& elementId);
     
    138136
    139137private:
    140     bool m_isLoading;
     138    bool m_hasDumped;
    141139    bool m_textDump;
    142140    bool m_dumpBackForwardList;
     
    149147    bool m_waitForPolicy;
    150148    bool m_handleErrorPages;
     149    bool m_loadFinished;
    151150
    152151    QBasicTimer m_timeoutTimer;
Note: See TracChangeset for help on using the changeset viewer.