Changeset 274111 in webkit


Ignore:
Timestamp:
Mar 8, 2021, 2:47:21 PM (4 years ago)
Author:
weinig@apple.com
Message:

Add preference reseting to WebKitLegacy Windows to simplify testing reset
https://bugs.webkit.org/show_bug.cgi?id=222865

Reviewed by Brent Fulgham.

Source/WebKitLegacy/win:

Add resetForTesting() function to allow easy reseting of all preferences
for testing, matching functionality added to Cocoa WebKitLegacy.

  • Interfaces/IWebPreferencesPrivate.idl:
  • WebPreferences.cpp:

(WebPreferences::resetForTesting):

  • WebPreferences.h:

Tools:

  • DumpRenderTree/win/DumpRenderTree.cpp:

(resetWebPreferencesToConsistentValues):
Call the new resetForTesting() method to ensure all values are reset back
to defaults for each test without have to explicitly list them.

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKitLegacy/win/ChangeLog

    r274089 r274111  
     12021-03-08  Sam Weinig  <weinig@apple.com>
     2
     3        Add preference reseting to WebKitLegacy Windows to simplify testing reset
     4        https://bugs.webkit.org/show_bug.cgi?id=222865
     5
     6        Reviewed by Brent Fulgham.
     7
     8        Add resetForTesting() function to allow easy reseting of all preferences
     9        for testing, matching functionality added to Cocoa WebKitLegacy.
     10
     11        * Interfaces/IWebPreferencesPrivate.idl:
     12        * WebPreferences.cpp:
     13        (WebPreferences::resetForTesting):
     14        * WebPreferences.h:
     15
    1162021-03-08  Stephan Szabo  <stephan.szabo@sony.com>
    217
  • trunk/Source/WebKitLegacy/win/Interfaces/IWebPreferencesPrivate.idl

    r270613 r274111  
    278278    HRESULT overscrollBehaviorEnabled([ out, retval ] BOOL*);
    279279    HRESULT setOverscrollBehaviorEnabled([in] BOOL enabled);
    280 }
     280    HRESULT resetForTesting();
     281}
     282
     283// NOTE: Please do not add any more preferences that are only for testing purposes. Instead,
     284// please use the generalized set<type>PreferenceForTesting() functions.
  • trunk/Source/WebKitLegacy/win/WebPreferences.cpp

    r271122 r274111  
    26122612    return S_OK;
    26132613}
     2614
     2615HRESULT WebPreferences::resetForTesting()
     2616{
     2617    load();
     2618    return S_OK;
     2619}
  • trunk/Source/WebKitLegacy/win/WebPreferences.h

    r270613 r274111  
    316316    virtual HRESULT STDMETHODCALLTYPE overscrollBehaviorEnabled(_Out_ BOOL*);
    317317    virtual HRESULT STDMETHODCALLTYPE setOverscrollBehaviorEnabled(BOOL);
     318    virtual HRESULT STDMETHODCALLTYPE resetForTesting();
    318319
    319320    // WebPreferences
  • trunk/Tools/ChangeLog

    r274108 r274111  
     12021-03-08  Sam Weinig  <weinig@apple.com>
     2
     3        Add preference reseting to WebKitLegacy Windows to simplify testing reset
     4        https://bugs.webkit.org/show_bug.cgi?id=222865
     5
     6        Reviewed by Brent Fulgham.
     7
     8        * DumpRenderTree/win/DumpRenderTree.cpp:
     9        (resetWebPreferencesToConsistentValues):
     10        Call the new resetForTesting() method to ensure all values are reset back
     11        to defaults for each test without have to explicitly list them.
     12
    1132021-03-08  Aakash Jain  <aakash_jain@apple.com>
    214
  • trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp

    r271593 r274111  
    838838    ASSERT(preferences);
    839839
    840     enableExperimentalFeatures(preferences);
    841 
    842840    preferences->setAutosaves(FALSE);
    843841
    844842    COMPtr<IWebPreferencesPrivate8> prefsPrivate(Query, preferences);
    845843    ASSERT(prefsPrivate);
     844
     845    prefsPrivate->resetForTesting();
     846
     847    enableExperimentalFeatures(preferences);
     848
    846849    prefsPrivate->setFullScreenEnabled(TRUE);
    847850
Note: See TracChangeset for help on using the changeset viewer.