Skip to content
  • commit-queue@webkit.org's avatar
    Source/WebCore: [Resource Timing] implementation of cross origin resouce timing restrictions. · e291215c
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=84886.
    
    Patch by Pan Deng <pan.deng@intel.com> on 2012-12-02
    Reviewed by Tony Gentilcore.
    
    This patch implemented resource timing behaviors of cross origin. By default, detailed timing info is hided in cross origin resource timing, only startTime, duration, fetchStart and responseEnd can be observed. Exceptions are, server side allow its origin can be timing by another through a header with "timing-allow-origin" field.
    
    Tests: http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_cross_origin_resource_request.html
           http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_timing_allow_cross_origin_resource_request.html
    
    * page/Performance.cpp:
    (WebCore::passesTimingAllowCheck):
    (WebCore):
    (WebCore::Performance::addResourceTiming):
    * page/Performance.h:
    (WebCore):
    (Performance):
    * page/PerformanceResourceTiming.cpp:
    (WebCore):
    * page/PerformanceResourceTiming.h:
    (WebCore::PerformanceResourceTiming::create):
    (PerformanceResourceTiming):
    
    LayoutTests: [Resource Timing]Test cases of cross origin resource timing.
    https://bugs.webkit.org/show_bug.cgi?id=84886.
    
    Patch by Pan Deng <pan.deng@intel.com> on 2012-12-02
    Reviewed by Tony Gentilcore.
    
    Test cases in this patch validate resource timing behavior when cross origin request with/without "allow-timing-origin" response header.
    
    * http/tests/w3c/webperf/resources/blank_page_green_with_allow_timing.php: Added.
    * http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_cross_origin_resource_request-expected.txt: Added.
    * http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_cross_origin_resource_request.html: Added.
    * http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_timing_allow_cross_origin_resource_request-expected.txt: Added.
    * http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_timing_allow_cross_origin_resource_request.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136329 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    e291215c