Changeset 203110 in webkit


Ignore:
Timestamp:
Jul 12, 2016 2:04:49 AM (8 years ago)
Author:
yoav@yoav.ws
Message:

js/dom/global-constructors-attributes.html is flaky: ResourceTiming runtime feature leaks between tests
https://bugs.webkit.org/show_bug.cgi?id=158902

Reviewed by Benjamin Poulain.

Adds a new reset() mechanism to RuntimeEnabledFeatures so that they could be brought back to the initial state.
This reset() is then called from DumpRenderTree and WebKitTestRunner.

No new tests but hopefully current tests will be less flaky.

  • bindings/generic/RuntimeEnabledFeatures.cpp:

(WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
(WebCore::RuntimeEnabledFeatures::reset):

  • bindings/generic/RuntimeEnabledFeatures.h:
  • testing/Internals.cpp:

(WebCore::Internals::resetToConsistentState): reset RuntimeEnabledFeatures.

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r203109 r203110  
     12016-07-12  Yoav Weiss  <yoav@yoav.ws>
     2
     3        js/dom/global-constructors-attributes.html is flaky: ResourceTiming runtime feature leaks between tests
     4        https://bugs.webkit.org/show_bug.cgi?id=158902
     5
     6        Reviewed by Benjamin Poulain.
     7
     8        Adds a new reset() mechanism to RuntimeEnabledFeatures so that they could be brought back to the initial state.
     9        This reset() is then called from DumpRenderTree and WebKitTestRunner.
     10
     11        No new tests but hopefully current tests will be less flaky.
     12
     13        * bindings/generic/RuntimeEnabledFeatures.cpp:
     14        (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
     15        (WebCore::RuntimeEnabledFeatures::reset):
     16        * bindings/generic/RuntimeEnabledFeatures.h:
     17        * testing/Internals.cpp:
     18        (WebCore::Internals::resetToConsistentState): reset RuntimeEnabledFeatures.
     19
    1202016-07-11  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
    221
  • trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp

    r202704 r203110  
    4141
    4242RuntimeEnabledFeatures::RuntimeEnabledFeatures()
    43     : m_isLocalStorageEnabled(true)
    44     , m_isSessionStorageEnabled(true)
    45     , m_isWebkitNotificationsEnabled(false)
    46     , m_isApplicationCacheEnabled(true)
    47     , m_isDataTransferItemsEnabled(true)
    48     , m_isGeolocationEnabled(true)
    49     , m_isTouchEnabled(true)
    50     , m_isDeviceMotionEnabled(true)
    51     , m_isDeviceOrientationEnabled(true)
    52     , m_isLinkPreloadEnabled(false)
    53     , m_isLangAttributeAwareFormControlUIEnabled(false)
     43{
     44    reset();
     45}
     46
     47void RuntimeEnabledFeatures::reset()
     48{
     49    m_isLocalStorageEnabled = true;
     50    m_isSessionStorageEnabled = true;
     51    m_isWebkitNotificationsEnabled = false;
     52    m_isApplicationCacheEnabled = true;
     53    m_isDataTransferItemsEnabled = true;
     54    m_isGeolocationEnabled = true;
     55    m_isTouchEnabled = true;
     56    m_isDeviceMotionEnabled = true;
     57    m_isDeviceOrientationEnabled = true;
     58    m_isLinkPreloadEnabled = false;
     59    m_isLangAttributeAwareFormControlUIEnabled = false;
    5460#if PLATFORM(IOS)
    55     , m_isPluginReplacementEnabled(true)
     61    m_isPluginReplacementEnabled = true;
    5662#else
    57     , m_isPluginReplacementEnabled(false)
     63    m_isPluginReplacementEnabled = false;
    5864#endif
    59     , m_isResourceTimingEnabled(false)
     65    m_isResourceTimingEnabled = false;
    6066#if ENABLE(INDEXED_DATABASE)
    61     , m_isIndexedDBEnabled(false)
     67    m_isIndexedDBEnabled = true;
    6268#endif
    6369#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
    64     , m_isIndexedDBWorkersEnabled(true)
     70    m_isIndexedDBWorkersEnabled = true;
    6571#endif
    6672#if ENABLE(MEDIA_STREAM) && PLATFORM(COCOA)
    67     , m_isMediaStreamEnabled(false)
     73    m_isMediaStreamEnabled = false;
    6874#endif
    6975#if ENABLE(WEB_RTC)
    70     , m_isPeerConnectionEnabled(true)
     76    m_isPeerConnectionEnabled = true;
    7177#endif
    7278#if ENABLE(LEGACY_CSS_VENDOR_PREFIXES)
    73     , m_isLegacyCSSVendorPrefixesEnabled(false)
     79    m_isLegacyCSSVendorPrefixesEnabled = false;
    7480#endif
    7581#if ENABLE(JAVASCRIPT_I18N_API)
    76     , m_isJavaScriptI18NAPIEnabled(false)
     82    m_isJavaScriptI18NAPIEnabled = false;
    7783#endif
    7884#if ENABLE(INPUT_TYPE_DATE)
    79     , m_isInputTypeDateEnabled(true)
     85    m_isInputTypeDateEnabled = true;
    8086#endif
    8187#if ENABLE(INPUT_TYPE_DATETIME_INCOMPLETE)
    82     , m_isInputTypeDateTimeEnabled(false)
     88    m_isInputTypeDateTimeEnabled = false;
    8389#endif
    8490#if ENABLE(INPUT_TYPE_DATETIMELOCAL)
    85     , m_isInputTypeDateTimeLocalEnabled(true)
     91    m_isInputTypeDateTimeLocalEnabled = true;
    8692#endif
    8793#if ENABLE(INPUT_TYPE_MONTH)
    88     , m_isInputTypeMonthEnabled(true)
     94    m_isInputTypeMonthEnabled = true;
    8995#endif
    9096#if ENABLE(INPUT_TYPE_TIME)
    91     , m_isInputTypeTimeEnabled(true)
     97    m_isInputTypeTimeEnabled = true;
    9298#endif
    9399#if ENABLE(INPUT_TYPE_WEEK)
    94     , m_isInputTypeWeekEnabled(true)
     100    m_isInputTypeWeekEnabled = true;
    95101#endif
    96102#if ENABLE(CSP_NEXT)
    97     , m_areExperimentalContentSecurityPolicyFeaturesEnabled(false)
     103    m_areExperimentalContentSecurityPolicyFeaturesEnabled = false;
    98104#endif
    99105#if ENABLE(FONT_LOAD_EVENTS)
    100     , m_isFontLoadEventsEnabled(true)
     106    m_isFontLoadEventsEnabled = true;
    101107#endif
    102108#if ENABLE(GAMEPAD)
    103     , m_areGamepadsEnabled(false)
     109    m_areGamepadsEnabled = false;
    104110#endif
    105111#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
    106     , m_areAnimationTriggersEnabled(false)
     112    m_areAnimationTriggersEnabled = false;
    107113#endif
    108114#if ENABLE(WEB_ANIMATIONS)
    109     , m_areWebAnimationsEnabled(false)
     115    m_areWebAnimationsEnabled = false;
    110116#endif
    111117#if ENABLE(CSS_GRID_LAYOUT)
    112     , m_cssGridLayoutEnabled(true)
     118    m_cssGridLayoutEnabled = true;
    113119#endif
    114 {
     120
    115121}
    116122
  • trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h

    r202728 r203110  
    229229    WEBCORE_EXPORT static RuntimeEnabledFeatures& sharedFeatures();
    230230
     231    WEBCORE_EXPORT void reset();
     232
    231233private:
    232234    // Never instantiate.
  • trunk/Source/WebCore/testing/Internals.cpp

    r203075 r203110  
    429429        document.page()->setMockMediaPlaybackTargetPickerEnabled(true);
    430430#endif
     431    RuntimeEnabledFeatures::sharedFeatures().reset();
    431432}
    432433
Note: See TracChangeset for help on using the changeset viewer.