[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.16-1409-g5afdf4d
eric at webkit.org
eric at webkit.org
Thu Dec 3 13:42:25 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 86356535486188ce6a97e7b45f3304b54fa7a3ee
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sun Nov 22 22:29:10 2009 +0000
2009-11-22 Jakub Wieczorek <faw217 at gmail.com>
Reviewed by Adam Barth.
[Qt] DumpRenderTree should explicitly ignore any SSL certificate errors
for localhost and 127.0.0.1.
https://bugs.webkit.org/show_bug.cgi?id=31783
Unskip the http/tests/ssl/verify-ssl-enabled.php test, which is passing now.
* platform/qt/Skipped:
2009-11-22 Jakub Wieczorek <faw217 at gmail.com>
Reviewed by Adam Barth.
[Qt] DumpRenderTree should explicitly ignore any SSL certificate errors
for localhost and 127.0.0.1.
https://bugs.webkit.org/show_bug.cgi?id=31783
Unskip the http/tests/ssl/verify-ssl-enabled.php test, which is passing now.
* DumpRenderTree/qt/DumpRenderTree.cpp:
(WebCore::NetworkAccessManager::NetworkAccessManager):
(WebCore::NetworkAccessManager::sslErrorsEncountered):
(WebCore::WebPage::WebPage):
* DumpRenderTree/qt/DumpRenderTree.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51298 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index f9be353..21eaced 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2009-11-22 Jakub Wieczorek <faw217 at gmail.com>
+
+ Reviewed by Adam Barth.
+
+ [Qt] DumpRenderTree should explicitly ignore any SSL certificate errors
+ for localhost and 127.0.0.1.
+ https://bugs.webkit.org/show_bug.cgi?id=31783
+
+ Unskip the http/tests/ssl/verify-ssl-enabled.php test, which is passing now.
+
+ * platform/qt/Skipped:
+
2009-11-22 Chris Evans <cevans at chromium.org>
Reviewed by Adam Barth.
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index 6ce758f..58fff99 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -37,13 +37,16 @@ http/tests/incremental
http/tests/media
http/tests/navigation
http/tests/plugins
-http/tests/ssl
http/tests/webarchive
http/tests/wml
# Failing URL test
http/tests/uri/escaped-entity.html
+# Failing HTTP SSL tests
+http/tests/ssl/referer-301.html
+http/tests/ssl/referer-303.html
+
# Failing HTTP Loading tests
http/tests/loading/bad-server-subframe.html
http/tests/loading/bad-scheme-subframe.html
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 1524a3e..6bd8919 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,19 @@
+2009-11-22 Jakub Wieczorek <faw217 at gmail.com>
+
+ Reviewed by Adam Barth.
+
+ [Qt] DumpRenderTree should explicitly ignore any SSL certificate errors
+ for localhost and 127.0.0.1.
+ https://bugs.webkit.org/show_bug.cgi?id=31783
+
+ Unskip the http/tests/ssl/verify-ssl-enabled.php test, which is passing now.
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp:
+ (WebCore::NetworkAccessManager::NetworkAccessManager):
+ (WebCore::NetworkAccessManager::sslErrorsEncountered):
+ (WebCore::WebPage::WebPage):
+ * DumpRenderTree/qt/DumpRenderTree.h:
+
2009-11-22 Chris Evans <cevans at chromium.org>
Reviewed by Adam Barth.
diff --git a/WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp b/WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp
index ee15c70..a4ef6bd 100644
--- a/WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp
+++ b/WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp
@@ -49,6 +49,8 @@
#include <QFileInfo>
#include <QFocusEvent>
#include <QFontDatabase>
+#include <QNetworkAccessManager>
+#include <QNetworkReply>
#include <QNetworkRequest>
#include <QUndoStack>
@@ -79,6 +81,35 @@ namespace WebCore {
const unsigned int maxViewWidth = 800;
const unsigned int maxViewHeight = 600;
+NetworkAccessManager::NetworkAccessManager(QObject* parent)
+ : QNetworkAccessManager(parent)
+{
+#ifndef QT_NO_SSL
+ connect(this, SIGNAL(sslErrors(QNetworkReply*, const QList<QSslError>&)),
+ this, SLOT(sslErrorsEncountered(QNetworkReply*, const QList<QSslError>&)));
+#endif
+}
+
+#ifndef QT_NO_SSL
+void NetworkAccessManager::sslErrorsEncountered(QNetworkReply* reply, const QList<QSslError>& errors)
+{
+ if (reply->url().host() == "127.0.0.1" || reply->url().host() == "localhost") {
+ bool ignore = true;
+
+ // Accept any HTTPS certificate.
+ foreach (const QSslError& error, errors) {
+ if (error.error() < QSslError::UnableToGetIssuerCertificate || error.error() > QSslError::HostNameMismatch) {
+ ignore = false;
+ break;
+ }
+ }
+
+ if (ignore)
+ reply->ignoreSslErrors();
+ }
+}
+#endif
+
WebPage::WebPage(QWidget *parent, DumpRenderTree *drt)
: QWebPage(parent)
, m_drt(drt)
@@ -102,6 +133,7 @@ WebPage::WebPage(QWidget *parent, DumpRenderTree *drt)
connect(this, SIGNAL(geometryChangeRequested(const QRect &)),
this, SLOT(setViewGeometry(const QRect & )));
+ setNetworkAccessManager(new NetworkAccessManager(this));
setPluginFactory(new TestPlugin(this));
}
diff --git a/WebKitTools/DumpRenderTree/qt/DumpRenderTree.h b/WebKitTools/DumpRenderTree/qt/DumpRenderTree.h
index 8812901..f19a67a 100644
--- a/WebKitTools/DumpRenderTree/qt/DumpRenderTree.h
+++ b/WebKitTools/DumpRenderTree/qt/DumpRenderTree.h
@@ -31,10 +31,15 @@
#define DUMPRENDERTREE_H
#include <QList>
+#include <QNetworkAccessManager>
#include <QObject>
#include <QTextStream>
#include <QSocketNotifier>
+#ifndef QT_NO_SSL
+#include <QSslError>
+#endif
+
#include <qwebpage.h>
QT_BEGIN_NAMESPACE
@@ -121,6 +126,17 @@ private:
bool m_enableTextOutput;
};
+class NetworkAccessManager : public QNetworkAccessManager {
+ Q_OBJECT
+public:
+ NetworkAccessManager(QObject* parent);
+
+private slots:
+#ifndef QT_NO_SSL
+ void sslErrorsEncountered(QNetworkReply*, const QList<QSslError>&);
+#endif
+};
+
class WebPage : public QWebPage {
Q_OBJECT
public:
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list