summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebKit/qt
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2010-06-26 22:00:16 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2010-06-26 22:00:16 (GMT)
commit63e3ded08cc619993598462ca0f839b2239dd2c5 (patch)
tree31b55e2ca8f5efa747a9ea6b92ed23bdf928f175 /src/3rdparty/webkit/WebKit/qt
parentc049aff3ce283b9ba9a17a63aedaa70efb51ad09 (diff)
downloadQt-63e3ded08cc619993598462ca0f839b2239dd2c5.zip
Qt-63e3ded08cc619993598462ca0f839b2239dd2c5.tar.gz
Qt-63e3ded08cc619993598462ca0f839b2239dd2c5.tar.bz2
Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( fc13f9b396e1448cd71266f56ba7a93de5cf6ed9 )
Changes in WebKit/qt since the last update: * Benjamin's update/fixes to the backport of https://bugs.webkit.org/show_bug.cgi?id=33150
Diffstat (limited to 'src/3rdparty/webkit/WebKit/qt')
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.cpp26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.cpp
index d466ab5..5e8e8a9 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.cpp
@@ -29,7 +29,31 @@
#include <qdiriterator.h>
#include <qwebkitversion.h>
#include <qwebframe.h>
-
+#include <qtimer.h>
+#include <qsignalspy.h>
+
+/**
+ * Starts an event loop that runs until the given signal is received.
+ Optionally the event loop
+ * can return earlier on a timeout.
+ *
+ * \return \p true if the requested signal was received
+ * \p false on timeout
+ */
+static bool waitForSignal(QObject* obj, const char* signal, int timeout = 0)
+{
+ QEventLoop loop;
+ QObject::connect(obj, signal, &loop, SLOT(quit()));
+ QTimer timer;
+ QSignalSpy timeoutSpy(&timer, SIGNAL(timeout()));
+ if (timeout > 0) {
+ QObject::connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit()));
+ timer.setSingleShot(true);
+ timer.start(timeout);
+ }
+ loop.exec();
+ return timeoutSpy.isEmpty();
+}
class tst_QWebView : public QObject
{
Q_OBJECT