Changeset 249702 in webkit


Ignore:
Timestamp:
Sep 9, 2019 9:06:42 PM (5 years ago)
Author:
Chris Dumez
Message:

REGRESSION: http/tests/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations.html is frequently timing out on iOS EWS bots
https://bugs.webkit.org/show_bug.cgi?id=201550

Reviewed by Alex Christensen.

Source/WebCore:

  • loader/ResourceLoadObserver.h:

(WebCore::ResourceLoadObserver::hasStatistics const):

Source/WebKit:

  • WebProcess/InjectedBundle/API/c/WKBundle.cpp:

(WKBundleResourceLoadStatisticsNotifyObserver):

  • WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:

Tools:

Update testRunner.statisticsNotifyObserver() to return a boolean indicating if it did
anything or not.

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::statisticsNotifyObserver):

  • WebKitTestRunner/InjectedBundle/InjectedBundle.h:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::statisticsNotifyObserver):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:

LayoutTests:

Update test to do checks on a timer if its call to testRunner.statisticsNotifyObserver() is a no-op
due to having no statistics to send to the network process.

  • http/tests/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations.html:
Location:
trunk
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r249686 r249702  
     12019-09-09  Chris Dumez  <cdumez@apple.com>
     2
     3        REGRESSION: http/tests/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations.html is frequently timing out on iOS EWS bots
     4        https://bugs.webkit.org/show_bug.cgi?id=201550
     5
     6        Reviewed by Alex Christensen.
     7
     8        Update test to do checks on a timer if its call to testRunner.statisticsNotifyObserver() is a no-op
     9        due to having no statistics to send to the network process.
     10
     11        * http/tests/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations.html:
     12
    1132019-09-09  Joonghun Park  <pjh0718@gmail.com>
    214
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations.html

    r236578 r249702  
    1111    jsTestIsAsync = true;
    1212
     13    let timerHandle = 0;
     14
    1315    function finishTest() {
     16        if (timerHandle)
     17          clearTimeout(timerHandle);
     18
    1419        shouldBeFalse('testRunner.isStatisticsRegisteredAsSubFrameUnder("http://localhost", "http://127.0.0.1")');
    1520        shouldBeFalse('testRunner.isStatisticsRegisteredAsSubFrameUnder("http://127.0.0.1", "http://localhost")');
     
    2934                testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    3035                testRunner.installStatisticsDidScanDataRecordsCallback(finishTest);
    31                 testRunner.statisticsNotifyObserver();
     36                if (!testRunner.statisticsNotifyObserver())
     37                    timerHandle = setTimeout(finishTest, 100);
    3238                break;
    3339            default:
  • trunk/LayoutTests/platform/ios-wk2/TestExpectations

    r249595 r249702  
    13551355# problem with blur handling
    13561356mathml/focus-event-handling.html [ Failure ]
    1357 
    1358 webkit.org/b/201550 http/tests/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations.html [ Pass Timeout ]
  • trunk/Source/WebCore/ChangeLog

    r249701 r249702  
     12019-09-09  Chris Dumez  <cdumez@apple.com>
     2
     3        REGRESSION: http/tests/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations.html is frequently timing out on iOS EWS bots
     4        https://bugs.webkit.org/show_bug.cgi?id=201550
     5
     6        Reviewed by Alex Christensen.
     7
     8        * loader/ResourceLoadObserver.h:
     9        (WebCore::ResourceLoadObserver::hasStatistics const):
     10
    1112019-09-09  Timothy Hatcher  <timothy@apple.com>
    212
  • trunk/Source/WebCore/loader/ResourceLoadObserver.h

    r249603 r249702  
    5858    virtual void clearState() { }
    5959   
     60    virtual bool hasStatistics() const { return false; }
     61   
    6062#if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED
    6163    virtual void setShouldLogUserInteraction(bool) { }
  • trunk/Source/WebKit/ChangeLog

    r249684 r249702  
     12019-09-09  Chris Dumez  <cdumez@apple.com>
     2
     3        REGRESSION: http/tests/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations.html is frequently timing out on iOS EWS bots
     4        https://bugs.webkit.org/show_bug.cgi?id=201550
     5
     6        Reviewed by Alex Christensen.
     7
     8        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
     9        (WKBundleResourceLoadStatisticsNotifyObserver):
     10        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
     11
    1122019-09-09  Alex Christensen  <achristensen@webkit.org>
    213
  • trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.cpp

    r249575 r249702  
    312312}
    313313
    314 void WKBundleResourceLoadStatisticsNotifyObserver(WKBundleRef)
    315 {
     314bool WKBundleResourceLoadStatisticsNotifyObserver(WKBundleRef)
     315{
     316    if (!WebCore::ResourceLoadObserver::shared().hasStatistics())
     317        return false;
     318
    316319    WebCore::ResourceLoadObserver::shared().updateCentralStatisticsStore();
     320    return true;
    317321}
    318322
  • trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h

    r249575 r249702  
    9393
    9494WK_EXPORT void WKBundleClearResourceLoadStatistics(WKBundleRef);
    95 WK_EXPORT void WKBundleResourceLoadStatisticsNotifyObserver(WKBundleRef);
     95WK_EXPORT bool WKBundleResourceLoadStatisticsNotifyObserver(WKBundleRef);
    9696
    9797WK_EXPORT void WKBundleExtendClassesForParameterCoder(WKBundleRef bundle, WKArrayRef classes);
  • trunk/Source/WebKit/WebProcess/WebCoreSupport/WebResourceLoadObserver.h

    r249603 r249702  
    5757    void updateCentralStatisticsStore() final;
    5858    void clearState() final;
     59   
     60    bool hasStatistics() const final { return !m_perSessionResourceStatisticsMap.isEmpty(); }
    5961
    6062private:
  • trunk/Tools/ChangeLog

    r249701 r249702  
     12019-09-09  Chris Dumez  <cdumez@apple.com>
     2
     3        REGRESSION: http/tests/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations.html is frequently timing out on iOS EWS bots
     4        https://bugs.webkit.org/show_bug.cgi?id=201550
     5
     6        Reviewed by Alex Christensen.
     7
     8        Update testRunner.statisticsNotifyObserver() to return a boolean indicating if it did
     9        anything or not.
     10
     11        * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
     12        * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
     13        (WTR::InjectedBundle::statisticsNotifyObserver):
     14        * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
     15        * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
     16        (WTR::TestRunner::statisticsNotifyObserver):
     17        * WebKitTestRunner/InjectedBundle/TestRunner.h:
     18
    1192019-09-09  Timothy Hatcher  <timothy@apple.com>
    220
  • trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl

    r249675 r249702  
    322322    void setStatisticsCrossSiteLoadWithLinkDecoration(DOMString fromHost, DOMString toHost);
    323323    void setStatisticsTimeToLiveUserInteraction(double seconds);
    324     void statisticsNotifyObserver();
     324    boolean statisticsNotifyObserver();
    325325    void statisticsProcessStatisticsAndDataRecords();
    326326    void statisticsUpdateCookieBlocking(object completionHandler);
  • trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp

    r249575 r249702  
    10181018}
    10191019
    1020 void InjectedBundle::statisticsNotifyObserver()
    1021 {
    1022     WKBundleResourceLoadStatisticsNotifyObserver(m_bundle);
     1020bool InjectedBundle::statisticsNotifyObserver()
     1021{
     1022    return WKBundleResourceLoadStatisticsNotifyObserver(m_bundle);
    10231023}
    10241024
  • trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h

    r245280 r249702  
    134134    void setAllowsAnySSLCertificate(bool);
    135135
    136     void statisticsNotifyObserver();
     136    bool statisticsNotifyObserver();
    137137
    138138    void textDidChangeInTextField();
  • trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp

    r249675 r249702  
    19321932}
    19331933
    1934 void TestRunner::statisticsNotifyObserver()
    1935 {
    1936     InjectedBundle::singleton().statisticsNotifyObserver();
     1934bool TestRunner::statisticsNotifyObserver()
     1935{
     1936    return InjectedBundle::singleton().statisticsNotifyObserver();
    19371937}
    19381938
  • trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h

    r249675 r249702  
    387387    void statisticsDidScanDataRecordsCallback();
    388388    void statisticsDidRunTelemetryCallback(unsigned totalPrevalentResources, unsigned totalPrevalentResourcesWithUserInteraction, unsigned top3SubframeUnderTopFrameOrigins);
    389     void statisticsNotifyObserver();
     389    bool statisticsNotifyObserver();
    390390    void statisticsProcessStatisticsAndDataRecords();
    391391    void statisticsUpdateCookieBlocking(JSValueRef completionHandler);
Note: See TracChangeset for help on using the changeset viewer.