2009-12-07 Benjamin Poulain <benjamin.poulain@nokia.com>
authoreric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Dec 2009 15:31:42 +0000 (15:31 +0000)
committereric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Dec 2009 15:31:42 +0000 (15:31 +0000)
        Reviewed by Kenneth Rohde Christiansen.

        [Qt] Improve the autotests of QtWebkit
        https://bugs.webkit.org/show_bug.cgi?id=32216

        Remove the calls to qWait() of the autotest of QWebView

        * tests/qwebview/tst_qwebview.cpp:
        (tst_QWebView::reusePage):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@51767 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/qt/ChangeLog
WebKit/qt/tests/qwebview/tst_qwebview.cpp

index c7f52ea27fe409b9caf0a27d983fdf7588b39dd1..2c2722bd750454a527df3aa1e384f38fe044bd48 100644 (file)
@@ -1,3 +1,15 @@
+2009-12-07  Benjamin Poulain  <benjamin.poulain@nokia.com>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        [Qt] Improve the autotests of QtWebkit
+        https://bugs.webkit.org/show_bug.cgi?id=32216
+
+        Remove the calls to qWait() of the autotest of QWebView
+
+        * tests/qwebview/tst_qwebview.cpp:
+        (tst_QWebView::reusePage):
+
 2009-12-07  Benjamin Poulain  <benjamin.poulain@nokia.com>
 
         Reviewed by Kenneth Rohde Christiansen.
index 27daf38417f426067170bbbd12de4570d87048b7..bd2f1855974fe9c9f372aad4fa48f48077d5873d 100644 (file)
@@ -132,18 +132,18 @@ void tst_QWebView::reusePage()
     mainFrame->setHtml(html, QUrl::fromLocalFile(QDir::currentPath()));
     if (html.contains("</embed>")) {
         // some reasonable time for the PluginStream to feed test.swf to flash and start painting
-        QTest::qWait(2000);
+        waitForSignal(view1, SIGNAL(loadFinished(bool)), 2000);
     }
 
     view1->show();
-    QTest::qWait(2000);
+    QTest::qWaitForWindowShown(view1);
     delete view1;
     QVERIFY(page != 0); // deleting view must not have deleted the page, since it's not a child of view
 
     QWebView *view2 = new QWebView;
     view2->setPage(page);
     view2->show(); // in Windowless mode, you should still be able to see the plugin here
-    QTest::qWait(2000);
+    QTest::qWaitForWindowShown(view2);
     delete view2;
 
     delete page; // must not crash