Changeset 74242 in webkit


Ignore:
Timestamp:
Dec 17, 2010 2:37:55 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2010-12-17 James Simonsen <simonjam@chromium.org>

Reviewed by Darin Fisher.

[Web Timing] Add sslHandshakeStart to interface

https://bugs.webkit.org/show_bug.cgi?id=50400

  • fast/dom/Window/window-properties-performance-expected.txt: Added sslHandshakeStart.
  • fast/dom/script-tests/webtiming.js: Ditto. (checkTimingBeforeLoad): (checkTimingWhileDeferred): (checkWebTimingOnDOMContentLoaded): (checkWebTimingWhileAsync): (checkWebTimingOnLoad): (checkWebTimingAfterLoad):
  • fast/dom/webtiming-document-open-expected.txt: Ditto.
  • fast/dom/webtiming-expected.txt: Ditto.
  • fast/dom/webtiming-navigate-within-document-expected.txt: Ditto.
  • http/tests/misc/resources/webtiming-ssl.html: Added.
  • http/tests/misc/webtiming-ssl-expected.txt: Added.
  • http/tests/misc/webtiming-ssl.php: Added.
  • platform/gtk/Skipped: WebTiming disabled here.
  • platform/mac/Skipped: Ditto.
  • platform/win/Skipped: Ditto.

2010-12-17 James Simonsen <simonjam@chromium.org>

Reviewed by Darin Fisher.

[Web Timing] Add sslHandshakeStart to interface

https://bugs.webkit.org/show_bug.cgi?id=50400

Test: http/tests/misc/webtiming-ssl.php

  • page/PerformanceTiming.cpp: (WebCore::PerformanceTiming::connectStart): Update comment. (WebCore::PerformanceTiming::connectEnd): Remove SSL time. (WebCore::PerformanceTiming::sslHandshakeStart): Added.
  • page/PerformanceTiming.h: Added sslHandshakeStart.
  • page/PerformanceTiming.idl: Ditto.
Location:
trunk
Files:
3 added
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r74241 r74242  
     12010-12-17  James Simonsen  <simonjam@chromium.org>
     2
     3        Reviewed by Darin Fisher.
     4
     5        [Web Timing] Add sslHandshakeStart to interface
     6
     7        https://bugs.webkit.org/show_bug.cgi?id=50400
     8
     9        * fast/dom/Window/window-properties-performance-expected.txt: Added sslHandshakeStart.
     10        * fast/dom/script-tests/webtiming.js: Ditto.
     11        (checkTimingBeforeLoad):
     12        (checkTimingWhileDeferred):
     13        (checkWebTimingOnDOMContentLoaded):
     14        (checkWebTimingWhileAsync):
     15        (checkWebTimingOnLoad):
     16        (checkWebTimingAfterLoad):
     17        * fast/dom/webtiming-document-open-expected.txt: Ditto.
     18        * fast/dom/webtiming-expected.txt: Ditto.
     19        * fast/dom/webtiming-navigate-within-document-expected.txt: Ditto.
     20        * http/tests/misc/resources/webtiming-ssl.html: Added.
     21        * http/tests/misc/webtiming-ssl-expected.txt: Added.
     22        * http/tests/misc/webtiming-ssl.php: Added.
     23        * platform/gtk/Skipped: WebTiming disabled here.
     24        * platform/mac/Skipped: Ditto.
     25        * platform/win/Skipped: Ditto.
     26
    1272010-12-17  James Simonsen  <simonjam@chromium.org>
    228
  • trunk/LayoutTests/fast/dom/Window/window-properties-performance-expected.txt

    r74241 r74242  
    3131window.webkitPerformance.timing.responseEnd [number]
    3232window.webkitPerformance.timing.responseStart [number]
     33window.webkitPerformance.timing.sslHandshakeStart [number]
    3334window.webkitPerformance.timing.unloadEventEnd [number]
    3435window.webkitPerformance.timing.unloadEventStart [number]
  • trunk/LayoutTests/fast/dom/script-tests/webtiming.js

    r72415 r74242  
    3535    shouldBeGreaterThanOrEqual("timing.connectEnd", "timing.connectStart");
    3636
     37    shouldBe("timing.sslHandshakeStart", "0");
     38
    3739    shouldBeGreaterThanOrEqual("timing.requestStart", "timing.connectEnd");
    3840
     
    6870    shouldBeGreaterThanOrEqual("timing.connectEnd", "timing.connectStart");
    6971
     72    shouldBe("timing.sslHandshakeStart", "0");
     73
    7074    shouldBeGreaterThanOrEqual("timing.requestStart", "timing.connectEnd");
    7175
     
    102106    shouldBeGreaterThanOrEqual("timing.connectEnd", "timing.connectStart");
    103107
    104     shouldBeGreaterThanOrEqual("timing.requestStart", "timing.connectEnd");
    105    
     108    shouldBe("timing.sslHandshakeStart", "0");
     109
     110    shouldBeGreaterThanOrEqual("timing.requestStart", "timing.connectEnd");
     111
    106112    shouldBeGreaterThanOrEqual("timing.responseStart", "timing.requestStart");
    107113
     
    142148    shouldBeGreaterThanOrEqual("timing.connectEnd", "timing.connectStart");
    143149
     150    shouldBe("timing.sslHandshakeStart", "0");
     151
    144152    shouldBeGreaterThanOrEqual("timing.requestStart", "timing.connectEnd");
    145153
     
    176184    shouldBeGreaterThanOrEqual("timing.connectStart", "timing.domainLookupEnd");
    177185    shouldBeGreaterThanOrEqual("timing.connectEnd", "timing.connectStart");
     186
     187    shouldBe("timing.sslHandshakeStart", "0");
    178188
    179189    shouldBeGreaterThanOrEqual("timing.requestStart", "timing.connectEnd");
     
    213223    shouldBeGreaterThanOrEqual("timing.connectEnd", "timing.connectStart");
    214224
     225    shouldBe("timing.sslHandshakeStart", "0");
     226
    215227    shouldBeGreaterThanOrEqual("timing.requestStart", "timing.connectEnd");
    216228
  • trunk/LayoutTests/fast/dom/webtiming-document-open-expected.txt

    r73241 r74242  
    2222PASS timing.responseEnd is originalTiming.responseEnd
    2323PASS timing.responseStart is originalTiming.responseStart
     24PASS timing.sslHandshakeStart is originalTiming.sslHandshakeStart
    2425PASS timing.unloadEventEnd is originalTiming.unloadEventEnd
    2526PASS timing.unloadEventStart is originalTiming.unloadEventStart
  • trunk/LayoutTests/fast/dom/webtiming-expected.txt

    r72415 r74242  
    1515PASS timing.connectStart is >= timing.domainLookupEnd
    1616PASS timing.connectEnd is >= timing.connectStart
     17PASS timing.sslHandshakeStart is 0
    1718PASS timing.requestStart is >= timing.connectEnd
    1819PASS timing.responseStart is >= timing.requestStart
     
    3536PASS timing.connectStart is >= timing.domainLookupEnd
    3637PASS timing.connectEnd is >= timing.connectStart
     38PASS timing.sslHandshakeStart is 0
    3739PASS timing.requestStart is >= timing.connectEnd
    3840PASS timing.responseStart is >= timing.requestStart
     
    5557PASS timing.connectStart is >= timing.domainLookupEnd
    5658PASS timing.connectEnd is >= timing.connectStart
     59PASS timing.sslHandshakeStart is 0
    5760PASS timing.requestStart is >= timing.connectEnd
    5861PASS timing.responseStart is >= timing.requestStart
     
    7578PASS timing.connectStart is >= timing.domainLookupEnd
    7679PASS timing.connectEnd is >= timing.connectStart
     80PASS timing.sslHandshakeStart is 0
    7781PASS timing.requestStart is >= timing.connectEnd
    7882PASS timing.responseStart is >= timing.requestStart
     
    9599PASS timing.connectStart is >= timing.domainLookupEnd
    96100PASS timing.connectEnd is >= timing.connectStart
     101PASS timing.sslHandshakeStart is 0
    97102PASS timing.requestStart is >= timing.connectEnd
    98103PASS timing.responseStart is >= timing.requestStart
     
    116121PASS timing.connectStart is >= timing.domainLookupEnd
    117122PASS timing.connectEnd is >= timing.connectStart
     123PASS timing.sslHandshakeStart is 0
    118124PASS timing.requestStart is >= timing.connectEnd
    119125PASS timing.responseStart is >= timing.requestStart
  • trunk/LayoutTests/fast/dom/webtiming-navigate-within-document-expected.txt

    r72415 r74242  
    2222PASS responseEnd is unchanged.
    2323PASS responseStart is unchanged.
     24PASS sslHandshakeStart is unchanged.
    2425PASS unloadEventEnd is unchanged.
    2526PASS unloadEventStart is unchanged.
  • trunk/LayoutTests/platform/gtk/Skipped

    r74215 r74242  
    53125312fast/dom/webtiming-document-open.html
    53135313http/tests/misc/webtiming-one-redirect.php
     5314http/tests/misc/webtiming-ssl.php
    53145315http/tests/misc/webtiming-two-redirects.php
    53155316
  • trunk/LayoutTests/platform/mac/Skipped

    r74235 r74242  
    220220fast/dom/webtiming-navigate-within-document.html
    221221http/tests/misc/webtiming-one-redirect.php
     222http/tests/misc/webtiming-ssl.php
    222223http/tests/misc/webtiming-two-redirects.php
    223224
  • trunk/LayoutTests/platform/win/Skipped

    r74235 r74242  
    10391039fast/dom/webtiming-navigate-within-document.html
    10401040http/tests/misc/webtiming-one-redirect.php
     1041http/tests/misc/webtiming-ssl.php
    10411042http/tests/misc/webtiming-two-redirects.php
    10421043
  • trunk/WebCore/ChangeLog

    r74241 r74242  
     12010-12-17  James Simonsen  <simonjam@chromium.org>
     2
     3        Reviewed by Darin Fisher.
     4
     5        [Web Timing] Add sslHandshakeStart to interface
     6
     7        https://bugs.webkit.org/show_bug.cgi?id=50400
     8
     9        Test: http/tests/misc/webtiming-ssl.php
     10
     11        * page/PerformanceTiming.cpp:
     12        (WebCore::PerformanceTiming::connectStart): Update comment.
     13        (WebCore::PerformanceTiming::connectEnd): Remove SSL time.
     14        (WebCore::PerformanceTiming::sslHandshakeStart): Added.
     15        * page/PerformanceTiming.h: Added sslHandshakeStart.
     16        * page/PerformanceTiming.idl: Ditto.
     17
    1182010-12-17  James Simonsen  <simonjam@chromium.org>
    219
  • trunk/WebCore/page/PerformanceTiming.cpp

    r72415 r74242  
    185185        return domainLookupEnd();
    186186
    187     // ResourceLoadTiming's connect phase includes DNS and SSL, however Web Timing's
     187    // ResourceLoadTiming's connect phase includes DNS, however Navigation Timing's
    188188    // connect phase should not. So if there is DNS time, trim it from the start.
    189189    if (timing->dnsEnd >= 0 && timing->dnsEnd > connectStart)
     
    209209        return connectStart();
    210210
    211     // ResourceLoadTiming's connect phase includes DNS and SSL, however Web Timing's
    212     // connect phase should not. So if there is SSL time, trim it from the end.
    213     if (timing->sslStart >= 0 && timing->sslStart < connectEnd)
    214         connectEnd = timing->sslStart;
    215 
    216211    return resourceLoadTimeRelativeToAbsolute(connectEnd);
     212}
     213
     214unsigned long long PerformanceTiming::sslHandshakeStart() const
     215{
     216    DocumentLoader* loader = documentLoader();
     217    if (!loader)
     218        return 0;
     219
     220    ResourceLoadTiming* timing = loader->response().resourceLoadTiming();
     221    if (!timing)
     222        return 0;
     223
     224    int sslStart = timing->sslStart;
     225    if (sslStart < 0)
     226        return 0;
     227
     228    return resourceLoadTimeRelativeToAbsolute(sslStart);
    217229}
    218230
  • trunk/WebCore/page/PerformanceTiming.h

    r72415 r74242  
    6262    unsigned long long connectStart() const;
    6363    unsigned long long connectEnd() const;
     64    unsigned long long sslHandshakeStart() const;
    6465    unsigned long long requestStart() const;
    6566    unsigned long long responseStart() const;
  • trunk/WebCore/page/PerformanceTiming.idl

    r72415 r74242  
    4343        readonly attribute unsigned long long connectStart;
    4444        readonly attribute unsigned long long connectEnd;
     45        readonly attribute unsigned long long sslHandshakeStart;
    4546        readonly attribute unsigned long long requestStart;
    4647        readonly attribute unsigned long long responseStart;
Note: See TracChangeset for help on using the changeset viewer.