diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2012-12-10 02:09:41 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2012-12-10 02:09:41 +0100 |
commit | 288ace1df39dbea40cae66d0b04bfdefcd6cec70 (patch) | |
tree | 87c03b9dbfb330b7e743a45276d73de0cea0e950 /src/tests | |
parent | Lindsay's credits (diff) | |
download | rekonq-288ace1df39dbea40cae66d0b04bfdefcd6cec70.tar.xz |
WARNING COMMIT --> FIRST REKONQ 2 IMPORT
Preparing repo to merge rekonq2 code...
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/CMakeLists.txt | 183 | ||||
-rw-r--r-- | src/tests/findbar_test.cpp | 80 | ||||
-rw-r--r-- | src/tests/html/HTTP_tests.html | 601 | ||||
-rw-r--r-- | src/tests/html/charset_ISO_8859_1.html | 12 | ||||
-rw-r--r-- | src/tests/html/charset_NULL.html | 11 | ||||
-rw-r--r-- | src/tests/html/charset_UTF_8.html | 12 | ||||
-rw-r--r-- | src/tests/html/font_test.html | 24 | ||||
-rw-r--r-- | src/tests/html/js_window_close.html | 3 | ||||
-rw-r--r-- | src/tests/html/link_test.html | 165 | ||||
-rw-r--r-- | src/tests/html/test_with_dark_colors.html | 7 | ||||
-rw-r--r-- | src/tests/listitem_test.cpp | 95 | ||||
-rw-r--r-- | src/tests/mainview_test.cpp | 418 | ||||
-rw-r--r-- | src/tests/mainwindow_test.cpp | 70 | ||||
-rw-r--r-- | src/tests/networkaccessmanager_test.cpp | 68 | ||||
-rw-r--r-- | src/tests/protocolhandler_test.cpp | 131 | ||||
-rw-r--r-- | src/tests/sessionmanager_test.cpp | 73 | ||||
-rw-r--r-- | src/tests/tabbar_test.cpp | 152 | ||||
-rw-r--r-- | src/tests/urlbar_test.cpp | 75 | ||||
-rw-r--r-- | src/tests/walletbar_test.cpp | 70 | ||||
-rw-r--r-- | src/tests/webpage_test.cpp | 112 | ||||
-rw-r--r-- | src/tests/websnap_test.cpp | 69 | ||||
-rw-r--r-- | src/tests/webtab_test.cpp | 69 | ||||
-rw-r--r-- | src/tests/webview_test.cpp | 71 |
23 files changed, 0 insertions, 2571 deletions
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt deleted file mode 100644 index 560e7755..00000000 --- a/src/tests/CMakeLists.txt +++ /dev/null @@ -1,183 +0,0 @@ -##### ---------- General Settings ---------- - -SET( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} ) - -INCLUDE_DIRECTORIES ( ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_BINARY_DIR}/.. - ${CMAKE_CURRENT_SOURCE_DIR}/.. - ${CMAKE_CURRENT_SOURCE_DIR}/../adblock - ${CMAKE_CURRENT_SOURCE_DIR}/../analyzer - ${CMAKE_CURRENT_SOURCE_DIR}/../bookmarks - ${CMAKE_CURRENT_SOURCE_DIR}/../history - ${CMAKE_CURRENT_SOURCE_DIR}/../opensearch - ${CMAKE_CURRENT_SOURCE_DIR}/../settings - ${CMAKE_CURRENT_SOURCE_DIR}/../urlbar - ${KDE4_INCLUDES} - ${QT4_INCLUDES} -) - -##### ------------- findbar test - -kde4_add_unit_test( findbar_test findbar_test.cpp ) - -target_link_libraries( findbar_test - kdeinit_rekonq - ${KDE4_KDECORE_LIBS} - ${KDE4_KDEUI_LIBS} - ${QT_QTGUI_LIBRARY} - ${QT_QTTEST_LIBRARY} -) - -##### ------------- mainwindow test - -kde4_add_unit_test( mainwindow_test mainwindow_test.cpp ) - -target_link_libraries( mainwindow_test - kdeinit_rekonq - ${KDE4_KDECORE_LIBS} - ${KDE4_KDEUI_LIBS} - ${QT_QTTEST_LIBRARY} -) - -##### ------------- mainview test - -kde4_add_unit_test( mainview_test mainview_test.cpp ) - -target_link_libraries( mainview_test - kdeinit_rekonq - ${KDE4_KDECORE_LIBS} - ${KDE4_KDEUI_LIBS} - ${QT_QTTEST_LIBRARY} -) - -##### ------------- networkaccessmanager test - -kde4_add_unit_test( networkaccessmanager_test networkaccessmanager_test.cpp ) - -target_link_libraries( networkaccessmanager_test - kdeinit_rekonq - ${KDE4_KDECORE_LIBS} - ${KDE4_KDEUI_LIBS} - ${QT_QTTEST_LIBRARY} -) - -##### ------------- protocolhandler test - -kde4_add_unit_test( protocolhandler_test protocolhandler_test.cpp ) - -target_link_libraries( protocolhandler_test - kdeinit_rekonq - ${KDE4_KDECORE_LIBS} - ${KDE4_KDEUI_LIBS} - ${KDE4_KDEWEBKIT_LIBS} - ${QT_QTNETWORK_LIBRARY} - ${QT_QTTEST_LIBRARY} -) - -##### ------------- sessionmanager test - -kde4_add_unit_test( sessionmanager_test sessionmanager_test.cpp ) - -target_link_libraries( sessionmanager_test - kdeinit_rekonq - ${KDE4_KDECORE_LIBS} - ${KDE4_KDEUI_LIBS} - ${QT_QTTEST_LIBRARY} -) - -##### ------------- tabbar test - -kde4_add_unit_test( tabbar_test tabbar_test.cpp ) - -target_link_libraries( tabbar_test - kdeinit_rekonq - ${KDE4_KDECORE_LIBS} - ${KDE4_KDEUI_LIBS} - ${QT_QTTEST_LIBRARY} -) - -##### ------------- walletbar test - -kde4_add_unit_test( walletbar_test walletbar_test.cpp ) - -target_link_libraries( walletbar_test - kdeinit_rekonq - ${KDE4_KDECORE_LIBS} - ${KDE4_KDEUI_LIBS} - ${KDE4_KDEWEBKIT_LIBS} - ${QT_QTTEST_LIBRARY} -) - -##### ------------- webpage test - -kde4_add_unit_test( webpage_test webpage_test.cpp ) - -target_link_libraries( webpage_test - kdeinit_rekonq - ${KDE4_KDECORE_LIBS} - ${KDE4_KDEUI_LIBS} - ${KDE4_KDEWEBKIT_LIBS} - ${QT_QTTEST_LIBRARY} -) - -##### ------------- websnap test - -kde4_add_unit_test( websnap_test websnap_test.cpp ) - -target_link_libraries( websnap_test - kdeinit_rekonq - ${KDE4_KDECORE_LIBS} - ${KDE4_KDEUI_LIBS} - ${KDE4_KDEWEBKIT_LIBS} - ${QT_QTTEST_LIBRARY} -) - -##### ------------- webtab test - -kde4_add_unit_test( webtab_test webtab_test.cpp ) - -target_link_libraries( webtab_test - kdeinit_rekonq - ${KDE4_KDECORE_LIBS} - ${KDE4_KDEUI_LIBS} - ${KDE4_KDEWEBKIT_LIBS} - ${QT_QTTEST_LIBRARY} -) - -##### ------------- webview test - -kde4_add_unit_test( webview_test webview_test.cpp ) - -target_link_libraries( webview_test - kdeinit_rekonq - ${KDE4_KDECORE_LIBS} - ${KDE4_KDEUI_LIBS} - ${KDE4_KDEWEBKIT_LIBS} - ${QT_QTTEST_LIBRARY} -) - -##### ------------- urlbar test - -kde4_add_unit_test( urlbar_test urlbar_test.cpp ) - -target_link_libraries( urlbar_test - kdeinit_rekonq - ${KDE4_KDECORE_LIBS} - ${KDE4_KDEUI_LIBS} - ${KDE4_KDEWEBKIT_LIBS} - ${QT_QTTEST_LIBRARY} -) - -##### ------------- listitem test - -kde4_add_unit_test( listitem_test listitem_test.cpp ) - -target_link_libraries( listitem_test - kdeinit_rekonq - ${KDE4_KDECORE_LIBS} - ${KDE4_KDEUI_LIBS} - ${KDE4_KDEWEBKIT_LIBS} - ${QT_QTTEST_LIBRARY} -) - -############################################################ diff --git a/src/tests/findbar_test.cpp b/src/tests/findbar_test.cpp deleted file mode 100644 index 3efb2d7b..00000000 --- a/src/tests/findbar_test.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/* ============================================================ -* -* This file is a part of the rekonq project -* -* Copyright (C) 2009-2011 by Andrea Diamantini <adjam7 at gmail dot com> -* -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License as -* published by the Free Software Foundation; either version 2 of -* the License or (at your option) version 3 or any later version -* accepted by the membership of KDE e.V. (or its successor approved -* by the membership of KDE e.V.), which shall act as a proxy -* defined in Section 14 of version 3 of the license. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -* -* ============================================================ */ - - -#include <qtest_kde.h> - -#include <QtTest/QtTest> - -#include "findbar.h" -#include "mainwindow.h" - - -class FindBarTest : public QObject -{ - Q_OBJECT - -public Q_SLOTS: - void initTestCase(); - void cleanupTestCase(); - -private Q_SLOTS: - void matchCase(); - void notifyMatch(); - -private: - FindBar *bar; - MainWindow *w; -}; - - -// ------------------------------------------- - - -void FindBarTest::initTestCase() -{ - w = new MainWindow; - bar = new FindBar(w); -} - - -void FindBarTest::cleanupTestCase() -{ - delete bar; -} - -void FindBarTest::matchCase() -{ - -} - -void FindBarTest::notifyMatch() -{ -} - -// ------------------------------------------- - -QTEST_KDEMAIN(FindBarTest, GUI) -#include "findbar_test.moc" diff --git a/src/tests/html/HTTP_tests.html b/src/tests/html/HTTP_tests.html deleted file mode 100644 index 7a5ac00d..00000000 --- a/src/tests/html/HTTP_tests.html +++ /dev/null @@ -1,601 +0,0 @@ -<html> - -<head> -<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> -<title>Test Cases for HTTP Content-Disposition header and RFC 2231/2047 Encoding</title> - -<style type="text/css"> -a.plain { - color: black; - text-decoration: none; -} -body { - color: black; - font-family: verdana, helvetica, arial, sans-serif; - font-size: 10pt; - margin-left: 2em; -} -h1 { - font-size: 18pt; -} -h2 { - font-size: 14pt; -} -h3 { - font-size: 12pt; -} -h4 { - font-size: 10pt; -} -pre { - border-style: dotted; - border-width: 1px; - background-color: #f0f0f0; -} -pre.invalid { - border-style: dotted; - border-width: 1px; - background-color: #ff8080; -} -table { - font-size: 9pt; -} -table.aside { - float: right; - margin: 4px; - border-style: dotted; - border-width: 1px; - background-color: #f0f0f0; -} -q { - font-style: italic; -} -th { - text-align: right; - vertical-align: top; -} -h2, h3, h4 { - clear: both; -} -.fail { - background-color: #ffd0d0; -} -.warn { - background-color: #ffff80; -} -.pass { - background-color: #d0ffd0; -} -.unsupported { - background-color: #e0e0e0; -} - -</style> - -</head> - -<body> - -<h1>Test Cases for HTTP Content-Disposition header and RFC 2231/2047 Encoding</h1> - - -<h2>Test Cases</h2><div id="c-d-inline"><h3><a href="#c-d-inline" class="plain">Content-Disposition: Disposition-Type Inline</a></h3> - <p> - Various tests relating to the "inline" disposition type, see - <a href="http://greenbytes.de/tech/webdav/rfc2183.html#rfc.section.2.1">Section 2.1 of RFC 2183</a>. - </p> - <div id="inlonly"><h4><a href="#inlonly" class="plain">inlonly</a> - [<a href="http://greenbytes.de/tech/tc2231/inlonly.asis">TEST</a>] - </h4><pre><b>Content-Disposition: </b>inline</pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="pass"><td>FF3</td><td>pass</td></tr><tr class="pass"><td>MSIE8</td><td>pass</td></tr><tr class="pass"><td>Op10</td><td>pass</td></tr><tr class="pass"><td>Saf4</td><td>pass</td></tr><tr class="pass"><td>Konq</td><td>pass</td></tr><tr class="pass"><td>Chrome</td><td>pass</td></tr></tbody></table><p>'inline' only</p><p><em>This should be equivalent to not including the header at all.</em></p></div><div id="inlwithasciifilename"><h4><a href="#inlwithasciifilename" class="plain">inlwithasciifilename</a> - [<a href="http://greenbytes.de/tech/tc2231/inlwithasciifilename.asis">TEST</a>] - </h4><pre><b>Content-Disposition: </b>inline; filename="<b>foo.html</b>"</pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="pass"><td>FF3</td><td>pass - (uses the filename in subsequent 'save' operation) - </td></tr><tr class="pass"><td>MSIE8</td><td>pass - (filename information not used) - </td></tr><tr class="pass"><td>Op10</td><td>pass - (filename information not used) - </td></tr><tr class="pass"><td>Saf4</td><td>pass - (filename information not used) - </td></tr><tr class="pass"><td>Konq</td><td>pass - (filename information not used) - </td></tr><tr class="pass"><td>Chrome</td><td>pass - (filename information not used) - </td></tr></tbody></table><p> - 'inline', specifying a filename of <code>foo.html</code> - </p><p><em> - Some UAs use this filename in a subsequent "save" operation. - </em></p></div><div id="inlwithasciifilenamepdf"><h4><a href="#inlwithasciifilenamepdf" class="plain">inlwithasciifilenamepdf</a> - [<a href="http://greenbytes.de/tech/tc2231/inlwithasciifilenamepdf.asis">TEST</a>] - </h4><pre><b>Content-Disposition: </b>inline; filename="<b>foo.pdf</b>"</pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="pass"><td>FF3</td><td>pass - (filename information not used) - </td></tr><tr class="pass"><td>MSIE8</td><td>pass - (filename information not used) - </td></tr><tr class="pass"><td>Op10</td><td>pass - (filename information not used) - </td></tr><tr class="pass"><td>Saf4</td><td>pass - (filename information not used) - </td></tr><tr class="pass"><td>Konq</td><td>pass - (filename information not used) - </td></tr><tr class="pass"><td>Chrome</td><td>pass - (filename information not used) - </td></tr></tbody></table><p> - 'inline', specifying a filename of <code>foo.pdf</code> - </p><p><em> - Some UAs use this filename in a subsequent "save" operation. - This variation of the test checks whether whatever handles PDF display - receives the filename information, and acts upon it - (this was tested with the latest Acrobat Reader plugin). - </em></p></div></div><div id="c-d-attachment"><h3><a href="#c-d-attachment" class="plain">Content-Disposition: Disposition-Type Attachment</a></h3> - <p> - Various tests relating to the "attchment" disposition type, see - <a href="http://greenbytes.de/tech/webdav/rfc2183.html#rfc.section.2.2">Section 2.2 of RFC 2183</a>. - </p> - <div id="attonly"><h4><a href="#attonly" class="plain">attonly</a> - [<a href="http://greenbytes.de/tech/tc2231/attonly.asis">TEST</a>] - </h4><pre><b>Content-Disposition: </b>attachment</pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="pass"><td>FF3</td><td>pass</td></tr><tr class="pass"><td>MSIE8</td><td>pass</td></tr><tr class="pass"><td>Op10</td><td>pass</td></tr><tr class="pass"><td>Saf4</td><td>pass</td></tr><tr class="pass"><td>Konq</td><td>pass</td></tr><tr class="pass"><td>Chrome</td><td>pass</td></tr></tbody></table><p>'attachment' only</p><p><em>UA should offer to download the resource.</em></p></div><div id="attonlyucase"><h4><a href="#attonlyucase" class="plain">attonlyucase</a> - [<a href="http://greenbytes.de/tech/tc2231/attonlyucase.asis">TEST</a>] - </h4><pre><b>Content-Disposition: </b>ATTACHMENT</pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="pass"><td>FF3</td><td>pass</td></tr><tr class="pass"><td>MSIE8</td><td>pass</td></tr><tr class="pass"><td>Op10</td><td>pass</td></tr><tr class="pass"><td>Saf4</td><td>pass</td></tr><tr class="fail"><td>Konq</td><td>fail</td></tr><tr class="pass"><td>Chrome</td><td>pass</td></tr></tbody></table><p>'ATTACHMENT' only</p><p><em>UA should offer to download the resource.</em></p></div><div id="attwithasciifilename"><h4><a href="#attwithasciifilename" class="plain">attwithasciifilename</a> - [<a href="http://greenbytes.de/tech/tc2231/attwithasciifilename.asis">TEST</a>] - </h4><pre><b>Content-Disposition: </b>attachment; filename="<b>foo.html</b>"</pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="pass"><td>FF3</td><td>pass</td></tr><tr class="pass"><td>MSIE8</td><td>pass</td></tr><tr class="pass"><td>Op10</td><td>pass</td></tr><tr class="pass"><td>Saf4</td><td>pass</td></tr><tr class="pass"><td>Konq</td><td>pass</td></tr><tr class="pass"><td>Chrome</td><td>pass</td></tr></tbody></table><p> - 'attachment', specifying a filename of <code>foo.html</code> - </p><p><em>UA should offer to download the resource as "foo.html".</em></p></div><div id="attwithasciifnescapedchar"><h4><a href="#attwithasciifnescapedchar" class="plain">attwithasciifnescapedchar</a> - [<a href="http://greenbytes.de/tech/tc2231/attwithasciifnescapedchar.asis">TEST</a>] - </h4><pre><b>Content-Disposition: </b>attachment; filename="<b>f\oo.html</b>"</pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="fail"><td>FF3</td><td>fail - (apparently does not treat the backslash as escape character, replaces it with '_') - </td></tr><tr class="fail"><td>MSIE8</td><td>fail - (apparently does not treat the backslash as escape character, replaces it with '_') - </td></tr><tr class="pass"><td>Op10</td><td>pass</td></tr><tr class="fail"><td>Saf4</td><td>fail - (apparently does not treat the backslash as escape character, replaces it with '-') - </td></tr><tr class="pass"><td>Konq</td><td>pass</td></tr><tr class="fail"><td>Chrome</td><td>fail - (saves "oo.html" (what's going on here?)) - </td></tr></tbody></table><p> - 'attachment', specifying a filename of <code>f\oo.html</code> (the first 'o' being escaped) - </p><p><em>UA should offer to download the resource as "foo.html".</em></p></div><div id="attwithfilenameandextparam"><h4><a href="#attwithfilenameandextparam" class="plain">attwithfilenameandextparam</a> - [<a href="http://greenbytes.de/tech/tc2231/attwithfilenameandextparam.asis">TEST</a>] - </h4><pre><b>Content-Disposition: </b>attachment; foo="bar"; filename="<b>foo.html</b>"</pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="pass"><td>FF3</td><td>pass</td></tr><tr class="pass"><td>MSIE8</td><td>pass</td></tr><tr class="pass"><td>Op10</td><td>pass</td></tr><tr class="pass"><td>Saf4</td><td>pass</td></tr><tr class="pass"><td>Konq</td><td>pass</td></tr><tr class="pass"><td>Chrome</td><td>pass</td></tr></tbody></table><p> - 'attachment', specifying a filename of <code>foo.html</code> - and an extension parameter "foo" which should be ignored - (see <a href="http://greenbytes.de/tech/webdav/rfc2183.html#rfc.section.2.8">Section 2.8 of RFC 2183</a>.). - </p><p><em>UA should offer to download the resource as "foo.html".</em></p></div><div id="attwithasciifilenameucase"><h4><a href="#attwithasciifilenameucase" class="plain">attwithasciifilenameucase</a> - [<a href="http://greenbytes.de/tech/tc2231/attwithasciifilenameucase.asis">TEST</a>] - </h4><pre><b>Content-Disposition: </b>attachment; FILENAME="<b>foo.html</b>"</pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="pass"><td>FF3</td><td>pass</td></tr><tr class="pass"><td>MSIE8</td><td>pass</td></tr><tr class="pass"><td>Op10</td><td>pass</td></tr><tr class="pass"><td>Saf4</td><td>pass</td></tr><tr class="fail"><td>Konq</td><td>fail - (filename parameter is ignored) - </td></tr><tr class="pass"><td>Chrome</td><td>pass</td></tr></tbody></table><p> - 'attachment', specifying a filename of <code>foo.html</code> - </p><p><em>UA should offer to download the resource as "foo.html".</em></p></div><div id="attwithasciifilenamenq"><h4><a href="#attwithasciifilenamenq" class="plain">attwithasciifilenamenq</a> - [<a href="http://greenbytes.de/tech/tc2231/attwithasciifilenamenq.asis">TEST</a>] - </h4><pre class="invalid"><b>Content-Disposition: </b>attachment; filename=<b>foo.html</b></pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="warn"><td>FF3</td><td>warn - (accepts the unquoted value) - </td></tr><tr class="warn"><td>MSIE8</td><td>warn - (accepts the unquoted value) - </td></tr><tr class="warn"><td>Op10</td><td>warn - (accepts the unquoted value) - </td></tr><tr class="warn"><td>Saf4</td><td>warn - (accepts the unquoted value) - </td></tr><tr class="warn"><td>Konq</td><td>warn - (accepts the unquoted value) - </td></tr><tr class="warn"><td>Chrome</td><td>warn - (accepts the unquoted value) - </td></tr></tbody></table><p> - 'attachment', specifying a filename of <code>foo.html</code>, but missing - the quotes. - </p><p><em>This is invalid according to <a href="http://greenbytes.de/tech/webdav/rfc2616.html#rfc.section.19.5.1">Section 19.5.1 of RFC2616</a>, so UAs should - ignore it.</em></p></div><div id="attwithisofnplain"><h4><a href="#attwithisofnplain" class="plain">attwithisofnplain</a> - [<a href="http://greenbytes.de/tech/tc2231/attwithisofnplain.asis">TEST</a>] - </h4><pre><b>Content-Disposition: </b>attachment; filename="<b>foo-ä.html</b>"</pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="pass"><td>FF3</td><td>pass</td></tr><tr class="pass"><td>MSIE8</td><td>pass</td></tr><tr class="pass"><td>Op10</td><td>pass</td></tr><tr class="pass"><td>Saf4</td><td>pass</td></tr><tr class="pass"><td>Konq</td><td>pass</td></tr><tr class="pass"><td>Chrome</td><td>pass</td></tr></tbody></table><p> - 'attachment', specifying a filename of <code>foo-ä.html</code>, using plain ISO-8859-1 - </p><p><em>UA should offer to download the resource as "foo-ä.html".</em></p></div><div id="attwithutf8fnplain"><h4><a href="#attwithutf8fnplain" class="plain">attwithutf8fnplain</a> - [<a href="http://greenbytes.de/tech/tc2231/attwithutf8fnplain.asis">TEST</a>] - </h4><pre><b>Content-Disposition: </b>attachment; filename="<b>foo-ä.html</b>"</pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="fail"><td>FF3</td><td>fail - (decodes as UTF-8) - </td></tr><tr class="pass"><td>MSIE8</td><td>pass</td></tr><tr class="pass"><td>Op10</td><td>pass</td></tr><tr class="pass"><td>Saf4</td><td>pass</td></tr><tr class="pass"><td>Konq</td><td>pass</td></tr><tr class="fail"><td>Chrome</td><td>fail - (decodes as UTF-8) - </td></tr></tbody></table><p> - 'attachment', specifying a filename of <code>foo-ä.html</code>, - which happens to be <code>foo-ä.html</code> using UTF-8 encoding. - </p><p><em>UA should offer to download the resource as "foo-ä.html". - Displaying "foo-ä.html" instead indicates that the UA tried to be smart by detecting - something that happens to look like UTF-8.</em></p></div><div id="attwithfnrawpctenca"><h4><a href="#attwithfnrawpctenca" class="plain">attwithfnrawpctenca</a> - [<a href="http://greenbytes.de/tech/tc2231/attwithfnrawpctenca.asis">TEST</a>] - </h4><pre><b>Content-Disposition: </b>attachment; filename="<b>foo-%41.html</b>"</pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="pass"><td>FF3</td><td>pass</td></tr><tr class="fail"><td>MSIE8</td><td>fail - (displays "foo-A.html") - </td></tr><tr class="pass"><td>Op10</td><td>pass</td></tr><tr class="pass"><td>Saf4</td><td>pass</td></tr><tr class="pass"><td>Konq</td><td>pass</td></tr><tr class="fail"><td>Chrome</td><td>fail - (displays "foo-A.html" (see <a href="http://code.google.com/p/chromium/issues/detail?id=118">Chrome Issue 118</a>)) - </td></tr></tbody></table><p> - 'attachment', specifying a filename of <code>foo-%41.html</code> - </p><p><em>UA should offer to download the resource as "foo-%41.html". - Displaying "foo-A.html" instead would indicate that the UA has attempted - to percent-decode the parameter. - </em></p></div><div id="attwithfnrawpctenclong"><h4><a href="#attwithfnrawpctenclong" class="plain">attwithfnrawpctenclong</a> - [<a href="http://greenbytes.de/tech/tc2231/attwithfnrawpctenclong.asis">TEST</a>] - </h4><pre><b>Content-Disposition: </b>attachment; filename="<b>foo-%c3%a4-%e2%82%ac.html</b>"</pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="pass"><td>FF3</td><td>pass</td></tr><tr class="fail"><td>MSIE8</td><td>fail - (displays "foo-ä-€.html") - </td></tr><tr class="pass"><td>Op10</td><td>pass</td></tr><tr class="pass"><td>Saf4</td><td>pass</td></tr><tr class="pass"><td>Konq</td><td>pass</td></tr><tr class="fail"><td>Chrome</td><td>fail - (displays "foo-ä-€.html" (see <a href="http://code.google.com/p/chromium/issues/detail?id=118">Chrome Issue 118</a>)) - </td></tr></tbody></table><p> - 'attachment', specifying a filename of <code>foo-%c3%a4-%e2%82%ac.html</code>, using raw percent encoded UTF-8 - to represent <code>foo-ä-€.html</code> - </p><p><em>UA should offer to download the resource as "foo-%c3%a4-%e2%82%ac.html". - Displaying "foo-ä-€.html" instead would indicate that the UA has attempted - to percent-decode the parameter (using UTF-8). Displaying something else - would indicate that the UA tried to percent-decode, but used a different encoding. - </em></p></div><div id="attwithasciifilenamews1"><h4><a href="#attwithasciifilenamews1" class="plain">attwithasciifilenamews1</a> - [<a href="http://greenbytes.de/tech/tc2231/attwithasciifilenamews1.asis">TEST</a>] - </h4><pre><b>Content-Disposition: </b>attachment; filename ="<b>foo.html</b>"</pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="pass"><td>FF3</td><td>pass</td></tr><tr class="pass"><td>MSIE8</td><td>pass</td></tr><tr class="pass"><td>Op10</td><td>pass</td></tr><tr class="pass"><td>Saf4</td><td>pass</td></tr><tr class="pass"><td>Konq</td><td>pass</td></tr><tr class="pass"><td>Chrome</td><td>pass</td></tr></tbody></table><p> - 'attachment', specifying a filename of <code>foo.html</code>, with one - blank space <em>before</em> the equals character. - </p><p><em>UA should offer to download the resource as "foo.html".</em></p></div><div id="attwithasciifilenamews2"><h4><a href="#attwithasciifilenamews2" class="plain">attwithasciifilenamews2</a> - [<a href="http://greenbytes.de/tech/tc2231/attwithasciifilenamews2.asis">TEST</a>] - </h4><pre><b>Content-Disposition: </b>attachment; filename= "<b>foo.html</b>"</pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="pass"><td>FF3</td><td>pass</td></tr><tr class="pass"><td>MSIE8</td><td>pass</td></tr><tr class="pass"><td>Op10</td><td>pass</td></tr><tr class="pass"><td>Saf4</td><td>pass</td></tr><tr class="pass"><td>Konq</td><td>pass</td></tr><tr class="pass"><td>Chrome</td><td>pass</td></tr></tbody></table><p> - 'attachment', specifying a filename of <code>foo.html</code>, with one - blank space <em>after</em> the equals character. - </p><p><em>UA should offer to download the resource as "foo.html".</em></p></div><div id="attfnbrokentoken"><h4><a href="#attfnbrokentoken" class="plain">attfnbrokentoken</a> - [<a href="http://greenbytes.de/tech/tc2231/attfnbrokentoken.asis">TEST</a>] - </h4><pre class="invalid"><b>Content-Disposition: </b>attachment; filename=<b>foo[1](2).html</b></pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="warn"><td>FF3</td><td>warn - (accepts the unquoted value) - </td></tr><tr class="warn"><td>MSIE8</td><td>warn - (accepts the unquoted value) - </td></tr><tr class="warn"><td>Op10</td><td>warn - (accepts the unquoted value) - </td></tr><tr class="warn"><td>Saf4</td><td>warn - (accepts the unquoted value) - </td></tr><tr class="warn"><td>Konq</td><td>warn - (accepts the unquoted value) - </td></tr><tr class="warn"><td>Chrome</td><td>warn - (accepts the unquoted value) - </td></tr></tbody></table><p> - 'attachment', specifying a filename of <code>foo[1](2).html</code>, but missing - the quotes. Also, "[", "]", "(" and ")" are not allowed in the HTTP <a href="http://greenbytes.de/tech/webdav/draft-ietf-httpbis-p1-messaging-latest.html#rfc.section.1.2.2">token</a> - production. - </p><p><em>This is invalid according to <a href="http://greenbytes.de/tech/webdav/rfc2616.html#rfc.section.19.5.1">Section 19.5.1 of RFC2616</a>, - so UAs should ignore it.</em></p></div></div><div id="c-d-parms"><h3><a href="#c-d-parms" class="plain">Content-Disposition: Additional Parameters</a></h3> - <p> - Various tests relating to the additional parameters defined in - <a href="http://greenbytes.de/tech/webdav/rfc2183.html#rfc.section.2">Section 2 of RFC 2183</a>. - </p> - <div id="attcdate"><h4><a href="#attcdate" class="plain">attcdate</a> - [<a href="http://greenbytes.de/tech/tc2231/attcdate.asis">TEST</a>] - </h4><pre><b>Content-Disposition: </b>attachment; <b>creation-date="Wed, 12 Feb 1997 16:29:51 -0500"</b></pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="unsupported"><td>FF3</td><td>unsupported - (seems to ignore the parameter) - </td></tr><tr class="unsupported"><td>MSIE8</td><td>unsupported - (seems to ignore the parameter) - </td></tr><tr class="unsupported"><td>Op10</td><td>unsupported - (seems to ignore the parameter) - </td></tr><tr class="unsupported"><td>Saf4</td><td>unsupported - (seems to ignore the parameter) - </td></tr><tr class="unsupported"><td>Konq</td><td>unsupported - (seems to ignore the parameter) - </td></tr><tr class="unsupported"><td>Chrome</td><td>unsupported - (seems to ignore the parameter) - </td></tr></tbody></table><p>'attachment', plus creation-date (see <a href="http://greenbytes.de/tech/webdav/rfc2183.html#rfc.section.2.4">Section 2.4 of RFC 2183</a>)</p><p><em>UA should offer to download the resource. When doing so, - the creation date should be set to 12 Feb 1997.</em></p></div><div id="attmdate"><h4><a href="#attmdate" class="plain">attmdate</a> - [<a href="http://greenbytes.de/tech/tc2231/attmdate.asis">TEST</a>] - </h4><pre><b>Content-Disposition: </b>attachment; <b>modification-date="Wed, 12 Feb 1997 16:29:51 -0500"</b></pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="unsupported"><td>FF3</td><td>unsupported - (seems to ignore the parameter) - </td></tr><tr class="unsupported"><td>MSIE8</td><td>unsupported - (seems to ignore the parameter) - </td></tr><tr class="unsupported"><td>Op10</td><td>unsupported - (seems to ignore the parameter) - </td></tr><tr class="unsupported"><td>Saf4</td><td>unsupported - (seems to ignore the parameter) - </td></tr><tr class="unsupported"><td>Konq</td><td>unsupported - (seems to ignore the parameter) - </td></tr><tr class="unsupported"><td>Chrome</td><td>unsupported - (seems to ignore the parameter) - </td></tr></tbody></table><p>'attachment', plus modification-date (see <a href="http://greenbytes.de/tech/webdav/rfc2183.html#rfc.section.2.5">Section 2.5 of RFC 2183</a>)</p><p><em>UA should offer to download the resource. When doing so, - the modification date should be set to 12 Feb 1997.</em></p></div></div><div id="c-d-extension"><h3><a href="#c-d-extension" class="plain">Content-Disposition: Disposition-Type Extension</a></h3> - <p> - A test checking behavior for disposition type extensions, - which should be treated as "attachment", see - <a href="http://greenbytes.de/tech/webdav/rfc2183.html#rfc.section.2.8">Section 2.8 of RFC 2183</a>. - </p> - <div id="dispext"><h4><a href="#dispext" class="plain">dispext</a> - [<a href="http://greenbytes.de/tech/tc2231/dispext.asis">TEST</a>] - </h4><pre><b>Content-Disposition: </b>foobar</pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="pass"><td>FF3</td><td>pass</td></tr><tr class="fail (does not treat it as 'attachment')"><td>MSIE8</td><td>fail (does not treat it as 'attachment')</td></tr><tr class="fail (does not treat it as 'attachment')"><td>Op10</td><td>fail (does not treat it as 'attachment')</td></tr><tr class="fail (does not treat it as 'attachment')"><td>Saf4</td><td>fail (does not treat it as 'attachment')</td></tr><tr class="fail (does not treat it as 'attachment')"><td>Konq</td><td>fail (does not treat it as 'attachment')</td></tr><tr class="pass"><td>Chrome</td><td>pass</td></tr></tbody></table><p>'foobar' only</p><p><em>This should be equivalent to using "attachment".</em></p></div></div><div id="encoding-2231-char"><h3><a href="#encoding-2231-char" class="plain">RFC2231 Encoding: Character Sets</a></h3> - <p> - Various tests using the parameter value encoding defined - in <a href="http://greenbytes.de/tech/webdav/rfc2231.html#rfc.section.4">Section 4 of RFC 2231</a>. - </p> - <div id="attwithisofn2231iso"><h4><a href="#attwithisofn2231iso" class="plain">attwithisofn2231iso</a> - [<a href="http://greenbytes.de/tech/tc2231/attwithisofn2231iso.asis">TEST</a>] - </h4><pre><b>Content-Disposition: </b>attachment; filename*=<b>iso-8859-1''foo-%E4.html</b></pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="pass"><td>FF3</td><td>pass</td></tr><tr class="unsupported"><td>MSIE8</td><td>unsupported</td></tr><tr class="pass"><td>Op10</td><td>pass</td></tr><tr class="unsupported"><td>Saf4</td><td>unsupported</td></tr><tr class="unsupported"><td>Konq</td><td>unsupported</td></tr><tr class="unsupported"><td>Chrome</td><td>unsupported</td></tr></tbody></table><p> - 'attachment', specifying a filename of <code>foo-ä.html</code>, using RFC2231 encoded ISO-8859-1 - </p><p><em>UA should offer to download the resource as "foo-ä.html". - </em></p></div><div id="attwithfn2231utf8"><h4><a href="#attwithfn2231utf8" class="plain">attwithfn2231utf8</a> - [<a href="http://greenbytes.de/tech/tc2231/attwithfn2231utf8.asis">TEST</a>] - </h4><pre><b>Content-Disposition: </b>attachment; filename*=<b>UTF-8''foo-%c3%a4-%e2%82%ac.html</b></pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="pass"><td>FF3</td><td>pass</td></tr><tr class="unsupported"><td>MSIE8</td><td>unsupported</td></tr><tr class="pass"><td>Op10</td><td>pass</td></tr><tr class="unsupported"><td>Saf4</td><td>unsupported</td></tr><tr class="unsupported"><td>Konq</td><td>unsupported</td></tr><tr class="unsupported"><td>Chrome</td><td>unsupported</td></tr></tbody></table><p> - 'attachment', specifying a filename of <code>foo-ä-€.html</code>, using RFC2231 encoded UTF-8 - </p><p><em>UA should offer to download the resource as "foo-ä-€.html". - </em></p></div><div id="attwithfn2231noc"><h4><a href="#attwithfn2231noc" class="plain">attwithfn2231noc</a> - [<a href="http://greenbytes.de/tech/tc2231/attwithfn2231noc.asis">TEST</a>] - </h4><pre><b>Content-Disposition: </b>attachment; filename*=<b>''foo-%c3%a4-%e2%82%ac.html</b></pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="warn"><td>FF3</td><td>warn - (decodes as UTF-8) - </td></tr><tr class="unsupported"><td>MSIE8</td><td>unsupported</td></tr><tr class="warn"><td>Op10</td><td>warn - (decodes as 8bit encoding (ISO-8859-1?)) - </td></tr><tr class="unsupported"><td>Saf4</td><td>unsupported</td></tr><tr class="unsupported"><td>Konq</td><td>unsupported</td></tr><tr class="unsupported"><td>Chrome</td><td>unsupported</td></tr></tbody></table><p> - Behavior is undefined in RFC 2231, the charset part is missing, although UTF-8 was used. - </p></div><div id="attwithfn2231utf8comp"><h4><a href="#attwithfn2231utf8comp" class="plain">attwithfn2231utf8comp</a> - [<a href="http://greenbytes.de/tech/tc2231/attwithfn2231utf8comp.asis">TEST</a>] - </h4><pre><b>Content-Disposition: </b>attachment; filename*=<b>UTF-8''foo-a%cc%88.html</b></pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="pass"><td>FF3</td><td>pass</td></tr><tr class="unsupported"><td>MSIE8</td><td>unsupported</td></tr><tr class="warn"><td>Op10</td><td>warn - (displays "foo-ä.html") - </td></tr><tr class="unsupported"><td>Saf4</td><td>unsupported</td></tr><tr class="unsupported"><td>Konq</td><td>unsupported</td></tr><tr class="unsupported"><td>Chrome</td><td>unsupported</td></tr></tbody></table><p> - 'attachment', specifying a filename of <code>foo-ä.html</code>, using RFC2231 encoded UTF-8, but - choosing the decomposed form (lowercase a plus COMBINING DIAERESIS) -- - on a Windows target system, this should be translated to the preferred - Unicode normal form (composed). - </p><p><em>UA should offer to download the resource as "foo-ä.html". - </em></p></div><div id="attwithfn2231utf8-bad"><h4><a href="#attwithfn2231utf8-bad" class="plain">attwithfn2231utf8-bad</a> - [<a href="http://greenbytes.de/tech/tc2231/attwithfn2231utf8-bad.asis">TEST</a>] - </h4><pre class="invalid"><b>Content-Disposition: </b>attachment; filename*=<b>iso-8859-1''foo-%c3%a4-%e2%82%ac.html</b></pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="fail"><td>FF3</td><td>fail - (falls back to UTF-8) - </td></tr><tr class="unsupported"><td>MSIE8</td><td>unsupported</td></tr><tr class="warn"><td>Op10</td><td>warn - (displays the raw octet sequence as if it was ISO-8859-1 (which is internally - treated as windows-1252, which <em>does</em> allow %82)) - </td></tr><tr class="unsupported"><td>Saf4</td><td>unsupported</td></tr><tr class="unsupported"><td>Konq</td><td>unsupported</td></tr><tr class="unsupported"><td>Chrome</td><td>unsupported</td></tr></tbody></table><p> - 'attachment', specifying a filename of <code>foo-ä-€.html</code>, using RFC2231 encoded UTF-8, but declaring ISO-8859-1 - </p><p><em> - The octet %82 does not represent a valid ISO-8859-1 code point, so - the UA should really ignore the parameter. - </em></p></div><div id="attwithfn2231ws1"><h4><a href="#attwithfn2231ws1" class="plain">attwithfn2231ws1</a> - [<a href="http://greenbytes.de/tech/tc2231/attwithfn2231ws1.asis">TEST</a>] - </h4><pre class="invalid"><b>Content-Disposition: </b>attachment; filename<b> *=</b>UTF-8''foo-%c3%a4.html</pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="fail"><td>FF3</td><td>fail - (displays garbage) - </td></tr><tr class="unsupported"><td>MSIE8</td><td>unsupported</td></tr><tr class="pass"><td>Op10</td><td>pass</td></tr><tr class="unsupported"><td>Saf4</td><td>unsupported</td></tr><tr class="unsupported"><td>Konq</td><td>unsupported</td></tr><tr class="unsupported"><td>Chrome</td><td>unsupported</td></tr></tbody></table><p> - 'attachment', specifying a filename of <code>foo-ä.html</code>, using RFC2231 encoded UTF-8, with whitespace before "*=" - </p><p><em> - The parameter is invalid, thus should be ignored. - </em></p></div><div id="attwithfn2231ws2"><h4><a href="#attwithfn2231ws2" class="plain">attwithfn2231ws2</a> - [<a href="http://greenbytes.de/tech/tc2231/attwithfn2231ws2.asis">TEST</a>] - </h4><pre><b>Content-Disposition: </b>attachment; filename<b>*= </b>UTF-8''foo-%c3%a4.html</pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="pass"><td>FF3</td><td>pass</td></tr><tr class="unsupported"><td>MSIE8</td><td>unsupported</td></tr><tr class="pass"><td>Op10</td><td>pass</td></tr><tr class="unsupported"><td>Saf4</td><td>unsupported</td></tr><tr class="unsupported"><td>Konq</td><td>unsupported</td></tr><tr class="unsupported"><td>Chrome</td><td>unsupported</td></tr></tbody></table><p> - 'attachment', specifying a filename of <code>foo-ä.html</code>, using RFC2231 encoded UTF-8, with whitespace after "*=" - </p><p><em> - UA should offer to download the resource as "foo-ä.html". - </em></p></div><div id="attwithfn2231ws3"><h4><a href="#attwithfn2231ws3" class="plain">attwithfn2231ws3</a> - [<a href="http://greenbytes.de/tech/tc2231/attwithfn2231ws3.asis">TEST</a>] - </h4><pre><b>Content-Disposition: </b>attachment; filename<b>* =</b>UTF-8''foo-%c3%a4.html</pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="pass"><td>FF3</td><td>pass</td></tr><tr class="unsupported"><td>MSIE8</td><td>unsupported</td></tr><tr class="pass"><td>Op10</td><td>pass</td></tr><tr class="unsupported"><td>Saf4</td><td>unsupported</td></tr><tr class="unsupported"><td>Konq</td><td>unsupported</td></tr><tr class="unsupported"><td>Chrome</td><td>unsupported</td></tr></tbody></table><p> - 'attachment', specifying a filename of <code>foo-ä.html</code>, using RFC2231 encoded UTF-8, with whitespace inside "* =" - </p><p><em> - UA should offer to download the resource as "foo-ä.html". - </em></p></div><div id="attwithfn2231quot"><h4><a href="#attwithfn2231quot" class="plain">attwithfn2231quot</a> - [<a href="http://greenbytes.de/tech/tc2231/attwithfn2231quot.asis">TEST</a>] - </h4><pre class="invalid"><b>Content-Disposition: </b>attachment; filename*=<b>"</b>UTF-8''foo-%c3%a4.html<b>"</b></pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="fail"><td>FF3</td><td>fail - (tries to be helpful by removing the quotes) - </td></tr><tr class="unsupported"><td>MSIE8</td><td>unsupported</td></tr><tr class="pass"><td>Op10</td><td>pass</td></tr><tr class="unsupported"><td>Saf4</td><td>unsupported</td></tr><tr class="unsupported"><td>Konq</td><td>unsupported</td></tr><tr class="unsupported"><td>Chrome</td><td>unsupported</td></tr></tbody></table><p> - 'attachment', specifying a filename of <code>foo-ä.html</code>, using RFC2231 encoded UTF-8, with double quotes - around the parameter value. - </p><p><em> - The parameter is invalid, thus should be ignored. - </em></p></div><div id="attwithfn2231encmissing"><h4><a href="#attwithfn2231encmissing" class="plain">attwithfn2231encmissing</a> - [<a href="http://greenbytes.de/tech/tc2231/attwithfn2231encmissing.asis">TEST</a>] - </h4><pre class="invalid"><b>Content-Disposition: </b>attachment; filename*=<b>''foo-%c3%a4.html</b></pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="fail"><td>FF3</td><td>fail - (sniffs the encoding as UTF-8) - </td></tr><tr class="unsupported"><td>MSIE8</td><td>unsupported</td></tr><tr class="fail"><td>Op10</td><td>fail - (assumes a default of ISO-8859-1) - </td></tr><tr class="unsupported"><td>Saf4</td><td>unsupported</td></tr><tr class="unsupported"><td>Konq</td><td>unsupported</td></tr><tr class="unsupported"><td>Chrome</td><td>unsupported</td></tr></tbody></table><p> - 'attachment', specifying a filename of <code>foo-ä.html</code>, using RFC2231 encoded UTF-8, but - leaving out the charset field. - </p><p><em> - The parameter is invalid, thus should be ignored. - </em></p></div></div><div id="encoding-2231-cont"><h3><a href="#encoding-2231-cont" class="plain">RFC2231 Encoding: Continuations</a></h3> - <p> - Various tests using the parameter value continuation efined - in <a href="http://greenbytes.de/tech/webdav/rfc2231.html#rfc.section.3">Section 3 of RFC 2231</a>. - </p> - <div id="attfncont"><h4><a href="#attfncont" class="plain">attfncont</a> - [<a href="http://greenbytes.de/tech/tc2231/attfncont.asis">TEST</a>] - </h4><pre><b>Content-Disposition: </b>attachment; filename*0=<b>"foo."</b>; filename*1=<b>"html"</b></pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="pass"><td>FF3</td><td>pass</td></tr><tr class="unsupported"><td>MSIE8</td><td>unsupported</td></tr><tr class="pass"><td>Op10</td><td>pass</td></tr><tr class="unsupported"><td>Saf4</td><td>unsupported</td></tr><tr class="unsupported"><td>Konq</td><td>unsupported</td></tr><tr class="unsupported"><td>Chrome</td><td>unsupported</td></tr></tbody></table><p> - 'attachment', specifying a filename of <code>foo.html</code>, using RFC2231-style parameter continuations. - </p><p><em> - UA should offer to download the resource as "foo.html". - </em></p></div><div id="attfncontenc"><h4><a href="#attfncontenc" class="plain">attfncontenc</a> - [<a href="http://greenbytes.de/tech/tc2231/attfncontenc.asis">TEST</a>] - </h4><pre><b>Content-Disposition: </b>attachment; filename*0*=<b>UTF-8''foo-%c3%a4</b>; filename*1=<b>".html"</b></pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="pass"><td>FF3</td><td>pass</td></tr><tr class="unsupported"><td>MSIE8</td><td>unsupported</td></tr><tr class="pass"><td>Op10</td><td>pass</td></tr><tr class="unsupported"><td>Saf4</td><td>unsupported</td></tr><tr class="unsupported"><td>Konq</td><td>unsupported</td></tr><tr class="unsupported"><td>Chrome</td><td>unsupported</td></tr></tbody></table><p> - 'attachment', specifying a filename of <code>foo-ä.html</code>, using both RFC2231-style parameter continuations - and UTF-8 encoding. - </p><p><em> - UA should offer to download the resource as "foo-ä.html". - </em></p></div><div id="attfncontlz"><h4><a href="#attfncontlz" class="plain">attfncontlz</a> - [<a href="http://greenbytes.de/tech/tc2231/attfncontlz.asis">TEST</a>] - </h4><pre><b>Content-Disposition: </b>attachment; filename*0=<b>"foo"</b>; filename*01=<b>"bar"</b></pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="warn"><td>FF3</td><td>warn - (accepts leading zeros) - </td></tr><tr class="unsupported"><td>MSIE8</td><td>unsupported</td></tr><tr class="warn"><td>Op10</td><td>warn - (accepts leading zeros) - </td></tr><tr class="unsupported"><td>Saf4</td><td>unsupported</td></tr><tr class="unsupported"><td>Konq</td><td>unsupported</td></tr><tr class="unsupported"><td>Chrome</td><td>unsupported</td></tr></tbody></table><p> - 'attachment', specifying a filename of <code>foo</code> (the parameter filename*01 should be ignored because of the leading zero) - </p><p><em> - UA should offer to download the resource as "foo". - </em></p></div><div id="attfncontnc"><h4><a href="#attfncontnc" class="plain">attfncontnc</a> - [<a href="http://greenbytes.de/tech/tc2231/attfncontnc.asis">TEST</a>] - </h4><pre><b>Content-Disposition: </b>attachment; filename*0=<b>"foo"</b>; filename*2=<b>"bar"</b></pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="warn"><td>FF3</td><td>warn - (accepts gaps) - </td></tr><tr class="unsupported"><td>MSIE8</td><td>unsupported</td></tr><tr class="pass"><td>Op10</td><td>pass</td></tr><tr class="unsupported"><td>Saf4</td><td>unsupported</td></tr><tr class="unsupported"><td>Konq</td><td>unsupported</td></tr><tr class="unsupported"><td>Chrome</td><td>unsupported</td></tr></tbody></table><p> - 'attachment', specifying a filename of <code>foo</code> (the parameter filename*2 because there's no filename*1 parameter) - </p><p><em> - UA should offer to download the resource as "foo". - </em></p></div><div id="attfnconts1"><h4><a href="#attfnconts1" class="plain">attfnconts1</a> - [<a href="http://greenbytes.de/tech/tc2231/attfnconts1.asis">TEST</a>] - </h4><pre><b>Content-Disposition: </b>attachment; filename*1=<b>"foo."</b>; filename*2=<b>"html"</b></pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="pass"><td>FF3</td><td>pass</td></tr><tr class="unsupported"><td>MSIE8</td><td>unsupported</td></tr><tr class="pass"><td>Op10</td><td>pass</td></tr><tr class="unsupported"><td>Saf4</td><td>unsupported</td></tr><tr class="unsupported"><td>Konq</td><td>unsupported</td></tr><tr class="unsupported"><td>Chrome</td><td>unsupported</td></tr></tbody></table><p> - 'attachment' (the filename* parameters should be ignored because filename*0 is missing) - </p><p><em> - UA should offer to download, not getting the filename from the header. - </em></p></div><div id="attfncontord"><h4><a href="#attfncontord" class="plain">attfncontord</a> - [<a href="http://greenbytes.de/tech/tc2231/attfncontord.asis">TEST</a>] - </h4><pre><b>Content-Disposition: </b>attachment; filename*1=<b>"bar"</b>; filename*0=<b>"foo"</b></pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="fail"><td>FF3</td><td>fail - (parameters are expected to be ordered) - </td></tr><tr class="unsupported"><td>MSIE8</td><td>unsupported</td></tr><tr class="pass"><td>Op10</td><td>pass</td></tr><tr class="unsupported"><td>Saf4</td><td>unsupported</td></tr><tr class="unsupported"><td>Konq</td><td>unsupported</td></tr><tr class="unsupported"><td>Chrome</td><td>unsupported</td></tr></tbody></table><p> - 'attachment', specifying a filename of <code>foobar</code> - </p><p><em> - UA should offer to download the resource as "foobar". - </em></p></div></div><div id="encoding-2231-fb"><h3><a href="#encoding-2231-fb" class="plain">RFC2231 Encoding: Fallback Behaviour</a></h3> - <p> - This tests how the UA behaves when the same parameter name appear - both in traditional and RFC 2231 extended format. - </p> - <div id="attfnboth"><h4><a href="#attfnboth" class="plain">attfnboth</a> - [<a href="http://greenbytes.de/tech/tc2231/attfnboth.asis">TEST</a>] - </h4><pre><b>Content-Disposition: </b>attachment; filename="<b>foo-ae.html</b>"; filename*=<b>UTF-8''foo-%c3%a4.html</b></pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="pass"><td>FF3</td><td>pass - (picks the traditionally encoded value -- the first of both) - </td></tr><tr class="pass"><td>MSIE8</td><td>pass - (picks the traditionally encoded value -- the first of both) - </td></tr><tr class="pass"><td>Op10</td><td>pass - (picks the traditionally encoded value -- the first of both) - </td></tr><tr class="pass"><td>Saf4</td><td>pass - (picks the traditionally encoded value -- the first of both) - </td></tr><tr class="pass"><td>Konq</td><td>pass - (picks the traditionally encoded value -- the first of both) - </td></tr><tr class="pass"><td>Chrome</td><td>pass - (picks the traditionally encoded value -- the first of both) - </td></tr></tbody></table><p> - 'attachment', specifying a filename of <code>foo-ae.html</code> in - the traditional format, and <code>foo-ä.html</code> in RFC2231 format. - </p><p><em> - The behaviour of this undefined. Thus UAs should one of the two values. - </em></p></div><div id="attfnboth2"><h4><a href="#attfnboth2" class="plain">attfnboth2</a> - [<a href="http://greenbytes.de/tech/tc2231/attfnboth2.asis">TEST</a>] - </h4><pre><b>Content-Disposition: </b>attachment; filename*=<b>UTF-8''foo-%c3%a4.html</b>; filename=<b>"foo-ae.html"</b></pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="pass"><td>FF3</td><td>pass - (picks the RFC2231 encoded value -- the first of both) - </td></tr><tr class="fail"><td>MSIE8</td><td>fail - (ignores the parameter (this indicates a parsing bug)) - </td></tr><tr class="pass"><td>Op10</td><td>pass - (picks the RFC2231 encoded value -- the first of both) - </td></tr><tr class="pass"><td>Saf4</td><td>pass - (picks the traditionally encoded value -- the one it understands) - </td></tr><tr class="pass"><td>Konq</td><td>pass - (picks the traditionally encoded value -- the one it understands) - </td></tr><tr class="fail"><td>Chrome</td><td>fail - (ignores the parameter (this indicates a parsing bug)) - </td></tr></tbody></table><p> - 'attachment', specifying a filename of <code>foo-ae.html</code> in - the traditional format, and <code>foo-ä.html</code> in RFC2231 format. - </p><p><em> - The behaviour of this undefined. Thus UAs should one of the two values. - </em></p></div></div><div id="encoding-2047"><h3><a href="#encoding-2047" class="plain">RFC2047 Encoding</a></h3> - <p> - These tests RFC 2047 style encoding. - </p> - <p> - Note that according to <a href="http://greenbytes.de/tech/webdav/rfc2047.html#rfc.section.5">Section 5 of RFC 2047</a>, - this encoding does not apply here: <q cite="http://greenbytes.de/tech/webdav/rfc2047.html#rfc.section.5">An 'encoded-word' MUST NOT appear within a 'quoted-string'.</q>, and - <q cite="http://greenbytes.de/tech/webdav/rfc2047.html#rfc.section.5">An 'encoded-word' MUST NOT be used in parameter of a MIME - Content-Type or Content-Disposition field, or in any structured - field body except within a 'comment' or 'phrase'.</q> - </p> - <p> - Therefore, these tests are only be present in order to check - whether the UA by mistake tries to implement RFC2047. - </p> - <div id="attrfc2047token"><h4><a href="#attrfc2047token" class="plain">attrfc2047token</a> - [<a href="http://greenbytes.de/tech/tc2231/attrfc2047token.asis">TEST</a>] - </h4><pre><b>Content-Disposition: </b>attachment; filename=<b>=?ISO-8859-1?Q?foo-=E4.html?=</b></pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="fail"><td>FF3</td><td>fail - (decodes it anyway to "foo-ä.html") - </td></tr><tr class="pass"><td>MSIE8</td><td>pass - (takes the whole value as filename, but does not decode it (replacing question marks by underscores)) - </td></tr><tr class="fail"><td>Op10</td><td>fail - (displays garbage ("=.htm")) - </td></tr><tr class="pass"><td>Saf4</td><td>pass - (takes the whole value as filename, but does not decode it (replacing question marks by underscores)) - </td></tr><tr class="fail"><td>Konq</td><td>fail - (decodes it anyway to "foo-ä.html") - </td></tr><tr class="fail"><td>Chrome</td><td>fail - (decodes it anyway to "foo-ä.html") - </td></tr></tbody></table><p> - Uses RFC 2047 style encoded word. "=" is invalid inside the <code>token</code> - production, so this is invalid. - </p></div><div id="attrfc2047quoted"><h4><a href="#attrfc2047quoted" class="plain">attrfc2047quoted</a> - [<a href="http://greenbytes.de/tech/tc2231/attrfc2047quoted.asis">TEST</a>] - </h4><pre><b>Content-Disposition: </b>attachment; filename=<b>"=?ISO-8859-1?Q?foo-=E4.html?="</b></pre><table class="aside"><thead><tr><th colspan="2"> - Test Results - </th></tr></thead><tbody><tr class="fail"><td>FF3</td><td>fail - (decodes it anyway to "foo-ä.html") - </td></tr><tr class="pass"><td>MSIE8</td><td>pass - (takes the whole value as filename, but does not decode it) - </td></tr><tr class="fail"><td>Op10</td><td>fail - (displays garbage ("=.htm")) - </td></tr><tr class="pass"><td>Saf4</td><td>pass - (takes the whole value as filename, but does not decode it) - </td></tr><tr class="fail"><td>Konq</td><td>fail - (decodes it anyway to "foo-ä.html") - </td></tr><tr class="fail"><td>Chrome</td><td>fail - (decodes it anyway to "foo-ä.html") - </td></tr></tbody></table><p> - Uses RFC 2047 style encoded word, using the <code>quoted-string</code> production. - </p></div></div> -</body></html>
\ No newline at end of file diff --git a/src/tests/html/charset_ISO_8859_1.html b/src/tests/html/charset_ISO_8859_1.html deleted file mode 100644 index 587a8bb5..00000000 --- a/src/tests/html/charset_ISO_8859_1.html +++ /dev/null @@ -1,12 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> -<html> -<head> -<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> -<title>Charset ISO-8859-1</title> -</head> -<body> -CHARSET: ISO 8859 1<br /> -This document contains strange text: <br /> -Chinese text: ??, ????????? <br /> -</body> -</html> diff --git a/src/tests/html/charset_NULL.html b/src/tests/html/charset_NULL.html deleted file mode 100644 index 6e5598fa..00000000 --- a/src/tests/html/charset_NULL.html +++ /dev/null @@ -1,11 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> -<html> -<head> -<title>Charset NULL</title> -</head> -<body> -CHARSET: NULL<br /> -This document contains strange text: <br /> -Chinese text: ??, ????????? <br /> -</body> -</html> diff --git a/src/tests/html/charset_UTF_8.html b/src/tests/html/charset_UTF_8.html deleted file mode 100644 index cc63d0e1..00000000 --- a/src/tests/html/charset_UTF_8.html +++ /dev/null @@ -1,12 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> -<html> -<head> -<meta content="text/html; charset=utf8" http-equiv="content-type"> -<title>Charset UTF-8</title> -</head> -<body> -CHARSET: UTF-8<br /> -This document contains strange text: à è ì ò ù <br /> -Chinese text: 激光, 這兩個字是甚麼意思 <br /> -</body> -</html> diff --git a/src/tests/html/font_test.html b/src/tests/html/font_test.html deleted file mode 100644 index 2e889ea8..00000000 --- a/src/tests/html/font_test.html +++ /dev/null @@ -1,24 +0,0 @@ -<html> - -<head> -</head> - -<body> - -<p style="font-family:'Dejavu Sans'"> -This should be Dejavu Sans. -</p> - -<p style="font-family:'Dejavu Sans Mono'"> -This should be Dejavu Sans Mono. -</p> - -<p style="font-family:'Dejavu Serif'"> -This should be Dejavu Serif. -</p> - - -</body> - - -</html> diff --git a/src/tests/html/js_window_close.html b/src/tests/html/js_window_close.html deleted file mode 100644 index bf945bbc..00000000 --- a/src/tests/html/js_window_close.html +++ /dev/null @@ -1,3 +0,0 @@ -<form> -<input type=button value="Chiudi" onClick="javascript:window.close()" name="button"> -</form>
\ No newline at end of file diff --git a/src/tests/html/link_test.html b/src/tests/html/link_test.html deleted file mode 100644 index 8798f3bc..00000000 --- a/src/tests/html/link_test.html +++ /dev/null @@ -1,165 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> -<head> -<title>link tests</title> -</head> - -<body> - -<h1>Usual Link Tests</h1> - -<table border="1" width="100%"> -<tr> -<th>URL</th> -<th>Description</th> -<th>link</th> -<th>_blank link</th> -</tr> - -<tr> -<td>file:///home</td> -<td>Just a simple local url</td> -<td><a href="file:///home">link</a></td> -<td><a href="file:///home" target="_blank">link</a></td> -</tr> - -<tr> -<td>gg:ciao</td> -<td>KDE shortcut</td> -<td><a href="gg:ciao">link</a></td> -<td><a href="gg:ciao" target="_blank">link</a></td> -</tr> - -<tr> -<td>ftp://ftp.eutelia.it/</td> -<td>FTP test link</td> -<td><a href="ftp://ftp.eutelia.it/">link</a></td> -<td><a href="ftp://ftp.eutelia.it/" target="_blank">link</a></td> -</tr> - -<tr> -<td>http://kde-apps.org</td> -<td>kde apps let us test css, javascript, adblock, etc..</td> -<td><a href="http://kde-apps.org">link</a></td> -<td><a href="http://kde-apps.org" target="_blank">link</a></td> -</tr> - -<tr> -<td>http://pcimpact.com</td> -<td>PCImpact, a link to test adblock</td> -<td><a href="http://pcimpact.com">link</a></td> -<td><a href="http://pcimpact.com" target="_blank">link</a></td> -</tr> - -<tr> -<td>http://www.redhat.com/magazine/015jan06/features/valgrind/</td> -<td>Sporadic crashes here :(</td> -<td><a href="http://www.redhat.com/magazine/015jan06/features/valgrind/">link</a></td> -<td><a href="http://www.redhat.com/magazine/015jan06/features/valgrind/" target="_blank">link</a></td> -</tr> - -<tr> -<td>http://upg.de/</td> -<td>Doesn't work :(</td> -<td><a href="http://upg.de/">link</a></td> -<td><a href="http://upg.de/" target="_blank">link</a></td> -</tr> - -<tr> -<td>http://shop.upg.de/</td> -<td>The link the previous should open :(</td> -<td><a href="http://shop.upg.de/">link</a></td> -<td><a href="http://shop.upg.de/" target="_blank">link</a></td> -</tr> - -<tr> -<td>https://launchpad.net/</td> -<td>Test https link</td> -<td><a href="https://launchpad.net/">link</a></td> -<td><a href="https://launchpad.net/" target="_blank">link</a></td> -</tr> - -<tr> -<td>https://koesterreich.de/rekonq-test</td> -<td>SSL test link</td> -<td><a href="https://koesterreich.de/rekonq-test">link</a></td> -<td><a href="https://koesterreich.de/rekonq-test" target="_blank">link</a></td> -</tr> - -<tr> -<td>http://www.packtpub.com/article/developing-the-joomla-com</td> -<td>Some Crashes here :(</td> -<td><a href="http://www.packtpub.com/article/developing-the-joomla-com">link</a></td> -<td><a href="http://www.packtpub.com/article/developing-the-joomla-com" target="_blank">link</a></td> -</tr> - -<tr> -<td>http://jamendo.com</td> -<td>Bug 214321 (CSS hover popups)</td> -<td><a href="http://jamendo.com">link</a></td> -<td><a href="http://jamendo.com" target="_blank">link</a></td> -</tr> - -<tr> -<td>http://npaste.de/4h</td> -<td>WebKit problem with pre tag</td> -<td><a href="http://npaste.de/4h">link</a></td> -<td><a href="http://npaste.de/4h" target="_blank">link</a></td> -</tr> - -<tr> -<td>http://wiki.ubuntuusers.de/Bfilter</td> -<td>Some crashes signaled here (it works here!)</td> -<td><a href="http://wiki.ubuntuusers.de/Bfilter">link</a></td> -<td><a href="http://wiki.ubuntuusers.de/Bfilter" target="_blank">link</a></td> -</tr> - -<tr> -<td>http://service.futuremark.com/peacekeeper/index.action</td> -<td>rekonq 0.3 + Qt 4.6 seems crash here :(</td> -<td><a href="http://service.futuremark.com/peacekeeper/index.action">link</a></td> -<td><a href="http://service.futuremark.com/peacekeeper/index.action" target="_blank">link</a></td> -</tr> - -<tr> -<td>http://reddit.com</td> -<td>Bug 216738, difficult adding comments.</td> -<td><a href="http://reddit.com">link</a></td> -<td><a href="http://reddit.com" target="_blank">link</a></td> -</tr> - -<tr> -<td>http://www.osnews.com</td> -<td>AdBlock related problem</td> -<td><a href="http://www.osnews.com">link</a></td> -<td><a href="http://www.osnews.com" target="_blank">link</a></td> -</tr> - -<tr> -<td>http://ads.cnn.com/</td> -<td>Again, adblock problem :(</td> -<td><a href="http://ads.cnn.com/">link</a></td> -<td><a href="http://ads.cnn.com/" target="_blank">link</a></td> -</tr> - - -<tr> -<td>http://ja.wikipedia.org/wiki/特別:最近の更新</td> -<td>KGet import links with particular encoding</td> -<td><a href="http://ja.wikipedia.org/wiki/特別:最近の更新">link</a></td> -</tr> - -<tr> -<td></td> -<td></td> -<td><a href="">link</a></td> -<td><a href="" target="_blank">link</a></td> -</tr> - - -</table> - - -</body> - -</html> diff --git a/src/tests/html/test_with_dark_colors.html b/src/tests/html/test_with_dark_colors.html deleted file mode 100644 index 8bb20d74..00000000 --- a/src/tests/html/test_with_dark_colors.html +++ /dev/null @@ -1,7 +0,0 @@ -<html><head> -<meta http-equiv="content-type" content="text/html; charset=UTF-8"> - - </head><body><h1>Hello World!</h1> - <p>No colours are set (text or background). This is not legible -with a dark colour scheme in KDE.</p> - </body></html>
\ No newline at end of file diff --git a/src/tests/listitem_test.cpp b/src/tests/listitem_test.cpp deleted file mode 100644 index bfa22139..00000000 --- a/src/tests/listitem_test.cpp +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright 2010-2011 Pierre Rossi <pierre.rossi@gmail.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301 USA - */ - - - -#include <qtest_kde.h> - -#include "listitem.h" - - -class ListItemTest : public QObject -{ - Q_OBJECT - -public Q_SLOTS: - void initTestCase(); - void cleanupTestCase(); - -private Q_SLOTS: - - void wordHighLighting_data(); - void wordHighLighting(); - -}; - - -// ------------------------------------------- - -void ListItemTest::initTestCase() -{ -} - - -void ListItemTest::cleanupTestCase() -{ -} - - -// ------------------------------------------- - -void ListItemTest::wordHighLighting_data() -{ - QTest::addColumn<QString>("string"); - QTest::addColumn<QString>("wordsToHighlight"); - QTest::addColumn<QString>("expected"); - - QTest::newRow("plan b") << "<i>http://www.google.com/search?q=plan b&ie=UTF-8&oe=UTF-8</i>" - << "plan b" << "<i>http://www.google.com/search?q=<b>plan</b> <b>b</b>&ie=UTF-8&oe=UTF-8</i>"; - QTest::newRow("plan b #2") << "<i>http://en.wikipedia.org/wiki/Plan_B_(British_musician)</i>" - << "plan b" << "<i>http://en.wikipedia.org/wiki/<b>Plan</b>_<b>B</b>_(<b>B</b>ritish_musician)</i>"; - QTest::newRow("i") << "<i>http://i.imgur.com/jacoj.jpg</i>" << "i" - << "<i>http://<b>i</b>.<b>i</b>mgur.com/jacoj.jpg</i>"; - QTest::newRow("i#2") << "KDE - Experience Freedom!" << "i" << "KDE - Exper<b>i</b>ence Freedom!"; - QTest::newRow("i#3") << "The WebKit Open Source Project" << "i" << "The WebK<b>i</b>t Open Source Project"; - QTest::newRow("i#4") << "<i>http://webkit.org/</i>" << "i" << "<i>http://webk<b>i</b>t.org/</i>"; - QTest::newRow("b") << "<i>http://mail.google.com/mail/#inbox</i>" << "b" << "<i>http://mail.google.com/mail/#in<b>b</b>ox</i>"; - QTest::newRow("b#2") << "rekonq, WebKit KDE browser" << "b" << "rekonq, We<b>b</b>Kit KDE <b>b</b>rowser"; - QTest::newRow("<") << "Subject < Section < Wiki" << "<" << "Subject <b><</b> Section <b><</b> Wiki"; - QTest::newRow("&") << "<i>http://www.google.com/search?q=qt test&ie=UTF-8&oe=UTF-8</i>" << "&" - << "<i>http://www.google.com/search?q=qt test<b>&</b>ie=UTF-8<b>&</b>oe=UTF-8</i>"; - QTest::newRow("ciao") << "ciao" << "ciao" << "<b>ciao</b>"; - QTest::newRow("http://ciao") << "http://ciao" << "ciao" << "http://<b>ciao</b>"; -} - -void ListItemTest::wordHighLighting() -{ - QFETCH(QString, string); - QFETCH(QString, wordsToHighlight); - QFETCH(QString, expected); - - TextLabel test(string, wordsToHighlight); - QCOMPARE(test.text(), expected); -} - - -// ------------------------------------------- - -QTEST_KDEMAIN(ListItemTest, GUI) -#include "listitem_test.moc" diff --git a/src/tests/mainview_test.cpp b/src/tests/mainview_test.cpp deleted file mode 100644 index 8426dba1..00000000 --- a/src/tests/mainview_test.cpp +++ /dev/null @@ -1,418 +0,0 @@ -/* ============================================================ -* -* This file is a part of the rekonq project -* -* Copyright (C) 2008 by Benjamin C. Meyer <ben@meyerhome.net> -* Copyright (C) 2009-2011 by Andrea Diamantini <adjam7 at gmail dot com> -* -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License as -* published by the Free Software Foundation; either version 2 of -* the License or (at your option) version 3 or any later version -* accepted by the membership of KDE e.V. (or its successor approved -* by the membership of KDE e.V.), which shall act as a proxy -* defined in Section 14 of version 3 of the license. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -* -* ============================================================ */ - - -#include <qtest_kde.h> - -#include "mainwindow.h" -#include "mainview.h" -#include "webview.h" - - -class MainViewTest : public QObject -{ - Q_OBJECT - -public Q_SLOTS: - void initTestCase(); - void cleanupTestCase(); - -private Q_SLOTS: - void tabwidget_data(); - void tabwidget(); - - void closeTab_data(); - void closeTab(); - - void currentWebView_data(); - void currentWebView(); - - void newTab_data(); - void newTab(); - - void nextTab_data(); - void nextTab(); - - void previousTab_data(); - void previousTab(); - - void recentlyClosedTabs_data(); - void recentlyClosedTabs(); - - void setCurrentTitle_data(); - void setCurrentTitle(const QString &); - - void showStatusBarMessage_data(); - void showStatusBarMessage(const QString &); - - void currentChanged_data(); - void currentChanged(); - -private: - MainWindow *window; - MainView *view; -}; - - -// ------------------------------------------------------------------------------- - - -// This will be called before the first test function is executed. -// It is only called once. -void MainViewTest::initTestCase() -{ - window = new MainWindow; - view = window->mainView(); -} - -// This will be called after the last test function is executed. -// It is only called once. -void MainViewTest::cleanupTestCase() -{ -// delete window; // FIXME: this let the test fail. Why?? -} - -// ------------------------------------------- - -void MainViewTest::tabwidget_data() -{ -} - -void MainViewTest::tabwidget() -{ - QCOMPARE(view->currentIndex(), -1); - -// view->newTab(); -// QCOMPARE(view->currentIndex(), 1); -// view->newTab(); -// view->nextTab(); -// QCOMPARE(view->currentIndex(), 0); -// -// view->previousTab(); -// QCOMPARE(view->currentIndex(), 0); -} - -// ------------------------------------------- - -void MainViewTest::closeTab_data() -{ - QTest::addColumn<int>("index"); - QTest::newRow("null") << 0; -} - - -void MainViewTest::closeTab() -{ -// QFETCH(int, index); -// -// QSignalSpy spy1(view, SIGNAL(linkHovered(QString))); -// QSignalSpy spy2(view, SIGNAL(setCurrentTitle(QString))); -// QSignalSpy spy3(view, SIGNAL(tabsChanged())); -// QSignalSpy spy4(view, SIGNAL(lastTabClosed())); -// -// view->newTab(); -// view->closeTab(index); -// view->newTab(); -// view->closeTab(index); -// view->newTab(); -// -// QCOMPARE(spy1.count(), 0); -// QCOMPARE(spy2.count(), 2); -// QCOMPARE(spy3.count(), 0); -// QCOMPARE(spy4.count(), 0); -} - -// ------------------------------------------- - -void MainViewTest::currentWebView_data() -{ - /* - QTest::addColumn<WebView*>("currentWebView"); - QTest::newRow("null") << WebView*(); - */ -} - -void MainViewTest::currentWebView() -{ - /* - QFETCH(WebView*, currentWebView); - - SubMainView widget; - - QSignalSpy spy0(view, SIGNAL(linkHovered(QString))); - QSignalSpy spy2(view, SIGNAL(loadProgress(int))); - QSignalSpy spy3(view, SIGNAL(setCurrentTitle(QString))); - QSignalSpy spy4(view, SIGNAL(showStatusBarMessage(QString))); - QSignalSpy spy5(view, SIGNAL(tabsChanged())); - QSignalSpy spy6(view, SIGNAL(lastTabClosed())); - - QCOMPARE(widget.currentWebView(), currentWebView); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - */ - QSKIP("Test is not implemented.", SkipAll); -} - -// ------------------------------------------- - -void MainViewTest::newTab_data() -{ - QTest::addColumn<int>("foo"); - QTest::newRow("null") << 0; -} - - -void MainViewTest::newTab() -{ -// QFETCH(int, foo); -// -// QSignalSpy spy0(view, SIGNAL(linkHovered(QString))); -// QSignalSpy spy1(view, SIGNAL(setCurrentTitle(QString))); -// QSignalSpy spy2(view, SIGNAL(showStatusBarMessage(QString))); -// QSignalSpy spy3(view, SIGNAL(tabsChanged())); -// QSignalSpy spy4(view, SIGNAL(lastTabClosed())); -// -// view->newTab(); -// -// QCOMPARE(spy0.count(), 0); -// QCOMPARE(spy1.count(), 0); -// QCOMPARE(spy2.count(), 0); -// QCOMPARE(spy3.count(), 0); -// QCOMPARE(spy4.count(), 0); -} - -// ------------------------------------------- - -void MainViewTest::nextTab_data() -{ - QTest::addColumn<int>("foo"); - QTest::newRow("null") << 0; -} - -// public void nextTab() -void MainViewTest::nextTab() -{ - /* - QFETCH(int, foo); - - SubMainView widget; - - QSignalSpy spy0(view, SIGNAL(linkHovered(QString))); - QSignalSpy spy2(view, SIGNAL(loadProgress(int))); - QSignalSpy spy3(view, SIGNAL(setCurrentTitle(QString))); - QSignalSpy spy4(view, SIGNAL(showStatusBarMessage(QString))); - QSignalSpy spy5(view, SIGNAL(tabsChanged())); - QSignalSpy spy6(view, SIGNAL(lastTabClosed())); - - widget.nextTab(); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - */ - QSKIP("Test is not implemented.", SkipAll); -} - -// ------------------------------------------- - -void MainViewTest::previousTab_data() -{ - QTest::addColumn<int>("foo"); - QTest::newRow("null") << 0; -} - - -// public void previousTab() -void MainViewTest::previousTab() -{ - /* - QFETCH(int, foo); - - SubMainView widget; - - QSignalSpy spy0(view, SIGNAL(linkHovered(QString))); - QSignalSpy spy2(view, SIGNAL(loadProgress(int))); - QSignalSpy spy3(view, SIGNAL(setCurrentTitle(QString))); - QSignalSpy spy4(view, SIGNAL(showStatusBarMessage(QString))); - QSignalSpy spy5(view, SIGNAL(tabsChanged())); - QSignalSpy spy6(view, SIGNAL(lastTabClosed())); - - widget.previousTab(); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - */ - QSKIP("Test is not implemented.", SkipAll); -} - -// ------------------------------------------- - -void MainViewTest::recentlyClosedTabs_data() -{ -} - -void MainViewTest::recentlyClosedTabs() -{ - /* - SubMainView widget; - - QSignalSpy spy0(view, SIGNAL(linkHovered(QString))); - QSignalSpy spy2(view, SIGNAL(loadProgress(int))); - QSignalSpy spy3(view, SIGNAL(setCurrentTitle(QString))); - QSignalSpy spy4(view, SIGNAL(showStatusBarMessage(QString))); - QSignalSpy spy5(view, SIGNAL(tabsChanged())); - QSignalSpy spy6(view, SIGNAL(lastTabClosed())); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - */ - QSKIP("Test is not implemented.", SkipAll); -} - -// ------------------------------------------- - -void MainViewTest::setCurrentTitle_data() -{ - QTest::addColumn<QString>("url"); - QTest::newRow("null") << QString("foo"); -} - -// protected void setCurrentTitle(QString const &url) -void MainViewTest::setCurrentTitle(const QString &) -{ - /* - QFETCH(QString, url); - - SubMainView widget; - - QSignalSpy spy0(view, SIGNAL(linkHovered(QString))); - QSignalSpy spy2(view, SIGNAL(loadProgress(int))); - QSignalSpy spy3(view, SIGNAL(setCurrentTitle(QString))); - QSignalSpy spy4(view, SIGNAL(showStatusBarMessage(QString))); - QSignalSpy spy5(view, SIGNAL(tabsChanged())); - QSignalSpy spy6(view, SIGNAL(lastTabClosed())); - - widget.call_setCurrentTitle(url); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - */ - QSKIP("Test is not implemented.", SkipAll); -} - -// ------------------------------------------- - -void MainViewTest::showStatusBarMessage_data() -{ - QTest::addColumn<QString>("message"); - QTest::newRow("null") << QString("foo"); -} - -// protected void showStatusBarMessage(QString const &message) -void MainViewTest::showStatusBarMessage(const QString &) -{ - /* - QFETCH(QString, message); - - SubMainView widget; - - QSignalSpy spy0(view, SIGNAL(linkHovered(QString))); - QSignalSpy spy2(view, SIGNAL(loadProgress(int))); - QSignalSpy spy3(view, SIGNAL(setCurrentTitle(QString))); - QSignalSpy spy4(view, SIGNAL(showStatusBarMessage(QString))); - QSignalSpy spy5(view, SIGNAL(tabsChanged())); - QSignalSpy spy6(view, SIGNAL(lastTabClosed())); - - widget.call_showStatusBarMessage(message); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - */ - QSKIP("Test is not implemented.", SkipAll); -} - -// ------------------------------------------- - -void MainViewTest::currentChanged_data() -{ - QTest::addColumn<int>("foo"); - QTest::newRow("null") << 0; -} - -void MainViewTest::currentChanged() -{ - /* - QFETCH(int, foo); - - SubMainView widget; - - QSignalSpy spy0(view, SIGNAL(linkHovered(QString))); - QSignalSpy spy2(view, SIGNAL(loadProgress(int))); - QSignalSpy spy3(view, SIGNAL(setCurrentTitle(QString))); - QSignalSpy spy4(view, SIGNAL(showStatusBarMessage(QString))); - QSignalSpy spy5(view, SIGNAL(tabsChanged())); - QSignalSpy spy6(view, SIGNAL(lastTabClosed())); - - widget.call_tabsChanged(); - - QCOMPARE(spy0.count(), 0); - QCOMPARE(spy2.count(), 0); - QCOMPARE(spy3.count(), 0); - QCOMPARE(spy4.count(), 0); - QCOMPARE(spy5.count(), 0); - QCOMPARE(spy6.count(), 0); - */ - QSKIP("Test is not implemented.", SkipAll); -} - -// ------------------------------------------- - -QTEST_KDEMAIN(MainViewTest, GUI) -#include "mainview_test.moc" diff --git a/src/tests/mainwindow_test.cpp b/src/tests/mainwindow_test.cpp deleted file mode 100644 index 44dde8b6..00000000 --- a/src/tests/mainwindow_test.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/* ============================================================ -* -* This file is a part of the rekonq project -* -* Copyright (C) 2010-2011 by Andrea Diamantini <adjam7 at gmail dot com> -* -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License as -* published by the Free Software Foundation; either version 2 of -* the License or (at your option) version 3 or any later version -* accepted by the membership of KDE e.V. (or its successor approved -* by the membership of KDE e.V.), which shall act as a proxy -* defined in Section 14 of version 3 of the license. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -* -* ============================================================ */ - - -#include <qtest_kde.h> - -#include <QtCore> -#include <QtGui> -#include <QtTest> - -#include "mainwindow.h" -#include "application.h" - - -class MainWindowTest : public QObject -{ - Q_OBJECT - -public Q_SLOTS: - void initTestCase(); - void cleanupTestCase(); - -private Q_SLOTS: - - -private: - MainWindow *window; -}; - - -// ------------------------------------------- - - -void MainWindowTest::initTestCase() -{ - window = new MainWindow; -} - - -void MainWindowTest::cleanupTestCase() -{ -// delete window; -} - -// ------------------------------------------- - -QTEST_KDEMAIN(MainWindowTest, GUI) -#include "mainwindow_test.moc" diff --git a/src/tests/networkaccessmanager_test.cpp b/src/tests/networkaccessmanager_test.cpp deleted file mode 100644 index ed6856f7..00000000 --- a/src/tests/networkaccessmanager_test.cpp +++ /dev/null @@ -1,68 +0,0 @@ -/* ============================================================ -* -* This file is a part of the rekonq project -* -* Copyright (C) 2010-2011 by Andrea Diamantini <adjam7 at gmail dot com> -* -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License as -* published by the Free Software Foundation; either version 2 of -* the License or (at your option) version 3 or any later version -* accepted by the membership of KDE e.V. (or its successor approved -* by the membership of KDE e.V.), which shall act as a proxy -* defined in Section 14 of version 3 of the license. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -* -* ============================================================ */ - - -#include <qtest_kde.h> - -#include "networkaccessmanager.h" - - -class NetworkAccessManagerTest : public QObject -{ - Q_OBJECT - -public Q_SLOTS: - void initTestCase(); - void cleanupTestCase(); - -private Q_SLOTS: - -private: - NetworkAccessManager *manager; -}; - - -// ------------------------------------------- - -void NetworkAccessManagerTest::initTestCase() -{ - manager = new NetworkAccessManager(this); -} - - -void NetworkAccessManagerTest::cleanupTestCase() -{ - delete manager; -} - - -// ------------------------------------------- - - - -// ------------------------------------------- - -QTEST_KDEMAIN(NetworkAccessManagerTest, GUI) -#include "networkaccessmanager_test.moc" diff --git a/src/tests/protocolhandler_test.cpp b/src/tests/protocolhandler_test.cpp deleted file mode 100644 index 2e73a1d2..00000000 --- a/src/tests/protocolhandler_test.cpp +++ /dev/null @@ -1,131 +0,0 @@ -/* ============================================================ -* -* This file is a part of the rekonq project -* -* Copyright (C) 2010-2011 by Andrea Diamantini <adjam7 at gmail dot com> -* -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License as -* published by the Free Software Foundation; either version 2 of -* the License or (at your option) version 3 or any later version -* accepted by the membership of KDE e.V. (or its successor approved -* by the membership of KDE e.V.), which shall act as a proxy -* defined in Section 14 of version 3 of the license. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -* -* ============================================================ */ - -#include <qtest_kde.h> - -#include "protocolhandler.h" - -#include <QWebView> -#include <QNetworkRequest> - - -class ProtocolhandlerTest : public QObject -{ - Q_OBJECT - -public Q_SLOTS: - void initTestCase(); - void cleanupTestCase(); - -private Q_SLOTS: - void preHandling_data(); - void preHandling(); - - void postHandling_data(); - void postHandling(); - -private: - ProtocolHandler *handler; -}; - - -// ------------------------------------------- - -void ProtocolhandlerTest::initTestCase() -{ - handler = new ProtocolHandler; -} - - -void ProtocolhandlerTest::cleanupTestCase() -{ - delete handler; -} - - -// ------------------------------------------- - - -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 ; - QTest::newRow("aboutblank") << "about:blank" << false ; - QTest::newRow("abouthome") << "about:home" << true ; - QTest::newRow("ftp") << "ftp://ftp.kde.org" << false ; - QTest::newRow("file") << "file:///home" << false ; -} - - -void ProtocolhandlerTest::preHandling() -{ - 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); -} - - -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 ; - QTest::newRow("aboutblank") << "about:blank" << false ; - QTest::newRow("abouthome") << "about:home" << false ; - QTest::newRow("ftp") << "ftp://ftp.kde.org" << true ; - QTest::newRow("file") << "file:///home" << true ; -} - - -void ProtocolhandlerTest::postHandling() -{ - 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); -} - -// ------------------------------------------- - -QTEST_KDEMAIN(ProtocolhandlerTest, GUI) -#include "protocolhandler_test.moc" diff --git a/src/tests/sessionmanager_test.cpp b/src/tests/sessionmanager_test.cpp deleted file mode 100644 index a2ddbfe3..00000000 --- a/src/tests/sessionmanager_test.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/* ============================================================ -* -* This file is a part of the rekonq project -* -* Copyright (C) 2010-2011 by Andrea Diamantini <adjam7 at gmail dot com> -* -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License as -* published by the Free Software Foundation; either version 2 of -* the License or (at your option) version 3 or any later version -* accepted by the membership of KDE e.V. (or its successor approved -* by the membership of KDE e.V.), which shall act as a proxy -* defined in Section 14 of version 3 of the license. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -* -* ============================================================ */ - -#include <qtest_kde.h> - -#include <QtCore> -#include <QtGui> -#include <QtTest> - - -#include "sessionmanager.h" - - -class SessionManagerTest : public QObject -{ - Q_OBJECT - -public Q_SLOTS: - void initTestCase(); - void cleanupTestCase(); - -private Q_SLOTS: - -private: - SessionManager *sessman; -}; - - -// ------------------------------------------- - - -void SessionManagerTest::initTestCase() -{ - sessman = new SessionManager; -} - - -void SessionManagerTest::cleanupTestCase() -{ - delete sessman; -} - - -// ------------------------------------------- - - - -// ------------------------------------------- - -QTEST_KDEMAIN(SessionManagerTest, GUI) -#include "sessionmanager_test.moc" diff --git a/src/tests/tabbar_test.cpp b/src/tests/tabbar_test.cpp deleted file mode 100644 index 0ff73c3f..00000000 --- a/src/tests/tabbar_test.cpp +++ /dev/null @@ -1,152 +0,0 @@ -/* ============================================================ -* -* This file is a part of the rekonq project -* -* Copyright (C) 2008 by Benjamin C. Meyer <ben@meyerhome.net> -* Copyright (C) 2008-2011 by Andrea Diamantini <adjam7 at gmail dot com> -* -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License as -* published by the Free Software Foundation; either version 2 of -* the License or (at your option) version 3 or any later version -* accepted by the membership of KDE e.V. (or its successor approved -* by the membership of KDE e.V.), which shall act as a proxy -* defined in Section 14 of version 3 of the license. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -* -* ============================================================ */ - - -#include <qtest_kde.h> - -#include "mainwindow.h" -#include "mainview.h" -#include "tabbar.h" - - -/** - * Subclass that exposes the protected functions. - */ -class SubTabBar : public TabBar -{ -public: - - SubTabBar(QWidget *parent) : TabBar(parent) {}; - - QSize call_tabSizeHint(int index) const - { - return SubTabBar::tabSizeHint(index); - } - - void call_mouseMoveEvent(QMouseEvent* event) - { - return SubTabBar::mouseMoveEvent(event); - } - - void call_leaveEvent(QEvent* event) - { - return SubTabBar::leaveEvent(event); - } - - void call_mousePressEvent(QMouseEvent* event) - { - return SubTabBar::mousePressEvent(event); - } - - void call_mouseReleaseEvent(QMouseEvent* event) - { - return SubTabBar::mouseReleaseEvent(event); - } -}; - - -// ------------------------------------------------------------------ - - -class TabBarTest : public QObject -{ - Q_OBJECT - -public Q_SLOTS: - void initTestCase(); - void cleanupTestCase(); - -private Q_SLOTS: - void tabSizeHint_data(); - void tabSizeHint(); - - void mousePress_data(); - void mousePress(); - -private: - SubTabBar *_bar; -}; - - -// ------------------------------------------- - -void TabBarTest::initTestCase() -{ - MainWindow *w = new MainWindow; - MainView *mv = new MainView(w); - _bar = new SubTabBar(mv); -} - -void TabBarTest::cleanupTestCase() -{ - delete _bar; -} - -// ------------------------------------------- - -void TabBarTest::tabSizeHint_data() -{ - QTest::addColumn<int>("index"); - - QTest::newRow("1th") << 0; - QTest::newRow("2nd") << 1; - QTest::newRow("3rd") << 2; - QTest::newRow("4th") << 3; - QTest::newRow("5th") << 4; - QTest::newRow("6th") << 5; - QTest::newRow("7th") << 6; - QTest::newRow("8th") << 7; - QTest::newRow("9th") << 8; - QTest::newRow("10th") << 9; -} - - -void TabBarTest::tabSizeHint() -{ - QFETCH(int, index); - - QVERIFY(_bar->call_tabSizeHint(index).width() > 0); -} - - -void TabBarTest::mousePress_data() -{ -} - - -void TabBarTest::mousePress() -{ -// QTest::mousePress(_bar, Qt::MidButton); -// // QCOMPARE(); ? -// -// QTest::mousePress(_bar, Qt::LeftButton); -// // QCOMPARE(); ? -} - -// ------------------------------------------- - -QTEST_KDEMAIN(TabBarTest, GUI) -#include "tabbar_test.moc" diff --git a/src/tests/urlbar_test.cpp b/src/tests/urlbar_test.cpp deleted file mode 100644 index 4e1aaae5..00000000 --- a/src/tests/urlbar_test.cpp +++ /dev/null @@ -1,75 +0,0 @@ -/* ============================================================ -* -* This file is a part of the rekonq project -* -* Copyright (C) 2010-2011 by Andrea Diamantini <adjam7 at gmail dot com> -* -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License as -* published by the Free Software Foundation; either version 2 of -* the License or (at your option) version 3 or any later version -* accepted by the membership of KDE e.V. (or its successor approved -* by the membership of KDE e.V.), which shall act as a proxy -* defined in Section 14 of version 3 of the license. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -* -* ============================================================ */ - - -#include <qtest_kde.h> - -#include "webpage.h" -#include "webview.h" -#include "webtab.h" - -#include "urlbar.h" - - -class UrlBarTest : public QObject -{ - Q_OBJECT - -public Q_SLOTS: - void initTestCase(); - void cleanupTestCase(); - -private Q_SLOTS: - -private: - UrlBar *bar; - WebTab *tab; -}; - - -// ------------------------------------------- - -void UrlBarTest::initTestCase() -{ - tab = new WebTab; - bar = new UrlBar(tab); -} - - -void UrlBarTest::cleanupTestCase() -{ - delete bar; - delete tab; -} - - -// ------------------------------------------- - - - -// ------------------------------------------- - -QTEST_KDEMAIN(UrlBarTest, GUI) -#include "urlbar_test.moc" diff --git a/src/tests/walletbar_test.cpp b/src/tests/walletbar_test.cpp deleted file mode 100644 index ac186bcc..00000000 --- a/src/tests/walletbar_test.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/* ============================================================ -* -* This file is a part of the rekonq project -* -* Copyright (C) 2010-2011 by Andrea Diamantini <adjam7 at gmail dot com> -* -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License as -* published by the Free Software Foundation; either version 2 of -* the License or (at your option) version 3 or any later version -* accepted by the membership of KDE e.V. (or its successor approved -* by the membership of KDE e.V.), which shall act as a proxy -* defined in Section 14 of version 3 of the license. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -* -* ============================================================ */ - - -#include <qtest_kde.h> - -#include "walletbar.h" - - -class WalletBarTest : public QObject -{ - Q_OBJECT - -public Q_SLOTS: - void initTestCase(); - void cleanupTestCase(); - -private Q_SLOTS: - -private: - WalletBar *bar; -}; - - -// ------------------------------------------- - - -void WalletBarTest::initTestCase() -{ - QWidget *w = new QWidget; - bar = new WalletBar(w); -} - - -void WalletBarTest::cleanupTestCase() -{ - delete bar; -} - - -// ------------------------------------------- - - - -// ------------------------------------------- - -QTEST_KDEMAIN(WalletBarTest, GUI) -#include "walletbar_test.moc" diff --git a/src/tests/webpage_test.cpp b/src/tests/webpage_test.cpp deleted file mode 100644 index 9b170329..00000000 --- a/src/tests/webpage_test.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/* ============================================================ -* -* This file is a part of the rekonq project -* -* Copyright (C) 2010-2011 by Andrea Diamantini <adjam7 at gmail dot com> -* -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License as -* published by the Free Software Foundation; either version 2 of -* the License or (at your option) version 3 or any later version -* accepted by the membership of KDE e.V. (or its successor approved -* by the membership of KDE e.V.), which shall act as a proxy -* defined in Section 14 of version 3 of the license. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -* -* ============================================================ */ - - -#include <qtest_kde.h> - -#include "webpage.h" -#include "webview.h" -#include "webtab.h" - - -class WebPageTest : public QObject -{ - Q_OBJECT - -public Q_SLOTS: - void initTestCase(); - void cleanupTestCase(); - -private Q_SLOTS: - void manageNetworkErrors(); - void downloadRequest(); - void downloadAllContentsWithKGet(); - - void createWindow(); - void acceptNavigationRequest(); - - void handleUnsupportedContent(); - - void loadFinished(); - -private: - WebTab *tab; - WebPage *page; - WebView *view; -}; - - -// ------------------------------------------- - - -void WebPageTest::initTestCase() -{ - tab = new WebTab; - view = tab->view(); - page = tab->page(); -} - - -void WebPageTest::cleanupTestCase() -{ - delete tab; -} - - -// ------------------------------------------- - - -void WebPageTest::manageNetworkErrors() -{ -} - -void WebPageTest::downloadRequest() -{ -} - -void WebPageTest::downloadAllContentsWithKGet() -{ -} - -void WebPageTest::createWindow() -{ -} - -void WebPageTest::acceptNavigationRequest() -{ -} - -void WebPageTest::handleUnsupportedContent() -{ -} - -void WebPageTest::loadFinished() -{ -} - -// ------------------------------------------- - -QTEST_KDEMAIN(WebPageTest, GUI) -#include "webpage_test.moc" diff --git a/src/tests/websnap_test.cpp b/src/tests/websnap_test.cpp deleted file mode 100644 index 31d2e5cf..00000000 --- a/src/tests/websnap_test.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/* ============================================================ -* -* This file is a part of the rekonq project -* -* Copyright (C) 2010-2011 by Andrea Diamantini <adjam7 at gmail dot com> -* -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License as -* published by the Free Software Foundation; either version 2 of -* the License or (at your option) version 3 or any later version -* accepted by the membership of KDE e.V. (or its successor approved -* by the membership of KDE e.V.), which shall act as a proxy -* defined in Section 14 of version 3 of the license. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -* -* ============================================================ */ - - -#include <qtest_kde.h> - -#include "websnap.h" - - -class WebSnapTest : public QObject -{ - Q_OBJECT - - -public Q_SLOTS: - void initTestCase(); - void cleanupTestCase(); - -private Q_SLOTS: - -private: - WebSnap *snap; -}; - - -// ------------------------------------------- - - -void WebSnapTest::initTestCase() -{ -} - - -void WebSnapTest::cleanupTestCase() -{ - delete snap; -} - - -// ------------------------------------------- - - - -// ------------------------------------------- - -QTEST_KDEMAIN(WebSnapTest, GUI) -#include "websnap_test.moc" diff --git a/src/tests/webtab_test.cpp b/src/tests/webtab_test.cpp deleted file mode 100644 index 073f1521..00000000 --- a/src/tests/webtab_test.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/* ============================================================ -* -* This file is a part of the rekonq project -* -* Copyright (C) 2008 by Benjamin C. Meyer <ben@meyerhome.net> -* Copyright (C) 2009-2011 by Andrea Diamantini <adjam7 at gmail dot com> -* -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License as -* published by the Free Software Foundation; either version 2 of -* the License or (at your option) version 3 or any later version -* accepted by the membership of KDE e.V. (or its successor approved -* by the membership of KDE e.V.), which shall act as a proxy -* defined in Section 14 of version 3 of the license. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -* -* ============================================================ */ - - -#include <qtest_kde.h> - -#include "webpage.h" -#include "webview.h" -#include "webtab.h" - - -class WebTabTest : public QObject -{ - Q_OBJECT - -public Q_SLOTS: - void initTestCase(); - void cleanupTestCase(); - -private: - WebTab *tab; -}; - - -// ------------------------------------------- - - -void WebTabTest::initTestCase() -{ - tab = new WebTab; -} - - -void WebTabTest::cleanupTestCase() -{ - delete tab; -} - - -// ------------------------------------------- - - -// ------------------------------------------- - -QTEST_KDEMAIN(WebTabTest, GUI) -#include "webtab_test.moc" diff --git a/src/tests/webview_test.cpp b/src/tests/webview_test.cpp deleted file mode 100644 index 1846e142..00000000 --- a/src/tests/webview_test.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/* ============================================================ -* -* This file is a part of the rekonq project -* -* Copyright (C) 2010-2011 by Andrea Diamantini <adjam7 at gmail dot com> -* -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License as -* published by the Free Software Foundation; either version 2 of -* the License or (at your option) version 3 or any later version -* accepted by the membership of KDE e.V. (or its successor approved -* by the membership of KDE e.V.), which shall act as a proxy -* defined in Section 14 of version 3 of the license. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -* -* ============================================================ */ - - -#include <qtest_kde.h> - -#include "webview.h" -#include "webtab.h" - - -class WebViewTest : public QObject -{ - Q_OBJECT - -public Q_SLOTS: - void initTestCase(); - void cleanupTestCase(); - -private Q_SLOTS: - -private: - WebView *view; - WebTab *tab; -}; - - -// ------------------------------------------- - - -void WebViewTest::initTestCase() -{ - tab = new WebTab; - view = tab->view(); -} - - -void WebViewTest::cleanupTestCase() -{ - delete tab; -} - - -// ------------------------------------------- - - -// ------------------------------------------- - -QTEST_KDEMAIN(WebViewTest, GUI) -#include "webview_test.moc" |