Changeset 87695 in webkit


Ignore:
Timestamp:
May 30, 2011 12:02:21 PM (13 years ago)
Author:
caio.oliveira@openbossa.org
Message:

2011-05-30 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>

Reviewed by Andreas Kling.

[Qt] Fix unnecessary wait in API autotest tst_QWebFrame::scrollbarsOff
https://bugs.webkit.org/show_bug.cgi?id=61711

The loadFinished() signal was emitted directly inside the call for setHtml, so
the test was waiting the loadFinished() signal with a big timeout. Change this by
a very small timeout and a verification with signal spy.

In practice, setHtml() will either directly call loadFinished() or queue it to
the next event loop run, and test will work for both situations.

  • tests/qwebframe/tst_qwebframe.cpp: (tst_QWebFrame::scrollbarsOff):
Location:
trunk/Source/WebKit/qt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/qt/ChangeLog

    r87694 r87695  
     12011-05-30  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
     2
     3        Reviewed by Andreas Kling.
     4
     5        [Qt] Fix unnecessary wait in API autotest tst_QWebFrame::scrollbarsOff
     6        https://bugs.webkit.org/show_bug.cgi?id=61711
     7
     8        The loadFinished() signal was emitted directly inside the call for setHtml, so
     9        the test was waiting the loadFinished() signal with a big timeout. Change this by
     10        a very small timeout and a verification with signal spy.
     11
     12        In practice, setHtml() will either directly call loadFinished() or queue it to
     13        the next event loop run, and test will work for both situations.
     14
     15        * tests/qwebframe/tst_qwebframe.cpp:
     16        (tst_QWebFrame::scrollbarsOff):
     17
    1182011-05-30  Noam Rosenthal  <noam.rosenthal@nokia.com>
    219
  • trunk/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp

    r86946 r87695  
    31353135
    31363136
     3137    QSignalSpy loadSpy(&view, SIGNAL(loadFinished(bool)));
    31373138    view.setHtml(html);
    3138     ::waitForSignal(&view, SIGNAL(loadFinished(bool)));
     3139    ::waitForSignal(&view, SIGNAL(loadFinished(bool)), 200);
     3140    QCOMPARE(loadSpy.count(), 1);
    31393141
    31403142    mainFrame->evaluateJavaScript("checkScrollbar();");
Note: See TracChangeset for help on using the changeset viewer.