Changeset 79565 in webkit


Ignore:
Timestamp:
Feb 24, 2011 7:51:13 AM (13 years ago)
Author:
simonjam@chromium.org
Message:

2011-02-24 James Simonsen <simonjam@chromium.org>

Reviewed by Tony Gentilcore.

[Web Timing] Zero out navigationStart and unloadEvent on cross-origin redirect
https://bugs.webkit.org/show_bug.cgi?id=55068

  • http/tests/misc/resources/webtiming-cross-origin-and-back2.html: Expect navStart and unload to be zero.
  • http/tests/misc/resources/webtiming-cross-origin-redirect.html: Expect navStart to be zero.
  • http/tests/misc/webtiming-origins-expected.txt:

2011-02-24 James Simonsen <simonjam@chromium.org>

Reviewed by Tony Gentilcore.

[Web Timing] Zero out navigationStart and unloadEvent on cross-origin redirect
https://bugs.webkit.org/show_bug.cgi?id=55068

Test: http/tests/misc/webtiming-origins.html

  • page/PerformanceTiming.cpp: (WebCore::PerformanceTiming::navigationStart): Zero out on cross origin redirect. (WebCore::PerformanceTiming::unloadEventStart): Ditto. (WebCore::PerformanceTiming::unloadEventEnd): Ditto.
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r79560 r79565  
     12011-02-24  James Simonsen  <simonjam@chromium.org>
     2
     3        Reviewed by Tony Gentilcore.
     4
     5        [Web Timing] Zero out navigationStart and unloadEvent on cross-origin redirect
     6        https://bugs.webkit.org/show_bug.cgi?id=55068
     7
     8        * http/tests/misc/resources/webtiming-cross-origin-and-back2.html: Expect navStart and unload to be zero.
     9        * http/tests/misc/resources/webtiming-cross-origin-redirect.html: Expect navStart to be zero.
     10        * http/tests/misc/webtiming-origins-expected.txt:
     11
    1122011-02-24  Pavel Podivilov  <podivilov@chromium.org>
    213
  • trunk/LayoutTests/http/tests/misc/resources/webtiming-cross-origin-and-back2.html

    r75560 r79565  
    1717function performTest() {
    1818    // FIXME: Need a way to synchronize the test so that loadEventEnd is non-zero.
    19     var shouldBeZeroList = ["loadEventEnd", "redirectStart", "redirectEnd", "secureConnectionStart"];
     19    var shouldBeZeroList = ["loadEventEnd", "navigationStart", "redirectStart", "redirectEnd", "secureConnectionStart", "unloadEventEnd", "unloadEventStart"];
    2020
    2121    var timingProperties = new Array;
  • trunk/LayoutTests/http/tests/misc/resources/webtiming-cross-origin-redirect.html

    r75560 r79565  
    1717function performTest() {
    1818    // FIXME: Need a way to synchronize the test so that loadEventEnd is non-zero.
    19     var shouldBeZeroList = ["loadEventEnd", "redirectStart", "redirectEnd", "secureConnectionStart", "unloadEventStart", "unloadEventEnd"];
     19    var shouldBeZeroList = ["loadEventEnd", "navigationStart", "redirectStart", "redirectEnd", "secureConnectionStart", "unloadEventEnd", "unloadEventStart"];
    2020
    2121    var timingProperties = new Array;
  • trunk/LayoutTests/http/tests/misc/webtiming-origins-expected.txt

    r75560 r79565  
    5656PASS timing.loadEventEnd is 0
    5757PASS timing.loadEventStart is non-zero.
    58 PASS timing.navigationStart is non-zero.
     58PASS timing.navigationStart is 0
    5959PASS timing.redirectEnd is 0
    6060PASS timing.redirectStart is 0
     
    9191PASS timing.loadEventEnd is 0
    9292PASS timing.loadEventStart is non-zero.
    93 PASS timing.navigationStart is non-zero.
     93PASS timing.navigationStart is 0
    9494PASS timing.redirectEnd is 0
    9595PASS timing.redirectStart is 0
     
    9898PASS timing.responseStart is non-zero.
    9999PASS timing.secureConnectionStart is 0
    100 PASS timing.unloadEventEnd is non-zero.
    101 PASS timing.unloadEventStart is non-zero.
     100PASS timing.unloadEventEnd is 0
     101PASS timing.unloadEventStart is 0
    102102PASS navigation.redirectCount is 0
    103103PASS successfullyParsed is true
  • trunk/Source/WebCore/ChangeLog

    r79563 r79565  
     12011-02-24  James Simonsen  <simonjam@chromium.org>
     2
     3        Reviewed by Tony Gentilcore.
     4
     5        [Web Timing] Zero out navigationStart and unloadEvent on cross-origin redirect
     6        https://bugs.webkit.org/show_bug.cgi?id=55068
     7
     8        Test: http/tests/misc/webtiming-origins.html
     9
     10        * page/PerformanceTiming.cpp:
     11        (WebCore::PerformanceTiming::navigationStart): Zero out on cross origin redirect.
     12        (WebCore::PerformanceTiming::unloadEventStart): Ditto.
     13        (WebCore::PerformanceTiming::unloadEventEnd): Ditto.
     14
    1152011-02-24  Adam Klein  <adamk@chromium.org>
    216
  • trunk/Source/WebCore/page/PerformanceTiming.cpp

    r75560 r79565  
    9595        return 0;
    9696
     97    if (timing->hasCrossOriginRedirect)
     98        return 0;
     99
    97100    return toIntegerMilliseconds(timing->navigationStart);
    98101}
     
    104107        return 0;
    105108
    106     if (!timing->hasSameOriginAsPreviousDocument)
     109    if (timing->hasCrossOriginRedirect || !timing->hasSameOriginAsPreviousDocument)
    107110        return 0;
    108111
     
    116119        return 0;
    117120
    118     if (!timing->hasSameOriginAsPreviousDocument)
     121    if (timing->hasCrossOriginRedirect || !timing->hasSameOriginAsPreviousDocument)
    119122        return 0;
    120123
Note: See TracChangeset for help on using the changeset viewer.