[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Wed Apr 7 23:53:54 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 8385d0986dc7ac5d7640b34112b58c024d1a3559
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