Changeset 154727 in webkit


Ignore:
Timestamp:
Aug 28, 2013 2:29:30 AM (11 years ago)
Author:
sergio@webkit.org
Message:

[Soup] WebTiming information not shown in the inspector
https://bugs.webkit.org/show_bug.cgi?id=118395

Reviewed by Martin Robinson.

Source/WebCore:

WebTiming information was not correctly provided to WebCore
because the gotHeadersCallback was incorrectly resetting the
original ResourceResponse (which had the ResourceLoadTiming
object) instead of simply updating their contents using the
SoupMessage.

No new test required as this feature is already covered by the
existing webtiming tests. In any case this change includes a fix
for the http/tests/misc/webtiming-ssl.php test which was not
failing even if it should because it was not correct.

  • platform/network/soup/ResourceHandleSoup.cpp:

(WebCore::gotHeadersCallback):
(WebCore::restartedCallback): restartedCallback should be
available only if WEB_TIMING is defined.
(WebCore::createSoupMessageForHandleAndRequest): Ditto.

LayoutTests:

Fixed the webiming-ssl.php test that was incorrectly considering a
FAIL as the expected result. It was probably just a legacy
decision which came from the times where DRT was responsible of
reporting WebTiming information.

Also added a new test that fails due to wkb.ug/103927. It was not
detected before because there were no timing information in the
response.

  • http/tests/misc/resources/webtiming-ssl.html:
  • http/tests/misc/webtiming-ssl-expected.txt:
  • platform/gtk/TestExpectations: added

http/tests/w3c/webperf/submission/Google/resource-timing/html/test_resource_attribute_order.html.

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r154726 r154727  
     12013-08-28  Sergio Villar Senin  <svillar@igalia.com>
     2
     3        [Soup] WebTiming information not shown in the inspector
     4        https://bugs.webkit.org/show_bug.cgi?id=118395
     5
     6        Reviewed by Martin Robinson.
     7
     8        Fixed the webiming-ssl.php test that was incorrectly considering a
     9        FAIL as the expected result. It was probably just a legacy
     10        decision which came from the times where DRT was responsible of
     11        reporting WebTiming information.
     12
     13        Also added a new test that fails due to wkb.ug/103927. It was not
     14        detected before because there were no timing information in the
     15        response.
     16
     17        * http/tests/misc/resources/webtiming-ssl.html:
     18        * http/tests/misc/webtiming-ssl-expected.txt:
     19        * platform/gtk/TestExpectations: added
     20        http/tests/w3c/webperf/submission/Google/resource-timing/html/test_resource_attribute_order.html.
     21
    1222013-08-28  Gabor Rapcsanyi  <rgabor@webkit.org>
    223
  • trunk/LayoutTests/http/tests/misc/resources/webtiming-ssl.html

    r115470 r154727  
    1010<div id="console"></div>
    1111<script>
    12 description("This test checks that Web Timing reports secureConnectionStart correctly and has reasonable values for connectStart and connectEnd. Note that DumpRenderTree doesn't set secureConnectionStart.");
     12description("This test checks that Web Timing reports secureConnectionStart correctly and has reasonable values for connectStart and connectEnd.");
    1313
    1414window.performance = window.performance || {};
  • trunk/LayoutTests/http/tests/misc/webtiming-ssl-expected.txt

    r75560 r154727  
    1 This test checks that Web Timing reports secureConnectionStart correctly and has reasonable values for connectStart and connectEnd. Note that DumpRenderTree doesn't set secureConnectionStart.
     1This test checks that Web Timing reports secureConnectionStart correctly and has reasonable values for connectStart and connectEnd.
    22
    33On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
     
    55
    66PASS timing.connectStart is >= timing.navigationStart
    7 FAIL timing.secureConnectionStart should be >= timing.connectStart. Was 0 (of type number).
     7PASS timing.secureConnectionStart is >= timing.connectStart
    88PASS timing.connectEnd is >= timing.secureConnectionStart
    99PASS successfullyParsed is true
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r154697 r154727  
    12751275webkit.org/b/103927 http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_cross_origin_resource_request.html [ Failure ]
    12761276webkit.org/b/103927 http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_timing_allow_cross_origin_resource_request.html [ Failure ]
     1277webkit.org/b/103927 http/tests/w3c/webperf/submission/Google/resource-timing/html/test_resource_attribute_order.html [ Failure ]
    12771278webkit.org/b/103927 http/tests/w3c/webperf/submission/Google/resource-timing/html/test_resource_frame_initiator_type.html [ Failure ]
    12781279webkit.org/b/103927 http/tests/w3c/webperf/submission/Google/resource-timing/html/test_resource_initiator_types.html [ Failure ]
  • trunk/Source/WebCore/ChangeLog

    r154722 r154727  
     12013-08-28  Sergio Villar Senin  <svillar@igalia.com>
     2
     3        [Soup] WebTiming information not shown in the inspector
     4        https://bugs.webkit.org/show_bug.cgi?id=118395
     5
     6        Reviewed by Martin Robinson.
     7
     8        WebTiming information was not correctly provided to WebCore
     9        because the gotHeadersCallback was incorrectly resetting the
     10        original ResourceResponse (which had the ResourceLoadTiming
     11        object) instead of simply updating their contents using the
     12        SoupMessage.
     13
     14        No new test required as this feature is already covered by the
     15        existing webtiming tests. In any case this change includes a fix
     16        for the http/tests/misc/webtiming-ssl.php test which was not
     17        failing even if it should because it was not correct.
     18
     19        * platform/network/soup/ResourceHandleSoup.cpp:
     20        (WebCore::gotHeadersCallback):
     21        (WebCore::restartedCallback): restartedCallback should be
     22        available only if WEB_TIMING is defined.
     23        (WebCore::createSoupMessageForHandleAndRequest): Ditto.
     24
    1252013-08-26  Antonio Gomes  <a1.gomes@sisa.samsung.com>
    226
  • trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp

    r154197 r154727  
    353353    // The original response will be needed later to feed to willSendRequest in
    354354    // doRedirect() in case we are redirected. For this reason, we store it here.
    355     ResourceResponse response;
    356     response.updateFromSoupMessage(message);
    357     d->m_response = response;
     355    d->m_response.updateFromSoupMessage(message);
    358356}
    359357
     
    394392}
    395393
     394#if ENABLE(WEB_TIMING)
    396395// Called each time the message is going to be sent again except the first time.
    397396// This happens when libsoup handles HTTP authentication.
     
    402401        return;
    403402
    404 #if ENABLE(WEB_TIMING)
    405403    ResourceHandleInternal* d = handle->getInternal();
    406404    ResourceResponse& redirectResponse = d->m_response;
    407405    redirectResponse.setResourceLoadTiming(ResourceLoadTiming::create());
    408406    redirectResponse.resourceLoadTiming()->requestTime = monotonicallyIncreasingTime();
    409 #endif
    410 }
     407}
     408#endif
    411409
    412410static bool shouldRedirect(ResourceHandle* handle)
     
    971969
    972970    g_signal_connect(d->m_soupMessage.get(), "got-headers", G_CALLBACK(gotHeadersCallback), handle);
    973     g_signal_connect(d->m_soupMessage.get(), "restarted", G_CALLBACK(restartedCallback), handle);
    974971    g_signal_connect(d->m_soupMessage.get(), "wrote-body-data", G_CALLBACK(wroteBodyDataCallback), handle);
    975972
     
    979976    d->m_response.setResourceLoadTiming(ResourceLoadTiming::create());
    980977    g_signal_connect(d->m_soupMessage.get(), "network-event", G_CALLBACK(networkEventCallback), handle);
     978    g_signal_connect(d->m_soupMessage.get(), "restarted", G_CALLBACK(restartedCallback), handle);
    981979    g_signal_connect(d->m_soupMessage.get(), "wrote-body", G_CALLBACK(wroteBodyCallback), handle);
    982980#endif
Note: See TracChangeset for help on using the changeset viewer.