Bug 128594 - [WK2][WTR] Implement overridePreference() for non-boolean values
Summary: [WK2][WTR] Implement overridePreference() for non-boolean values
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 42197
  Show dependency treegraph
 
Reported: 2014-02-11 04:28 PST by Dániel Bátyai
Modified: 2017-06-22 07:17 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dániel Bátyai 2014-02-11 04:28:12 PST
TestRunner::overridePreference() is currently only implemented for boolean preferences
Comment 1 Simon Fraser (smfr) 2017-06-16 14:02:39 PDT
When is overridePreference() still needed?
Comment 2 Frédéric Wang (:fredw) 2017-06-18 23:51:04 PDT
In bug 171914, I have to disable platform/mac/fast/frames/flattening/set-preference.html because overridePreference does not support non-boolean values.

22:36:46 - smfr : why do you need to use overridePreference?
22:36:56 - smfr : tests can just poke at internals.settings
22:37:11 - smfr : or is it too late after a test starts?
22:41:36 - fredw : I don't remember exactly. I believe internals.settings is enough. But other settings in mac/DumpRenderTree.mm and tests set a default value via this overridePreference so I thought it would be a bit inconsistent.
22:43:26 - smfr : i think many tests that use overridePreference pre-date internals.settings and could just be converted

Here are the list of tests still using overridePreference:
./plugins/netscape-plugin-page-cache-works.html:    testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./plugins/netscape-plugin-page-cache-works.html:    testRunner.overridePreference("WebKitPageCacheSupportsPluginsPreferenceKey", 1);
./plugins/frameset-with-plugin-frame.html:        testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./plugins/frameset-with-plugin-frame.html:        testRunner.overridePreference("WebKitPageCacheSupportsPluginsPreferenceKey", 1);
./plugins/crash-restoring-plugin-page-from-page-cache.html:    testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./plugins/crash-restoring-plugin-page-from-page-cache.html:    testRunner.overridePreference("WebKitPageCacheSupportsPluginsPreferenceKey", 1);
./loader/meta-refresh-disabled.html:    testRunner.overridePreference("WebKitHTTPEquivEnabled", "0");
./loader/go-back-to-different-window-size.html:      testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./loader/go-back-cached-main-resource.html:        testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./accessibility/gtk/caret-offsets.html:    testRunner.overridePreference("WebKitEnableCaretBrowsing", true);
./accessibility/gtk/caret-browsing-text-focus.html:  testRunner.overridePreference("WebKitEnableCaretBrowsing", true);
./accessibility/gtk/caret-offsets-and-extraneous-white-spaces.html:    testRunner.overridePreference("WebKitEnableCaretBrowsing", true);
./accessibility/gtk/text-in-span-block-in-a-block.html:    testRunner.overridePreference("WebKitEnableCaretBrowsing", true);
./accessibility/gtk/caret-browsing-select-focus.html:  testRunner.overridePreference("WebKitEnableCaretBrowsing", true);
./accessibility/mac/caret-browsing-tab-selection.html:        testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./accessibility/mac/selection-element-tabbing-to-link.html:        testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./accessibility/mac/focus-setting-selection-syncronizing-not-clearing.html:        testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./accessibility/mac/selection-notification-focus-change.html:                    testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./compositing/page-cache-back-crash.html:    window.testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./compositing/iframes/page-cache-layer-tree.html:        window.testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./compositing/show-composited-iframe-on-back-button.html:    testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./tiled-drawing/scrolling/null-parent-back-crash.html:            testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration.html:            testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./css3/filters/effect-hue-rotate.html:    window.testRunner.overridePreference("WebKitAcceleratedCompositingEnabled", "0");
./css3/filters/effect-grayscale.html:    window.testRunner.overridePreference("WebKitAcceleratedCompositingEnabled", "0");
./css3/filters/blur-filter-page-scroll-parents.html:                window.testRunner.overridePreference("WebKitAcceleratedCompositingEnabled", "0");
./css3/filters/blur-filter-page-scroll-self.html:                window.testRunner.overridePreference("WebKitAcceleratedCompositingEnabled", "0");
./css3/filters/effect-opacity.html:    window.testRunner.overridePreference("WebKitAcceleratedCompositingEnabled", "0");
./css3/filters/effect-contrast.html:    window.testRunner.overridePreference("WebKitAcceleratedCompositingEnabled", "0");
./css3/filters/effect-invert.html:    window.testRunner.overridePreference("WebKitAcceleratedCompositingEnabled", "0");
./css3/filters/effect-brightness-clamping.html:    window.testRunner.overridePreference("WebKitAcceleratedCompositingEnabled", "0");
./css3/filters/effect-blur.html:    window.testRunner.overridePreference("WebKitAcceleratedCompositingEnabled", "0");
./css3/filters/effect-saturate.html:    window.testRunner.overridePreference("WebKitAcceleratedCompositingEnabled", "0");
./css3/filters/effect-combined.html:    window.testRunner.overridePreference("WebKitAcceleratedCompositingEnabled", "0");
./css3/filters/effect-brightness.html:    window.testRunner.overridePreference("WebKitAcceleratedCompositingEnabled", "0");
./css3/filters/effect-drop-shadow.html:    window.testRunner.overridePreference("WebKitAcceleratedCompositingEnabled", "0");
./css3/filters/effect-sepia.html:    window.testRunner.overridePreference("WebKitAcceleratedCompositingEnabled", "0");
./css3/filters/filter-repaint.html:          window.testRunner.overridePreference("WebKitAcceleratedCompositingEnabled", "0");
./css3/filters/null-effect-check.html:    window.testRunner.overridePreference("WebKitAcceleratedCompositingEnabled", "0");
./css3/filters/blur-filter-page-scroll.html:                window.testRunner.overridePreference("WebKitAcceleratedCompositingEnabled", "0");
./css3/blending/blend-mode-isolation-turn-off-self-painting-layer1.html:      window.testRunner.overridePreference("WebKitAcceleratedCompositingEnabled", "1");
./css3/blending/blend-mode-simple.html:            window.testRunner.overridePreference("WebKitAcceleratedCompositingEnabled", "1");
./css3/blending/effect-background-blend-mode.html:        window.testRunner.overridePreference("WebKitAcceleratedCompositingEnabled", "1");
./media/tab-focus-inside-media-elements.html:    testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./media/crash-closing-page-with-media-as-plugin-fallback.html:    testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./media/crash-closing-page-with-media-as-plugin-fallback.html:    testRunner.overridePreference("WebKitPageCacheSupportsPluginsPreferenceKey", 1);
./media/media-controls-accessibility.html:    testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1); 
./media/restore-from-page-cache.html:                testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./animations/resume-after-page-cache.html:        window.testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 0);
./animations/resume-after-page-cache.html:    window.testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./swipe/pushState-programmatic-back-while-swiping-crash.html:    testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./swipe/basic-cached-back-swipe.html:        testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./swipe/main-frame-pinning-requirement.html:        testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./swipe/pushState-cached-back-swipe.html:    testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./svg/as-image/svg-image-with-data-uri-images-disabled.html:      testRunner.overridePreference('WebKitDisplayImagesKey', 0);
./fast/overflow/horizontal-scroll-after-back.html:        testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/loader/stateobjects/no-popstate-when-back-to-stateless-entry-with-page-cache.html:        testRunner.overridePreference('WebKitUsesPageCachePreferenceKey', 1);
./fast/loader/stateobjects/popstate-fires-with-page-cache.html:        testRunner.overridePreference('WebKitUsesPageCachePreferenceKey', 1);
./fast/loader/unschedule-relayout-after-unload.html:    testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/loader/images-enabled-unset-can-block-image-and-can-reload-in-place.html:    testRunner.overridePreference('WebKitDisplayImagesKey', 1);
./fast/loader/window-properties-restored-from-page-cache.html:	testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/loader/frames-with-unload-handlers-in-page-cache.html:    testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/loader/scroll-position-restored-on-back.html:            testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/loader/display-image-unset-can-block-image-and-can-reload-in-place.html:    testRunner.overridePreference('WebKitDisplayImagesKey', 0);
./fast/loader/display-image-unset-can-block-image-and-can-reload-in-place.html:    testRunner.overridePreference('WebKitDisplayImagesKey', 1);
./fast/loader/input-element-page-cache-crash.html:    testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/loader/image-in-page-cache.html:		testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/text/international/locale-sensitive-fonts.html:<!-- This tests locale-sensitive font selection.  Using overridePreference,  the
./fast/text/zero-font-size.html:        testRunner.overridePreference("WebKitMinimumFontSize", "12");
./fast/animation/request-animation-frame-disabled.html:    window.testRunner.overridePreference("WebKitRequestAnimationFrameEnabled", "0");
./fast/media/media-query-list-04.html:        testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/mediacapturefromelement/resources/webgl-test.js:    testRunner.overridePreference("WebKitWebGLEnabled", "1");
./fast/mediacapturefromelement/resources/webgl-test.js:    testRunner.overridePreference("WebKitWebGLEnabled", "1");
./fast/canvas/drawImage-with-small-values.html:  testRunner.overridePreference("WebKitCanvasUsesAcceleratedDrawing", 0);
./fast/canvas/canvas-imageSmoothingQuality.html:   testRunner.overridePreference("WebKitCanvasUsesAcceleratedDrawing", 0);
./fast/canvas/canvas-blend-solid.html:   testRunner.overridePreference("WebKitCanvasUsesAcceleratedDrawing", 0);
./fast/canvas/canvas-blend-image.html:  testRunner.overridePreference("WebKitCanvasUsesAcceleratedDrawing", 0);
./fast/images/exif-orientation-composited.html:    testRunner.overridePreference('WebKitShouldRespectImageOrientation', 1);
./fast/images/animated-gif-restored-from-bfcache.html:        testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/images/image-controls-basic.html:	testRunner.overridePreference('WebKitImageControlsEnabled', 1);
./fast/images/exif-orientation.html:    testRunner.overridePreference('WebKitShouldRespectImageOrientation', 1);
./fast/images/exif-orientation-css.html:    testRunner.overridePreference('WebKitShouldRespectImageOrientation', 1);
./fast/history/page-cache-back-navigation-crash.html:    testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/history/page-cache-webdatabase-no-transaction-db.html:    testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/history/page-cache-suspended-audiocontext.html:    testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/history/page-cache-destroy-document.html:    window.testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/history/page-cache-geolocation-active-oneshot.html:    testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/history/page-cache-removed-source-buffer.html:    testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/history/page-cache-media-source-closed-2.html:    testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/history/page-cache-after-window-open.html:    testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/history/page-cache-webdatabase-pending-transaction.html:    testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/history/page-cache-createObjectURL.html:    window.testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/history/page-cache-with-opener.html:    testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/history/page-cache-closed-audiocontext.html:    testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/history/back-from-page-with-focused-iframe.html:            testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/history/page-cache-indexed-opened-db.html:    testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/history/pagehide-remove-iframe-crash.html:    testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/history/page-cache-media-source-opened.html:    testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/history/page-cache-createObjectURL-using-open-panel.html:    window.testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/history/go-back-to-iframe-with-plugin.html:      testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/history/history-back-while-pdf-in-pagecache.html:                testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/history/timed-refresh-in-cached-frame.html:    testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/history/resources/page-cache-window-with-opener.html:    testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/history/resources/page-cache-window-with-iframe.html:    testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/history/page-cache-clearing.html:    window.testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/history/page-cache-notification-non-suspendable.html:    testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/history/page-cache-notification-suspendable.html:    testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/history/page-cache-indexed-closed-db.html:    testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/history/page-cache-running-audiocontext.html:    testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/history/page-cache-geolocation.html:        window.testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/history/page-cache-geolocation-active-watcher.html:    testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/history/page-cache-media-source-closed.html:    testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/scrolling/page-cache-back-overflow-scroll-restore.html:testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/scrolling/iframe-scrollable-after-back.html:            testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/scrolling/overflow-scrollable-after-back.html:            testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/scrolling/ios/touch-scroll-back-forward.html:      testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/scrolling/ios/scroll-events-back-forward.html:      testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/scrolling/ios/scroll-events-back-forward-after-pageshow.html:      testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/frames/frame-unload-navigate-and-setTimeout-assert-fail.html:    testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/frames/frame-crash-with-page-cache.html:        testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/frames/page-hide-document-open.html:    testRunner.overridePreference('WebKitUsesPageCachePreferenceKey', 1);
./fast/parser/pre-html5-parser-quirks.html:        testRunner.overridePreference("WebKitUsePreHTML5ParserQuirks", "1");
./fast/parser/noscript-with-javascript-disabled.html:    testRunner.overridePreference("WebKitJavaScriptEnabled", false);
./fast/parser/noscript-with-javascript-enabled.html:    testRunner.overridePreference("WebKitJavaScriptEnabled", true);
./fast/viewport/viewport-128.html:                testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/css/fontloader-page-cache.html:        testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/harness/use-page-cache-expected.txt:This test uses testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1); to enable back-forward WebKit page cache for the duration of the test. The test enables cache, navigates to page-1, then to page-2 and then does history.back() to page-1. On navigation back to page-1, test verifies that previously-initialized timer continues to fire and onload is not called again. If test fails it hangs or outputs 'FAIL' below.
./fast/harness/override-preferences.html:        testRunner.overridePreference("WebKitJavaScriptEnabled", false);
./fast/harness/page-cache-crash-on-data-urls.html:        testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/harness/override-preferences-2.html:        testRunner.overridePreference("WebKitDefaultFontSize", "24");
./fast/harness/use-page-cache.html:        testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/harness/use-page-cache.html:<p>This test uses testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1); to enable
./fast/forms/validation-message-minimum-font-size.html:        uiController.overridePreference('WebKitMinimumFontSize', '24');
./fast/forms/autocomplete-off-with-default-value-does-not-clear.html:	testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/spatial-navigation/snav-single-select-list.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-imagemap-area-without-image.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-div-scrollable-but-without-focusable-content.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-imagemap-area-not-focusable.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-search-optimization.html:        testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-hidden-iframe.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-unit-overflow-and-scroll-in-direction.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-media-elements.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-fully-aligned-horizontally.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-imagemap-overlapped-areas.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-z-index.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-div-overflow-scrol-hidden.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-iframe-with-offscreen-focusable-element.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-input.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-table-traversal.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-textarea.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-radio-group.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-multiple-select.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-multiple-select-optgroup.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-simple-content-overflow.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-iframe-no-scrollable-content.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-imagemap-simple.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-two-elements-one-line.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-radio.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-zero-margin-content.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-iframe-flattening-simple.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-fully-aligned-vertically.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-1st-stop.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-iframe-nested.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-offscreen-content.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-hidden-iframe-zero-size.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-hidden-focusable-element.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-multiple-select-focusring.html:    testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-container-white-space.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-single-select.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-container-only-white-space.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-clipped-overflowed-content.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-tiny-table-traversal.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-only-clipped-overflow-content.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-iframe-recursive-offset-parent.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/spatial-navigation/snav-iframe-no-focusable-content.html:      testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/regions/region-leak-js-information-when-disabled-at-runtime.html:            window.testRunner.overridePreference("WebKitCSSRegionsEnabled", false);
./fast/regions/script-tests/css-regions-disabled.js:    window.testRunner.overridePreference("WebKitCSSRegionsEnabled", "0");
./fast/repaint/no-caret-repaint-in-non-content-editable-element.html:    testRunner.overridePreference("WebKitEnableCaretBrowsing", false);
./fast/events/pagehide-timeout.html:    testRunner.overridePreference('WebKitUsesPageCachePreferenceKey', 1);
./fast/events/pagehide-xhr-open.html:    testRunner.overridePreference('WebKitUsesPageCachePreferenceKey', 1);
./fast/events/pageshow-pagehide-on-back-cached-with-frames.html:    testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/events/tab-focus-anchor.html:    testRunner.overridePreference('WebKitTabToLinksPreferenceKey', false);
./fast/events/suspend-timers.html:    testRunner.overridePreference('WebKitUsesPageCachePreferenceKey', 1);
./fast/events/tab-focus-link-in-canvas.html:    testRunner.overridePreference("WebKitTabToLinksPreferenceKey", 1);
./fast/events/pageshow-pagehide-on-back-cached.html:      testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/events/resources/tabindex-focus-blur-all.js:    testRunner.overridePreference("WebKitJavaEnabled", "0");
./fast/events/onunload-back-to-page-cache.html:            testRunner.overridePreference('WebKitUsesPageCachePreferenceKey', 1);
./fast/text-autosizing/ios/text-autosizing-after-back.html:                testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./fast/dom/timer-throttling-hidden-page-non-nested.html:            testRunner.overridePreference("WebKitHiddenPageDOMTimerThrottlingEnabled", 1);
./fast/dom/DeviceMotion/no-page-cache.html:    testRunner.overridePreference('WebKitUsesPageCachePreferenceKey', 1);
./fast/dom/timer-throttling-hidden-page.html:            testRunner.overridePreference("WebKitHiddenPageDOMTimerThrottlingEnabled", 1);
./fast/dom/DeviceOrientation/no-page-cache.html:    testRunner.overridePreference('WebKitUsesPageCachePreferenceKey', 1);
./fast/dom/DeviceOrientation/event-after-navigation.html:    testRunner.overridePreference('WebKitUsesPageCachePreferenceKey', 1);
./fast/dom/Window/timer-resume-on-navigation-back.html:      testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
./imported/blink/fast/css/image-orientation/image-orientation-dynamic-expected.html:  testRunner.overridePreference('WebKitShouldRespectImageOrientation', 1);
Comment 3 Joseph Pecoraro 2017-06-19 14:28:08 PDT
(In reply to Frédéric Wang (:fredw) from comment #2)
> In bug 171914, I have to disable
> platform/mac/fast/frames/flattening/set-preference.html because
> overridePreference does not support non-boolean values.
> 
> 22:36:46 - smfr : why do you need to use overridePreference?
> 22:36:56 - smfr : tests can just poke at internals.settings
> 22:37:11 - smfr : or is it too late after a test starts?
> 22:41:36 - fredw : I don't remember exactly. I believe internals.settings is
> enough. But other settings in mac/DumpRenderTree.mm and tests set a default
> value via this overridePreference so I thought it would be a bit
> inconsistent.
> 22:43:26 - smfr : i think many tests that use overridePreference pre-date
> internals.settings and could just be converted

I agree with Simon. We should just use internal.settings if what is being toggled is a WebCore::Setting.

overridePreference should be used rarely. I think the only valid case is for WebKit level settings not WebCore settings. Even still those could probably move to something else that executes before the test loads.
Comment 4 Frédéric Wang (:fredw) 2017-06-22 07:17:57 PDT
(In reply to Joseph Pecoraro from comment #3)
> I agree with Simon. We should just use internal.settings if what is being
> toggled is a WebCore::Setting.
> 
> overridePreference should be used rarely. I think the only valid case is for
> WebKit level settings not WebCore settings. Even still those could probably
> move to something else that executes before the test loads.

OK, I uploaded a tentative patch on bug 173714. After that, the remaining settings are:

WebKit2AsynchronousPluginInitializationEnabled
WebKit2AsynchronousPluginInitializationEnabledForAllPlugins
WebKitAllowDisplayingInsecureContent
WebKitCSSRegionsEnabled
WebKitDefaultTextEncodingName
WebKitDisplayImagesKey
WebKitJavaScriptEnabled
WebKitLoadSiteIconsKey
WebKitShouldInvertColors
WebKitStorageBlockingPolicy
WebKitTabToLinksPreferenceKey
WebKitUsesPageCachePreferenceKey

Also:

WebKitHiddenPageDOMTimerThrottlingEnabled (bug 173713)
WebKitDefaultFontSize, MinimumFontSize (non-boolean, need to add something to Internals.idl to expose them)