Changeset 846 for trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebelement
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 deleted
- 3 edited
- 5 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/qwebelement.pro
r561 r846 1 TEMPLATE = app 2 TARGET = tst_qwebelement 3 include(../../../../WebKit.pri) 4 SOURCES += tst_qwebelement.cpp 5 RESOURCES += qwebelement.qrc 6 QT += testlib network 7 QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR 8 9 symbian { 10 TARGET.UID3 = 0xA000E53A 11 TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices 12 } 1 isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../.. 2 include(../tests.pri) 3 exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc -
trunk/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp
r561 r846 20 20 21 21 #include <QtTest/QtTest> 22 23 22 #include <qwebpage.h> 24 23 #include <qwidget.h> … … 26 25 #include <qwebframe.h> 27 26 #include <qwebelement.h> 27 28 28 //TESTED_CLASS= 29 29 //TESTED_FILES= 30 31 /**32 * Starts an event loop that runs until the given signal is received.33 Optionally the event loop34 * can return earlier on a timeout.35 *36 * \return \p true if the requested signal was received37 * \p false on timeout38 */39 static bool waitForSignal(QObject* obj, const char* signal, int timeout = 0)40 {41 QEventLoop loop;42 QObject::connect(obj, signal, &loop, SLOT(quit()));43 QTimer timer;44 QSignalSpy timeoutSpy(&timer, SIGNAL(timeout()));45 if (timeout > 0) {46 QObject::connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit()));47 timer.setSingleShot(true);48 timer.start(timeout);49 }50 loop.exec();51 return timeoutSpy.isEmpty();52 }53 30 54 31 class tst_QWebElement : public QObject … … 577 554 578 555 // in few seconds, the CSS should be completey loaded 579 QSignalSpy spy(m_page, SIGNAL(loadFinished(bool)));580 556 m_mainFrame->setHtml(html6); 581 QTest::qWait(200);557 200); 582 558 583 559 p = m_mainFrame->documentElement().findAll("p").at(0); … … 597 573 // in few seconds, the style should be completey loaded 598 574 m_mainFrame->setHtml(html7); 599 QTest::qWait(200);575 200); 600 576 601 577 p = m_mainFrame->documentElement().findAll("p").at(0);
Note:
See TracChangeset
for help on using the changeset viewer.