<!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">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[173691] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/173691">173691</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2014-09-17 09:11:12 -0700 (Wed, 17 Sep 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[GTK] WebKitWebView::load-failed-with-tls-errors should receive the failing URI instead of a host
https://bugs.webkit.org/show_bug.cgi?id=136889

Reviewed by Gustavo Noronha Silva.

Source/WebKit2:

We were passing a host for two different reasons, first because
it's more convenient to add an exception with
webkit_web_context_allow_tls_certificate_for_host(), but also
because we were assuming the active URI is the failing URI in case
of failure. This assumption is correct because our current code
does that, but I'm not sure we are doing it on purpose. That
behaviour is not documented anywhere and it's not what WebKit2 does
internaly.

* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_class_init):
(webkitWebViewLoadFailedWithTLSErrors):
* UIProcess/API/gtk/WebKitWebView.h:

Tools:

* TestWebKitAPI/Tests/WebKit2Gtk/TestSSL.cpp:
(testLoadFailedWithTLSErrors): Check that LoadFailedWithTLSErrors
event was added to the events vector.
* TestWebKitAPI/gtk/WebKit2Gtk/LoadTrackingTest.cpp:
(loadFailedCallback): Do not assume the web view URI is the
failing URI when the load fails before the committed state.
(loadFailedWithTLSErrorsCallback): Handle the case of load failure
because of TLS errors can call LoadTrackingTest::loadFailedWithTLSErrors.
(LoadTrackingTest::LoadTrackingTest): Connect to WebKitWebView::load-failed-with-tls-errors.
(LoadTrackingTest::loadFailedWithTLSErrors): Add
LoadFailedWithTLSErrors event to the events vector.
* TestWebKitAPI/gtk/WebKit2Gtk/LoadTrackingTest.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitWebViewcpp">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitWebViewh">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.h</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2GtkTestSSLcpp">trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestSSL.cpp</a></li>
<li><a href="#trunkToolsTestWebKitAPIgtkWebKit2GtkLoadTrackingTestcpp">trunk/Tools/TestWebKitAPI/gtk/WebKit2Gtk/LoadTrackingTest.cpp</a></li>
<li><a href="#trunkToolsTestWebKitAPIgtkWebKit2GtkLoadTrackingTesth">trunk/Tools/TestWebKitAPI/gtk/WebKit2Gtk/LoadTrackingTest.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (173690 => 173691)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-09-17 12:35:08 UTC (rev 173690)
+++ trunk/Source/WebKit2/ChangeLog        2014-09-17 16:11:12 UTC (rev 173691)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2014-09-17  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
+
+        [GTK] WebKitWebView::load-failed-with-tls-errors should receive the failing URI instead of a host
+        https://bugs.webkit.org/show_bug.cgi?id=136889
+
+        Reviewed by Gustavo Noronha Silva.
+
+        We were passing a host for two different reasons, first because
+        it's more convenient to add an exception with
+        webkit_web_context_allow_tls_certificate_for_host(), but also
+        because we were assuming the active URI is the failing URI in case
+        of failure. This assumption is correct because our current code
+        does that, but I'm not sure we are doing it on purpose. That
+        behaviour is not documented anywhere and it's not what WebKit2 does
+        internaly.
+
+        * UIProcess/API/gtk/WebKitWebView.cpp:
+        (webkit_web_view_class_init):
+        (webkitWebViewLoadFailedWithTLSErrors):
+        * UIProcess/API/gtk/WebKitWebView.h:
+
</ins><span class="cx"> 2014-09-16  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK] Fix layering violations in PasteboardGtk
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitWebViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp (173690 => 173691)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp        2014-09-17 12:35:08 UTC (rev 173690)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp        2014-09-17 16:11:12 UTC (rev 173691)
</span><span class="lines">@@ -873,13 +873,13 @@
</span><span class="cx">     /**
</span><span class="cx">      * WebKitWebView::load-failed-with-tls-errors:
</span><span class="cx">      * @web_view: the #WebKitWebView on which the signal is emitted
</span><ins>+     * @failing_uri: the URI that failed to load
</ins><span class="cx">      * @certificate: a #GTlsCertificate
</span><span class="cx">      * @errors: a #GTlsCertificateFlags with the verification status of @certificate
</span><del>-     * @host: the host on which the error occurred
</del><span class="cx">      *
</span><span class="cx">      * Emitted when a TLS error occurs during a load operation.
</span><del>-     * To allow an exception for this certificate
-     * and this host use webkit_web_context_allow_tls_certificate_for_host().
</del><ins>+     * To allow an exception for this @certificate
+     * and the host of @failing_uri use webkit_web_context_allow_tls_certificate_for_host().
</ins><span class="cx">      *
</span><span class="cx">      * To handle this signal asynchronously you should call g_object_ref() on @certificate
</span><span class="cx">      * and return %TRUE.
</span><span class="lines">@@ -900,9 +900,9 @@
</span><span class="cx">             g_signal_accumulator_true_handled, 0 /* accumulator data */,
</span><span class="cx">             g_cclosure_marshal_generic,
</span><span class="cx">             G_TYPE_BOOLEAN, 3,
</span><ins>+            G_TYPE_STRING,
</ins><span class="cx">             G_TYPE_TLS_CERTIFICATE,
</span><del>-            G_TYPE_TLS_CERTIFICATE_FLAGS,
-            G_TYPE_STRING);
</del><ins>+            G_TYPE_TLS_CERTIFICATE_FLAGS);
</ins><span class="cx"> 
</span><span class="cx">     /**
</span><span class="cx">      * WebKitWebView::create:
</span><span class="lines">@@ -1584,9 +1584,8 @@
</span><span class="cx"> 
</span><span class="cx">     WebKitTLSErrorsPolicy tlsErrorsPolicy = webkit_web_context_get_tls_errors_policy(webView-&gt;priv-&gt;context);
</span><span class="cx">     if (tlsErrorsPolicy == WEBKIT_TLS_ERRORS_POLICY_FAIL) {
</span><del>-        GUniquePtr&lt;SoupURI&gt; soupURI(soup_uri_new(failingURI));
</del><span class="cx">         gboolean returnValue;
</span><del>-        g_signal_emit(webView, signals[LOAD_FAILED_WITH_TLS_ERRORS], 0, certificate, tlsErrors, soupURI-&gt;host, &amp;returnValue);
</del><ins>+        g_signal_emit(webView, signals[LOAD_FAILED_WITH_TLS_ERRORS], 0, failingURI, certificate, tlsErrors, &amp;returnValue);
</ins><span class="cx">         if (!returnValue)
</span><span class="cx">             g_signal_emit(webView, signals[LOAD_FAILED], 0, WEBKIT_LOAD_STARTED, failingURI, error, &amp;returnValue);
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitWebViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.h (173690 => 173691)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.h        2014-09-17 12:35:08 UTC (rev 173690)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.h        2014-09-17 16:11:12 UTC (rev 173691)
</span><span class="lines">@@ -235,9 +235,9 @@
</span><span class="cx">     gboolean   (* authenticate)                (WebKitWebView               *web_view,
</span><span class="cx">                                                 WebKitAuthenticationRequest *request);
</span><span class="cx">     gboolean   (* load_failed_with_tls_errors) (WebKitWebView               *web_view,
</span><ins>+                                                const gchar                 *failing_uri,
</ins><span class="cx">                                                 GTlsCertificate             *certificate,
</span><del>-                                                GTlsCertificateFlags         errors,
-                                                const gchar                 *host);
</del><ins>+                                                GTlsCertificateFlags         errors);
</ins><span class="cx">     void (*_webkit_reserved0) (void);
</span><span class="cx">     void (*_webkit_reserved1) (void);
</span><span class="cx">     void (*_webkit_reserved2) (void);
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (173690 => 173691)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2014-09-17 12:35:08 UTC (rev 173690)
+++ trunk/Tools/ChangeLog        2014-09-17 16:11:12 UTC (rev 173691)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2014-09-17  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
+
+        [GTK] WebKitWebView::load-failed-with-tls-errors should receive the failing URI instead of a host
+        https://bugs.webkit.org/show_bug.cgi?id=136889
+
+        Reviewed by Gustavo Noronha Silva.
+
+        * TestWebKitAPI/Tests/WebKit2Gtk/TestSSL.cpp:
+        (testLoadFailedWithTLSErrors): Check that LoadFailedWithTLSErrors
+        event was added to the events vector.
+        * TestWebKitAPI/gtk/WebKit2Gtk/LoadTrackingTest.cpp:
+        (loadFailedCallback): Do not assume the web view URI is the
+        failing URI when the load fails before the committed state.
+        (loadFailedWithTLSErrorsCallback): Handle the case of load failure
+        because of TLS errors can call LoadTrackingTest::loadFailedWithTLSErrors.
+        (LoadTrackingTest::LoadTrackingTest): Connect to WebKitWebView::load-failed-with-tls-errors.
+        (LoadTrackingTest::loadFailedWithTLSErrors): Add
+        LoadFailedWithTLSErrors event to the events vector.
+        * TestWebKitAPI/gtk/WebKit2Gtk/LoadTrackingTest.h:
+
</ins><span class="cx"> 2014-09-17  Renato Nagy  &lt;rnagy@inf.u-szeged.hu&gt;
</span><span class="cx"> 
</span><span class="cx">         [EFL][GTK] Remove WebKit1 related codes
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKit2GtkTestSSLcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestSSL.cpp (173690 => 173691)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestSSL.cpp        2014-09-17 12:35:08 UTC (rev 173690)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestSSL.cpp        2014-09-17 16:11:12 UTC (rev 173691)
</span><span class="lines">@@ -150,43 +150,37 @@
</span><span class="cx"> 
</span><span class="cx">     TLSErrorsTest()
</span><span class="cx">         : m_tlsErrors(static_cast&lt;GTlsCertificateFlags&gt;(0))
</span><ins>+        , m_failingURI(nullptr)
</ins><span class="cx">     {
</span><del>-        g_signal_connect(m_webView, &quot;load-failed-with-tls-errors&quot;, G_CALLBACK(runLoadFailedWithTLSErrorsCallback), this);
</del><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     ~TLSErrorsTest()
</span><span class="cx">     {
</span><del>-        g_signal_handlers_disconnect_matched(m_webView, G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, this);
</del><ins>+        if (m_failingURI)
+            soup_uri_free(m_failingURI);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    static gboolean runLoadFailedWithTLSErrorsCallback(WebKitWebView*, GTlsCertificate* certificate, GTlsCertificateFlags tlsErrors, const char* host, TLSErrorsTest* test)
</del><ins>+    bool loadFailedWithTLSErrors(const char* failingURI, GTlsCertificate* certificate, GTlsCertificateFlags tlsErrors) override
</ins><span class="cx">     {
</span><del>-        test-&gt;runLoadFailedWithTLSErrors(certificate, tlsErrors, host);
-        return TRUE;
-    }
</del><ins>+        LoadTrackingTest::loadFailedWithTLSErrors(failingURI, certificate, tlsErrors);
</ins><span class="cx"> 
</span><del>-    void runLoadFailedWithTLSErrors(GTlsCertificate* certificate, GTlsCertificateFlags tlsErrors, const char* host)
-    {
</del><span class="cx">         assertObjectIsDeletedWhenTestFinishes(G_OBJECT(certificate));
</span><span class="cx">         m_certificate = certificate;
</span><span class="cx">         m_tlsErrors = tlsErrors;
</span><del>-        m_host.reset(g_strdup(host));
-        g_main_loop_quit(m_mainLoop);
</del><ins>+        if (m_failingURI)
+            soup_uri_free(m_failingURI);
+        m_failingURI = soup_uri_new(failingURI);
+        return true;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    void waitUntilLoadFailedWithTLSErrors()
-    {
-        g_main_loop_run(m_mainLoop);
-    }
-
</del><span class="cx">     GTlsCertificate* certificate() const { return m_certificate.get(); }
</span><span class="cx">     GTlsCertificateFlags tlsErrors() const { return m_tlsErrors; }
</span><del>-    const char* host() const { return m_host.get(); }
</del><ins>+    const char* host() const { return m_failingURI-&gt;host; }
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     GRefPtr&lt;GTlsCertificate&gt; m_certificate;
</span><span class="cx">     GTlsCertificateFlags m_tlsErrors;
</span><del>-    GUniquePtr&lt;char&gt; m_host;
</del><ins>+    SoupURI* m_failingURI;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> static void testLoadFailedWithTLSErrors(TLSErrorsTest* test, gconstpointer)
</span><span class="lines">@@ -196,13 +190,13 @@
</span><span class="cx"> 
</span><span class="cx">     // The load-failed-with-tls-errors signal should be emitted when there is a TLS failure.
</span><span class="cx">     test-&gt;loadURI(kHttpsServer-&gt;getURIForPath(&quot;/test-tls/&quot;).data());
</span><del>-    test-&gt;waitUntilLoadFailedWithTLSErrors();
-    // Test the WebKitCertificateInfo API.
</del><ins>+    test-&gt;waitUntilLoadFinished();
</ins><span class="cx">     g_assert(G_IS_TLS_CERTIFICATE(test-&gt;certificate()));
</span><span class="cx">     g_assert_cmpuint(test-&gt;tlsErrors(), ==, G_TLS_CERTIFICATE_UNKNOWN_CA);
</span><span class="cx">     g_assert_cmpstr(test-&gt;host(), ==, soup_uri_get_host(kHttpsServer-&gt;baseURI()));
</span><span class="cx">     g_assert_cmpint(test-&gt;m_loadEvents[0], ==, LoadTrackingTest::ProvisionalLoadStarted);
</span><del>-    g_assert_cmpint(test-&gt;m_loadEvents[1], ==, LoadTrackingTest::LoadFinished);
</del><ins>+    g_assert_cmpint(test-&gt;m_loadEvents[1], ==, LoadTrackingTest::LoadFailedWithTLSErrors);
+    g_assert_cmpint(test-&gt;m_loadEvents[2], ==, LoadTrackingTest::LoadFinished);
</ins><span class="cx"> 
</span><span class="cx">     // Test allowing an exception for this certificate on this host.
</span><span class="cx">     webkit_web_context_allow_tls_certificate_for_host(context, test-&gt;certificate(), test-&gt;host());
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPIgtkWebKit2GtkLoadTrackingTestcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/gtk/WebKit2Gtk/LoadTrackingTest.cpp (173690 => 173691)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/gtk/WebKit2Gtk/LoadTrackingTest.cpp        2014-09-17 12:35:08 UTC (rev 173690)
+++ trunk/Tools/TestWebKitAPI/gtk/WebKit2Gtk/LoadTrackingTest.cpp        2014-09-17 16:11:12 UTC (rev 173691)
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx">     switch (loadEvent) {
</span><span class="cx">     case WEBKIT_LOAD_STARTED:
</span><span class="cx">         g_assert(!webkit_web_view_is_loading(webView));
</span><del>-        g_assert_cmpstr(test-&gt;m_activeURI.data(), ==, webkit_web_view_get_uri(webView));
</del><ins>+        g_assert_cmpstr(test-&gt;m_activeURI.data(), ==, failingURI);
</ins><span class="cx">         g_assert(error);
</span><span class="cx">         test-&gt;provisionalLoadFailed(failingURI, error);
</span><span class="cx">         break;
</span><span class="lines">@@ -83,6 +83,16 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static gboolean loadFailedWithTLSErrorsCallback(WebKitWebView* webView, const char* failingURI, GTlsCertificate* certificate, GTlsCertificateFlags tlsErrors, LoadTrackingTest* test)
+{
+    test-&gt;m_loadFailed = true;
+    g_assert(!webkit_web_view_is_loading(webView));
+    g_assert_cmpstr(test-&gt;m_activeURI.data(), ==, failingURI);
+    g_assert(G_IS_TLS_CERTIFICATE(certificate));
+    g_assert(tlsErrors);
+    return test-&gt;loadFailedWithTLSErrors(failingURI, certificate, tlsErrors);
+}
+
</ins><span class="cx"> static void estimatedProgressChangedCallback(GObject*, GParamSpec*, LoadTrackingTest* test)
</span><span class="cx"> {
</span><span class="cx">     test-&gt;estimatedProgressChanged();
</span><span class="lines">@@ -94,6 +104,7 @@
</span><span class="cx"> {
</span><span class="cx">     g_signal_connect(m_webView, &quot;load-changed&quot;, G_CALLBACK(loadChangedCallback), this);
</span><span class="cx">     g_signal_connect(m_webView, &quot;load-failed&quot;, G_CALLBACK(loadFailedCallback), this);
</span><ins>+    g_signal_connect(m_webView, &quot;load-failed-with-tls-errors&quot;, G_CALLBACK(loadFailedWithTLSErrorsCallback), this);
</ins><span class="cx">     g_signal_connect(m_webView, &quot;notify::estimated-load-progress&quot;, G_CALLBACK(estimatedProgressChangedCallback), this);
</span><span class="cx"> 
</span><span class="cx">     g_assert(!webkit_web_view_get_uri(m_webView));
</span><span class="lines">@@ -143,6 +154,12 @@
</span><span class="cx">     m_loadEvents.append(LoadFailed);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool LoadTrackingTest::loadFailedWithTLSErrors(const gchar* /*failingURI*/, GTlsCertificate*, GTlsCertificateFlags)
+{
+    m_loadEvents.append(LoadFailedWithTLSErrors);
+    return false;
+}
+
</ins><span class="cx"> void LoadTrackingTest::estimatedProgressChanged()
</span><span class="cx"> {
</span><span class="cx">     double progress = webkit_web_view_get_estimated_load_progress(m_webView);
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPIgtkWebKit2GtkLoadTrackingTesth"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/gtk/WebKit2Gtk/LoadTrackingTest.h (173690 => 173691)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/gtk/WebKit2Gtk/LoadTrackingTest.h        2014-09-17 12:35:08 UTC (rev 173690)
+++ trunk/Tools/TestWebKitAPI/gtk/WebKit2Gtk/LoadTrackingTest.h        2014-09-17 16:11:12 UTC (rev 173691)
</span><span class="lines">@@ -34,6 +34,7 @@
</span><span class="cx">     virtual void provisionalLoadStarted();
</span><span class="cx">     virtual void provisionalLoadReceivedServerRedirect();
</span><span class="cx">     virtual void provisionalLoadFailed(const gchar* failingURI, GError*);
</span><ins>+    virtual bool loadFailedWithTLSErrors(const gchar* failingURI, GTlsCertificate*, GTlsCertificateFlags);
</ins><span class="cx">     virtual void loadCommitted();
</span><span class="cx">     virtual void loadFinished();
</span><span class="cx">     virtual void loadFailed(const char* failingURI, GError*);
</span><span class="lines">@@ -56,7 +57,8 @@
</span><span class="cx">         ProvisionalLoadFailed,
</span><span class="cx">         LoadCommitted,
</span><span class="cx">         LoadFinished,
</span><del>-        LoadFailed
</del><ins>+        LoadFailed,
+        LoadFailedWithTLSErrors
</ins><span class="cx">     };
</span><span class="cx">     bool m_runLoadUntilCompletion;
</span><span class="cx">     bool m_loadFailed;
</span></span></pre>
</div>
</div>

</body>
</html>