Title: [117045] trunk
Revision
117045
Author
[email protected]
Date
2012-05-15 02:39:10 -0700 (Tue, 15 May 2012)

Log Message

[Qt][WK2] http/tests/navigation/https-in-page-cache.html fails with timeout
https://bugs.webkit.org/show_bug.cgi?id=83576

Patch by Michael Brüning <[email protected]> on 2012-05-15
Reviewed by Simon Hausmann.

Source/WebKit2:

* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebViewPrivate::handleCertificateVerificationRequest):
(QQuickWebView::allowAnyHTTPSCertificateForLocalHost): Added.
(QQuickWebView::setAllowAnyHTTPSCertificateForLocalHost): Added.
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate):  Added bool m_allowAnyHTTPSCertificateForLocalHost.

Tools:

Set the PlatformWebView for the Qt port to accept all SSL certificates.

* WebKitTestRunner/qt/PlatformWebViewQt.cpp:
(WTR::PlatformWebView::PlatformWebView):

LayoutTests:

Unskipped http/tests/navgiation/https-in-page-cache.html

* platform/qt-5.0-wk2/Skipped:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (117044 => 117045)


--- trunk/LayoutTests/ChangeLog	2012-05-15 09:13:39 UTC (rev 117044)
+++ trunk/LayoutTests/ChangeLog	2012-05-15 09:39:10 UTC (rev 117045)
@@ -1,3 +1,14 @@
+2012-05-15  Michael Brüning  <[email protected]>
+
+        [Qt][WK2] http/tests/navigation/https-in-page-cache.html fails with timeout
+        https://bugs.webkit.org/show_bug.cgi?id=83576
+
+        Reviewed by Simon Hausmann.
+
+        Unskipped http/tests/navgiation/https-in-page-cache.html
+
+        * platform/qt-5.0-wk2/Skipped:
+
 2012-05-15  Zan Dobersek  <[email protected]>
 
         Unreviewed, GTK gardening after r116986, r117012 and r117016.

Modified: trunk/LayoutTests/platform/qt-5.0-wk2/Skipped (117044 => 117045)


--- trunk/LayoutTests/platform/qt-5.0-wk2/Skipped	2012-05-15 09:13:39 UTC (rev 117044)
+++ trunk/LayoutTests/platform/qt-5.0-wk2/Skipped	2012-05-15 09:39:10 UTC (rev 117045)
@@ -324,8 +324,8 @@
 # https://bugs.webkit.org/show_bug.cgi?id=74504
 fast/dom/rtl-scroll-to-leftmost-and-resize.html
 
-#[Qt][WK2]REGRESSION(r110699): It made fast/animation/request-animation-frame-during-modal.html timeout
-#https://bugs.webkit.org/show_bug.cgi?id=81671
+# [Qt][WK2]REGRESSION(r110699): It made fast/animation/request-animation-frame-during-modal.html timeout
+# https://bugs.webkit.org/show_bug.cgi?id=81671
 fast/animation/request-animation-frame-during-modal.html
 
 # flakey svg tests
@@ -574,10 +574,6 @@
 # https://bugs.webkit.org/show_bug.cgi?id=83575
 fast/frames/iframe-window-focus.html
 
-# [Qt][WK2] http/tests/navigation/https-in-page-cache.html fails with timeout
-# https://bugs.webkit.org/show_bug.cgi?id=83576
-http/tests/navigation/https-in-page-cache.html
-
 # [Qt][WK2] fast/loader/create-frame-in-DOMContentLoaded.html crashes
 # https://bugs.webkit.org/show_bug.cgi?id=83578
 fast/loader/create-frame-in-DOMContentLoaded.html

Modified: trunk/Source/WebKit2/ChangeLog (117044 => 117045)


--- trunk/Source/WebKit2/ChangeLog	2012-05-15 09:13:39 UTC (rev 117044)
+++ trunk/Source/WebKit2/ChangeLog	2012-05-15 09:39:10 UTC (rev 117045)
@@ -1,3 +1,19 @@
+2012-05-15  Michael Brüning  <[email protected]>
+
+        [Qt][WK2] http/tests/navigation/https-in-page-cache.html fails with timeout
+        https://bugs.webkit.org/show_bug.cgi?id=83576
+
+        Reviewed by Simon Hausmann.
+
+        * UIProcess/API/qt/qquickwebview.cpp:
+        (QQuickWebViewPrivate::QQuickWebViewPrivate):
+        (QQuickWebViewPrivate::handleCertificateVerificationRequest):
+        (QQuickWebView::allowAnyHTTPSCertificateForLocalHost): Added.
+        (QQuickWebView::setAllowAnyHTTPSCertificateForLocalHost): Added.
+        * UIProcess/API/qt/qquickwebview_p.h:
+        * UIProcess/API/qt/qquickwebview_p_p.h:
+        (QQuickWebViewPrivate):  Added bool m_allowAnyHTTPSCertificateForLocalHost.
+
 2012-05-14  Shinya Kawanaka  <[email protected]>
 
         document.execCommand('Indent') in the direct child of ShadowRoot causes a crash.

Modified: trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp (117044 => 117045)


--- trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp	2012-05-15 09:13:39 UTC (rev 117044)
+++ trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp	2012-05-15 09:39:10 UTC (rev 117045)
@@ -266,6 +266,7 @@
     , m_navigatorQtObjectEnabled(false)
     , m_renderToOffscreenBuffer(false)
     , m_dialogActive(false)
+    , m_allowAnyHTTPSCertificateForLocalHost(false)
     , m_loadProgress(0)
 {
     viewport->setClip(true);
@@ -559,6 +560,11 @@
 bool QQuickWebViewPrivate::handleCertificateVerificationRequest(const QString& hostname)
 {
     Q_Q(QQuickWebView);
+
+    if (m_allowAnyHTTPSCertificateForLocalHost
+        && (hostname == QStringLiteral("127.0.0.1") || hostname == QStringLiteral("localhost")))
+        return true;
+
     QtDialogRunner dialogRunner(q);
     if (!dialogRunner.initForCertificateVerification(hostname))
         return false;
@@ -1859,4 +1865,17 @@
     d->webPageProxy.get()->runJavaScriptInMainFrame(script, ScriptValueCallback::create(closure, _javascript_Callback));
 }
 
+bool QQuickWebView::allowAnyHTTPSCertificateForLocalHost() const
+{
+    Q_D(const QQuickWebView);
+    return d->m_allowAnyHTTPSCertificateForLocalHost;
+}
+
+void QQuickWebView::setAllowAnyHTTPSCertificateForLocalHost(bool allow)
+{
+    Q_D(QQuickWebView);
+    d->m_allowAnyHTTPSCertificateForLocalHost = allow;
+}
+
+
 #include "moc_qquickwebview_p.cpp"

Modified: trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview_p.h (117044 => 117045)


--- trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview_p.h	2012-05-15 09:13:39 UTC (rev 117044)
+++ trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview_p.h	2012-05-15 09:39:10 UTC (rev 117045)
@@ -149,6 +149,9 @@
     qreal zoomFactor() const;
     void setZoomFactor(qreal);
     void runJavaScriptInMainFrame(const QString& script, QObject* receiver, const char* method);
+    // Used to automatically accept the HTTPS certificate in WTR. No other use intended.
+    bool allowAnyHTTPSCertificateForLocalHost() const;
+    void setAllowAnyHTTPSCertificateForLocalHost(bool allow);
 
 public Q_SLOTS:
     void loadHtml(const QString& html, const QUrl& baseUrl = QUrl());

Modified: trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h (117044 => 117045)


--- trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h	2012-05-15 09:13:39 UTC (rev 117044)
+++ trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h	2012-05-15 09:39:10 UTC (rev 117045)
@@ -198,6 +198,7 @@
     bool m_navigatorQtObjectEnabled;
     bool m_renderToOffscreenBuffer;
     bool m_dialogActive;
+    bool m_allowAnyHTTPSCertificateForLocalHost;
     QUrl m_iconURL;
     int m_loadProgress;
 };

Modified: trunk/Tools/ChangeLog (117044 => 117045)


--- trunk/Tools/ChangeLog	2012-05-15 09:13:39 UTC (rev 117044)
+++ trunk/Tools/ChangeLog	2012-05-15 09:39:10 UTC (rev 117045)
@@ -1,3 +1,15 @@
+2012-05-15  Michael Brüning  <[email protected]>
+
+        [Qt][WK2] http/tests/navigation/https-in-page-cache.html fails with timeout
+        https://bugs.webkit.org/show_bug.cgi?id=83576
+
+        Reviewed by Simon Hausmann.
+
+        Set the PlatformWebView for the Qt port to accept all SSL certificates.
+
+        * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
+        (WTR::PlatformWebView::PlatformWebView):
+
 2012-05-14  Luke Macpherson  <[email protected]>
 
         Introduce ENABLE_CSS_VARIABLES compile flag.

Modified: trunk/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp (117044 => 117045)


--- trunk/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp	2012-05-15 09:13:39 UTC (rev 117044)
+++ trunk/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp	2012-05-15 09:39:10 UTC (rev 117045)
@@ -76,6 +76,7 @@
 {
     QQuickWebViewExperimental experimental(m_view);
     experimental.setRenderToOffscreenBuffer(true);
+    m_view->setAllowAnyHTTPSCertificateForLocalHost(true);
 }
 
 PlatformWebView::~PlatformWebView()
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to