Title: [100053] trunk/Source/WebKit/qt
- Revision
- 100053
- Author
- [email protected]
- Date
- 2011-11-11 17:38:02 -0800 (Fri, 11 Nov 2011)
Log Message
[Qt] Skip tests when no network is present
https://bugs.webkit.org/show_bug.cgi?id=72031
Patch by Bruno de Oliveira Abinader <[email protected]> on 2011-11-11
Reviewed by Simon Hausmann.
Some benchmark tests requires network connection (they fetch data from
external URL's) and so they fail if no network is present. These tests
should be skipped instead.
* tests/benchmarks/loading/tst_loading.cpp:
(tst_Loading::load): Skip test if no network is present.
* tests/benchmarks/painting/tst_painting.cpp:
(tst_Painting::paint): Skip test if no network is present.
Modified Paths
Diff
Modified: trunk/Source/WebKit/qt/ChangeLog (100052 => 100053)
--- trunk/Source/WebKit/qt/ChangeLog 2011-11-12 01:37:06 UTC (rev 100052)
+++ trunk/Source/WebKit/qt/ChangeLog 2011-11-12 01:38:02 UTC (rev 100053)
@@ -1,3 +1,19 @@
+2011-11-11 Bruno de Oliveira Abinader <[email protected]>
+
+ [Qt] Skip tests when no network is present
+ https://bugs.webkit.org/show_bug.cgi?id=72031
+
+ Reviewed by Simon Hausmann.
+
+ Some benchmark tests requires network connection (they fetch data from
+ external URL's) and so they fail if no network is present. These tests
+ should be skipped instead.
+
+ * tests/benchmarks/loading/tst_loading.cpp:
+ (tst_Loading::load): Skip test if no network is present.
+ * tests/benchmarks/painting/tst_painting.cpp:
+ (tst_Painting::paint): Skip test if no network is present.
+
2011-11-11 Sheriff Bot <[email protected]>
Unreviewed, rolling out r99964.
Modified: trunk/Source/WebKit/qt/tests/benchmarks/loading/tst_loading.cpp (100052 => 100053)
--- trunk/Source/WebKit/qt/tests/benchmarks/loading/tst_loading.cpp 2011-11-12 01:37:06 UTC (rev 100052)
+++ trunk/Source/WebKit/qt/tests/benchmarks/loading/tst_loading.cpp 2011-11-12 01:38:02 UTC (rev 100053)
@@ -17,6 +17,8 @@
* Boston, MA 02110-1301, USA.
*/
+#include <QNetworkConfigurationManager>
+
#include <QtTest/QtTest>
#include <qwebframe.h>
@@ -61,6 +63,7 @@
void load();
private:
+ QNetworkConfigurationManager m_manager;
QWebView* m_view;
QWebPage* m_page;
};
@@ -92,6 +95,8 @@
{
QFETCH(QUrl, url);
+ if (!m_manager.isOnline())
+ QSKIP("This test requires an active network connection", SkipSingle);
QBENCHMARK {
m_view->load(url);
Modified: trunk/Source/WebKit/qt/tests/benchmarks/painting/tst_painting.cpp (100052 => 100053)
--- trunk/Source/WebKit/qt/tests/benchmarks/painting/tst_painting.cpp 2011-11-12 01:37:06 UTC (rev 100052)
+++ trunk/Source/WebKit/qt/tests/benchmarks/painting/tst_painting.cpp 2011-11-12 01:38:02 UTC (rev 100053)
@@ -17,6 +17,8 @@
* Boston, MA 02110-1301, USA.
*/
+#include <QNetworkConfigurationManager>
+
#include <QtTest/QtTest>
#include <qwebelement.h>
@@ -63,6 +65,7 @@
void textAreas();
private:
+ QNetworkConfigurationManager m_manager;
QWebView* m_view;
QWebPage* m_page;
};
@@ -92,6 +95,9 @@
{
QFETCH(QUrl, url);
+ if (!m_manager.isOnline())
+ QSKIP("This test requires an active network connection", SkipSingle);
+
m_view->load(url);
::waitForSignal(m_view, SIGNAL(loadFinished(bool)));
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes