Changeset 63011 in webkit


Ignore:
Timestamp:
Jul 9, 2010 4:10:07 PM (14 years ago)
Author:
tonyg@chromium.org
Message:

2010-07-09 Tony Gentilcore <tonyg@chromium.org>

Reviewed by Dimitri Glazkov.

Implement performance.timing.navigationStart
https://bugs.webkit.org/show_bug.cgi?id=41815

  • fast/dom/script-tests/webtiming.js: (checkTimingBeforeLoad): (checkWebTimingOnLoad): (checkWebTimingAfterLoad):
  • fast/dom/webtiming-expected.txt:

2010-07-09 Tony Gentilcore <tonyg@chromium.org>

Reviewed by Dimitri Glazkov.

Implement performance.timing.navigationStart
https://bugs.webkit.org/show_bug.cgi?id=41815

See: http://dev.w3.org/2006/webapi/WebTiming/#nt-navigation-start

  • loader/FrameLoader.cpp: (WebCore::FrameLoader::loadWithDocumentLoader):
  • loader/FrameLoaderTypes.h: (WebCore::FrameLoadTimeline::FrameLoadTimeline):
  • page/Timing.cpp: (WebCore::Timing::navigationStart):
Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r63010 r63011  
     12010-07-09  Tony Gentilcore  <tonyg@chromium.org>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        Implement performance.timing.navigationStart
     6        https://bugs.webkit.org/show_bug.cgi?id=41815
     7
     8        * fast/dom/script-tests/webtiming.js:
     9        (checkTimingBeforeLoad):
     10        (checkWebTimingOnLoad):
     11        (checkWebTimingAfterLoad):
     12        * fast/dom/webtiming-expected.txt:
     13
    1142010-07-09  Albert J. Wong  <ajwong@chromium.org>
    215
  • trunk/LayoutTests/fast/dom/script-tests/webtiming.js

    r62984 r63011  
    3939function checkTimingBeforeLoad()
    4040{
    41     shouldBeGreaterThanOrEqual("timing.unloadEventEnd", "timing.oneHourAgoUTC");
     41    shouldBeGreaterThanOrEqual("timing.navigationStart", "oneHourAgoUTC");
     42
     43    shouldBeGreaterThanOrEqual("timing.unloadEventEnd", "timing.navigationStart");
    4244
    4345    shouldBe("timing.loadEventStart", "0");
     
    4951function checkWebTimingOnLoad()
    5052{
    51     shouldBeGreaterThanOrEqual("timing.unloadEventEnd", "timing.oneHourAgoUTC");
     53    shouldBeGreaterThanOrEqual("timing.navigationStart", "oneHourAgoUTC");
     54
     55    shouldBeGreaterThanOrEqual("timing.unloadEventEnd", "timing.navigationStart");
    5256
    5357    shouldBeGreaterThanOrEqual("timing.loadEventStart", "timing.unloadEventEnd");
     
    5963function checkWebTimingAfterLoad()
    6064{
    61     shouldBeGreaterThanOrEqual("timing.unloadEventEnd", "timing.oneHourAgoUTC");
     65    shouldBeGreaterThanOrEqual("timing.navigationStart", "oneHourAgoUTC");
     66
     67    shouldBeGreaterThanOrEqual("timing.unloadEventEnd", "timing.navigationStart");
    6268
    6369    shouldBeGreaterThanOrEqual("timing.loadEventStart", "timing.unloadEventEnd");
  • trunk/LayoutTests/fast/dom/webtiming-expected.txt

    r62984 r63011  
    44
    55
    6 FAIL timing.unloadEventEnd should be >= timing.oneHourAgoUTC. Was undefined (of type undefined).
     6FAIL timing.navigationStart should be >= oneHourAgoUTC. Was undefined (of type undefined).
     7FAIL timing.unloadEventEnd should be >= timing.navigationStart. Was undefined (of type undefined).
    78FAIL timing.loadEventStart should be 0 (of type number). Was undefined (of type undefined).
    89FAIL timing.loadEventEnd should be 0 (of type number). Was undefined (of type undefined).
    9 FAIL timing.unloadEventEnd should be >= timing.oneHourAgoUTC. Was undefined (of type undefined).
     10FAIL timing.navigationStart should be >= oneHourAgoUTC. Was undefined (of type undefined).
     11FAIL timing.unloadEventEnd should be >= timing.navigationStart. Was undefined (of type undefined).
    1012FAIL timing.loadEventStart should be >= timing.unloadEventEnd. Was undefined (of type undefined).
    1113FAIL timing.loadEventEnd should be 0 (of type number). Was undefined (of type undefined).
    12 FAIL timing.unloadEventEnd should be >= timing.oneHourAgoUTC. Was undefined (of type undefined).
     14FAIL timing.navigationStart should be >= oneHourAgoUTC. Was undefined (of type undefined).
     15FAIL timing.unloadEventEnd should be >= timing.navigationStart. Was undefined (of type undefined).
    1316FAIL timing.loadEventStart should be >= timing.unloadEventEnd. Was undefined (of type undefined).
    1417FAIL timing.loadEventEnd should be >= timing.loadEventStart + 50. Was undefined (of type undefined).
  • trunk/WebCore/ChangeLog

    r63003 r63011  
     12010-07-09  Tony Gentilcore  <tonyg@chromium.org>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        Implement performance.timing.navigationStart
     6        https://bugs.webkit.org/show_bug.cgi?id=41815
     7
     8        See: http://dev.w3.org/2006/webapi/WebTiming/#nt-navigation-start
     9
     10        * loader/FrameLoader.cpp:
     11        (WebCore::FrameLoader::loadWithDocumentLoader):
     12        * loader/FrameLoaderTypes.h:
     13        (WebCore::FrameLoadTimeline::FrameLoadTimeline):
     14        * page/Timing.cpp:
     15        (WebCore::Timing::navigationStart):
     16
    1172010-07-09  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
    218
  • trunk/WebCore/loader/FrameLoader.cpp

    r62984 r63011  
    15021502
    15031503    m_frameLoadTimeline = FrameLoadTimeline();
     1504    m_frameLoadTimeline.navigationStart = currentTime();
    15041505
    15051506    policyChecker()->setLoadType(type);
  • trunk/WebCore/loader/FrameLoaderTypes.h

    r62984 r63011  
    6363    struct FrameLoadTimeline {
    6464        FrameLoadTimeline()
    65             : unloadEventEnd(0)
     65            : navigationStart(0)
     66            , unloadEventEnd(0)
    6667            , loadEventStart(0)
    6768            , loadEventEnd(0)
     
    6970        }
    7071
     72        double navigationStart;
    7173        double unloadEventEnd;
    7274        double loadEventStart;
  • trunk/WebCore/page/Timing.cpp

    r62984 r63011  
    5858        return 0;
    5959
    60     return 0; // FIXME
     60    return static_cast<unsigned long long>(m_frame->loader()->frameLoadTimeline()->navigationStart * 1000);
    6161}
    6262
Note: See TracChangeset for help on using the changeset viewer.