summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2011-06-01 22:55:19 (GMT)
committerRohan McGovern <rohan.mcgovern@nokia.com>2011-06-01 22:55:19 (GMT)
commit0548b4f69d95dbd992cf60c8ab0f1225523b15e1 (patch)
treea3669b4d755cc1721681e424513ec7801146b2b3 /tests/auto
parent73fc68802d8c0c8d3d499b279782ce270f1c5bc6 (diff)
parente9ab8493053a7dd56cde058e736f46feafb378d0 (diff)
downloadQt-0548b4f69d95dbd992cf60c8ab0f1225523b15e1.zip
Qt-0548b4f69d95dbd992cf60c8ab0f1225523b15e1.tar.gz
Qt-0548b4f69d95dbd992cf60c8ab0f1225523b15e1.tar.bz2
Merge remote branch 'origin/4.7' into 4.8-from-4.7
Conflicts: src/declarative/declarative.pro tests/auto/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp9
-rw-r--r--tests/auto/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp44
-rw-r--r--tests/auto/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp29
3 files changed, 9 insertions, 73 deletions
diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
index 9b7b228..4bcd19b 100644
--- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -8029,7 +8029,16 @@ void tst_QGraphicsItem::sorting()
QGraphicsView view(&scene);
view.setResizeAnchor(QGraphicsView::NoAnchor);
view.setTransformationAnchor(QGraphicsView::NoAnchor);
+#ifdef Q_OS_SYMBIAN
+ // Adjust area in devices where scrollbars are thicker than 25 pixels as they will
+ // obstruct painting otherwise.
+ int scrollWidth = qMax(25, view.verticalScrollBar()->width());
+ int scrollHeight = qMax(25, view.horizontalScrollBar()->height());
+
+ view.resize(95 + scrollWidth, 75 + scrollHeight);
+#else
view.resize(120, 100);
+#endif
view.setFrameStyle(0);
view.show();
#ifdef Q_WS_X11
diff --git a/tests/auto/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp b/tests/auto/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp
index d29ef77..57bf583 100644
--- a/tests/auto/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp
+++ b/tests/auto/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp
@@ -62,7 +62,6 @@ public slots:
void cleanup();
private slots:
- void usedInThread(); // this test must be first, or it will falsely pass
void allConfigurations();
void defaultConfiguration();
void configurationFromIdentifier();
@@ -330,49 +329,6 @@ void tst_QNetworkConfigurationManager::configurationFromIdentifier()
QVERIFY(!invalid.isValid());
}
-class QNCMTestThread : public QThread
-{
-protected:
- virtual void run()
- {
- QNetworkConfigurationManager manager;
- preScanConfigs = manager.allConfigurations();
- QSignalSpy spy(&manager, SIGNAL(updateCompleted()));
- manager.updateConfigurations(); //initiate scans
- QTRY_VERIFY(spy.count() == 1); //wait for scan to complete
- configs = manager.allConfigurations();
- }
-public:
- QList<QNetworkConfiguration> configs;
- QList<QNetworkConfiguration> preScanConfigs;
-};
-
-// regression test for QTBUG-18795
-void tst_QNetworkConfigurationManager::usedInThread()
-{
-#if defined Q_OS_MAC && !defined (QT_NO_COREWLAN)
- QSKIP("QTBUG-19070 Mac CoreWlan plugin is broken", SkipAll);
-#else
- QNCMTestThread thread;
- connect(&thread, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
- thread.start();
- QTestEventLoop::instance().enterLoop(100); //QTRY_VERIFY could take ~90 seconds to time out in the thread
- QVERIFY(!QTestEventLoop::instance().timeout());
- qDebug() << "prescan:" << thread.preScanConfigs.count();
- qDebug() << "postscan:" << thread.configs.count();
-
- QNetworkConfigurationManager manager;
- QList<QNetworkConfiguration> preScanConfigs = manager.allConfigurations();
- QSignalSpy spy(&manager, SIGNAL(updateCompleted()));
- manager.updateConfigurations(); //initiate scans
- QTRY_VERIFY(spy.count() == 1); //wait for scan to complete
- QList<QNetworkConfiguration> configs = manager.allConfigurations();
- QCOMPARE(thread.configs, configs);
- //Don't compare pre scan configs, because these may be cached and therefore give different results
- //which makes the test unstable. The post scan results should have all configurations every time
- //QCOMPARE(thread.preScanConfigs, preScanConfigs);
-#endif
-}
QTEST_MAIN(tst_QNetworkConfigurationManager)
#include "tst_qnetworkconfigurationmanager.moc"
diff --git a/tests/auto/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp b/tests/auto/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp
index 136d4d8..45464ca 100644
--- a/tests/auto/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp
+++ b/tests/auto/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp
@@ -41,12 +41,10 @@
#include <QtTest/QTest>
-#include <QtTest/QTestEventLoop>
#include <qcoreapplication.h>
#include <qdebug.h>
#include <qnetworkproxy.h>
-#include <QThread>
#include <QNetworkConfiguration>
#include <QNetworkConfigurationManager>
#include <QNetworkSession>
@@ -78,7 +76,6 @@ public:
};
private slots:
- void systemProxyForQueryCalledFromThread();
void systemProxyForQuery() const;
#ifndef QT_NO_BEARERMANAGEMENT
void fromConfigurations();
@@ -138,32 +135,6 @@ void tst_QNetworkProxyFactory::systemProxyForQuery() const
QFAIL("One or more system proxy lookup failures occurred.");
}
-class QSPFQThread : public QThread
-{
-protected:
- virtual void run()
- {
- proxies = QNetworkProxyFactory::systemProxyForQuery(query);
- }
-public:
- QNetworkProxyQuery query;
- QList<QNetworkProxy> proxies;
-};
-
-//regression test for QTBUG-18799
-void tst_QNetworkProxyFactory::systemProxyForQueryCalledFromThread()
-{
- QUrl url(QLatin1String("http://qt.nokia.com"));
- QNetworkProxyQuery query(url);
- QSPFQThread thread;
- thread.query = query;
- connect(&thread, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
- thread.start();
- QTestEventLoop::instance().enterLoop(5);
- QVERIFY(thread.isFinished());
- QCOMPARE(thread.proxies, QNetworkProxyFactory::systemProxyForQuery(query));
-}
-
#ifndef QT_NO_BEARERMANAGEMENT
//Purpose of this test is just to check systemProxyForQuery doesn't hang or crash