Changeset 209073 in webkit


Ignore:
Timestamp:
Nov 29, 2016 9:16:08 AM (7 years ago)
Author:
Simon Fraser
Message:

intersection-observer-entry-interface.html test fails on the bots
https://bugs.webkit.org/show_bug.cgi?id=165133

Reviewed by Darin Adler.

Tests that enabled Intersection Observer via <!-- webkit-test-runner [ enableIntersectionObserver=true ] -->
would fail sometimes, because TestController::ensureViewSupportsOptionsForTest() failed to check
to see if this option required creating a new web view, so would just use the old view without
even resetting preferences.

In general, TestController doesn't distinguish properly between options that require the creation
of a new view (like mock scrollbars), and those that can be simply reset as resetPreferencesToConsistentValues()
does.

Do the easy fix of having viewSupportsOptions() check options.enableIntersectionObserver. We should probably
just call resetPreferencesToConsistentValues() even when re-use the same view.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetPreferencesToConsistentValues):

  • WebKitTestRunner/ios/PlatformWebViewIOS.mm:

(WTR::PlatformWebView::viewSupportsOptions):

  • WebKitTestRunner/mac/PlatformWebViewMac.mm:

(WTR::PlatformWebView::viewSupportsOptions):

Location:
trunk/Tools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r209024 r209073  
     12016-11-29  Simon Fraser  <simon.fraser@apple.com>
     2
     3        intersection-observer-entry-interface.html test fails on the bots
     4        https://bugs.webkit.org/show_bug.cgi?id=165133
     5
     6        Reviewed by Darin Adler.
     7       
     8        Tests that enabled Intersection Observer via <!-- webkit-test-runner [ enableIntersectionObserver=true ] -->
     9        would fail sometimes, because TestController::ensureViewSupportsOptionsForTest() failed to check
     10        to see if this option required creating a new web view, so would just use the old view without
     11        even resetting preferences.
     12       
     13        In general, TestController doesn't distinguish properly between options that require the creation
     14        of a new view (like mock scrollbars), and those that can be simply reset as resetPreferencesToConsistentValues()
     15        does.
     16       
     17        Do the easy fix of having viewSupportsOptions() check options.enableIntersectionObserver. We should probably
     18        just call resetPreferencesToConsistentValues() even when re-use the same view.
     19       
     20        * WebKitTestRunner/TestController.cpp:
     21        (WTR::TestController::resetPreferencesToConsistentValues):
     22        * WebKitTestRunner/ios/PlatformWebViewIOS.mm:
     23        (WTR::PlatformWebView::viewSupportsOptions):
     24        * WebKitTestRunner/mac/PlatformWebViewMac.mm:
     25        (WTR::PlatformWebView::viewSupportsOptions):
     26
    1272016-11-28  Ryan Haddad  <ryanhaddad@apple.com>
    228
  • trunk/Tools/WebKitTestRunner/TestController.cpp

    r209024 r209073  
    648648    WKPreferencesSetTabToLinksEnabled(preferences, false);
    649649    WKPreferencesSetInteractiveFormValidationEnabled(preferences, true);
     650
    650651    WKPreferencesSetMockScrollbarsEnabled(preferences, options.useMockScrollbars);
    651652    WKPreferencesSetNeedsSiteSpecificQuirks(preferences, options.needsSiteSpecificQuirks);
  • trunk/Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm

    r206449 r209073  
    279279bool PlatformWebView::viewSupportsOptions(const TestOptions& options) const
    280280{
    281     if (m_options.overrideLanguages != options.overrideLanguages || m_options.needsSiteSpecificQuirks != options.needsSiteSpecificQuirks || m_options.useCharacterSelectionGranularity != options.useCharacterSelectionGranularity)
     281    if (m_options.overrideLanguages != options.overrideLanguages
     282        || m_options.needsSiteSpecificQuirks != options.needsSiteSpecificQuirks
     283        || m_options.useCharacterSelectionGranularity != options.useCharacterSelectionGranularity
     284        || m_options.enableIntersectionObserver != options.enableIntersectionObserver)
    282285        return false;
    283286
  • trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm

    r208455 r209073  
    274274bool PlatformWebView::viewSupportsOptions(const TestOptions& options) const
    275275{
    276     if (m_options.useThreadedScrolling != options.useThreadedScrolling || m_options.overrideLanguages != options.overrideLanguages || m_options.useMockScrollbars != options.useMockScrollbars || m_options.needsSiteSpecificQuirks != options.needsSiteSpecificQuirks)
     276    if (m_options.useThreadedScrolling != options.useThreadedScrolling
     277        || m_options.overrideLanguages != options.overrideLanguages
     278        || m_options.useMockScrollbars != options.useMockScrollbars
     279        || m_options.needsSiteSpecificQuirks != options.needsSiteSpecificQuirks
     280        || m_options.enableIntersectionObserver != options.enableIntersectionObserver)
    277281        return false;
    278282
Note: See TracChangeset for help on using the changeset viewer.