Title: [87695] trunk/Source/WebKit/qt
Revision
87695
Author
caio.olive...@openbossa.org
Date
2011-05-30 12:02:21 -0700 (Mon, 30 May 2011)

Log Message

2011-05-30  Caio Marcelo de Oliveira Filho  <caio.olive...@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):

Modified Paths

Diff

Modified: trunk/Source/WebKit/qt/ChangeLog (87694 => 87695)


--- trunk/Source/WebKit/qt/ChangeLog	2011-05-30 18:28:08 UTC (rev 87694)
+++ trunk/Source/WebKit/qt/ChangeLog	2011-05-30 19:02:21 UTC (rev 87695)
@@ -1,3 +1,20 @@
+2011-05-30  Caio Marcelo de Oliveira Filho  <caio.olive...@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):
+
 2011-05-30  Noam Rosenthal  <noam.rosent...@nokia.com>
 
         Reviewed by Kenneth Rohde Christiansen.

Modified: trunk/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp (87694 => 87695)


--- trunk/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp	2011-05-30 18:28:08 UTC (rev 87694)
+++ trunk/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp	2011-05-30 19:02:21 UTC (rev 87695)
@@ -3134,8 +3134,10 @@
                  "</body>");
 
 
+    QSignalSpy loadSpy(&view, SIGNAL(loadFinished(bool)));
     view.setHtml(html);
-    ::waitForSignal(&view, SIGNAL(loadFinished(bool)));
+    ::waitForSignal(&view, SIGNAL(loadFinished(bool)), 200);
+    QCOMPARE(loadSpy.count(), 1);
 
     mainFrame->evaluateJavaScript("checkScrollbar();");
     QCOMPARE(mainFrame->documentElement().findAll("span").at(0).toPlainText(), QString("SUCCESS"));
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to