summaryrefslogtreecommitdiff
path: root/src/tests/protocolhandler_test.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-04-30 11:23:37 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-04-30 11:23:37 +0200
commitc896cc340d7e6e0878b3249c5792e6d88a12cf42 (patch)
treefd0a7a61ff1d07f301f2188de5cb6fa473134897 /src/tests/protocolhandler_test.cpp
parentA tiny improvement in the error page, showing a fat icon.. :) (diff)
downloadrekonq-c896cc340d7e6e0878b3249c5792e6d88a12cf42.tar.xz
A coding style round
Diffstat (limited to 'src/tests/protocolhandler_test.cpp')
-rw-r--r--src/tests/protocolhandler_test.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/tests/protocolhandler_test.cpp b/src/tests/protocolhandler_test.cpp
index a3c78c2f..dbf33684 100644
--- a/src/tests/protocolhandler_test.cpp
+++ b/src/tests/protocolhandler_test.cpp
@@ -33,18 +33,18 @@
class ProtocolhandlerTest : public QObject
{
Q_OBJECT
-
+
public slots:
void initTestCase();
void cleanupTestCase();
-
+
private slots:
void preHandling_data();
void preHandling();
void postHandling_data();
void postHandling();
-
+
private:
ProtocolHandler *handler;
};
@@ -62,8 +62,8 @@ void ProtocolhandlerTest::cleanupTestCase()
{
delete handler;
}
-
-
+
+
// -------------------------------------------
@@ -71,7 +71,7 @@ void ProtocolhandlerTest::preHandling_data()
{
QTest::addColumn<QString>("urlString");
QTest::addColumn<bool>("result");
-
+
QTest::newRow("mailto") << "mailto:me@here.com" << true ;
QTest::newRow("relative") << "google.it" << false ;
QTest::newRow("javascript") << "javascript:alertbox('hello')" << true ;
@@ -84,15 +84,15 @@ void ProtocolhandlerTest::preHandling_data()
void ProtocolhandlerTest::preHandling()
{
- QFETCH( QString, urlString );
- QFETCH( bool , result );
-
+ QFETCH(QString, urlString);
+ QFETCH(bool , result);
+
QWebView *view = new QWebView;
QWebFrame *frame = view->page()->mainFrame();
-
- QNetworkRequest request = QNetworkRequest( QUrl(urlString) );
- QCOMPARE( handler->preHandling( request, frame ) , result );
+ QNetworkRequest request = QNetworkRequest(QUrl(urlString));
+
+ QCOMPARE(handler->preHandling(request, frame) , result);
}
@@ -100,7 +100,7 @@ void ProtocolhandlerTest::postHandling_data()
{
QTest::addColumn<QString>("urlString");
QTest::addColumn<bool>("result");
-
+
QTest::newRow("mailto") << "mailto:me@here.com" << true ;
QTest::newRow("relative") << "google.it" << false ;
QTest::newRow("javascript") << "javascript:alertbox('hello')" << false ;
@@ -113,18 +113,18 @@ void ProtocolhandlerTest::postHandling_data()
void ProtocolhandlerTest::postHandling()
{
- QFETCH( QString, urlString );
- QFETCH( bool , result );
-
+ QFETCH(QString, urlString);
+ QFETCH(bool , result);
+
QWebView *view = new QWebView;
QWebFrame *frame = view->page()->mainFrame();
-
- QNetworkRequest request = QNetworkRequest( QUrl(urlString) );
- QCOMPARE( handler->postHandling( request, frame ) , result );
+ QNetworkRequest request = QNetworkRequest(QUrl(urlString));
+
+ QCOMPARE(handler->postHandling(request, frame) , result);
}
-
+
// -------------------------------------------
-QTEST_KDEMAIN(ProtocolhandlerTest,GUI)
+QTEST_KDEMAIN(ProtocolhandlerTest, GUI)
#include "protocolhandler_test.moc"