Bug 207481 - [DRT] InternalSettingsGenerated::resetToConsistentState() may override TestOptions::enableBackForwardCache
Summary: [DRT] InternalSettingsGenerated::resetToConsistentState() may override TestOp...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-02-10 10:50 PST by Chris Dumez
Modified: 2020-03-15 18:17 PDT (History)
10 users (show)

See Also:


Attachments
Patch (2.24 KB, patch)
2020-02-10 10:52 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (2.51 KB, patch)
2020-02-10 16:09 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (5.16 KB, patch)
2020-03-13 15:41 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (6.16 KB, patch)
2020-03-13 15:58 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2020-02-10 10:50:11 PST
InternalSettingsGenerated::resetToConsistentState() may override TestOptions such as enableBackForwardCache. This is causing issues such as the back/forward cache sometimes getting enabled on tests where TestOptions::enableBackForwardCache() is false, because a previous test has enabled the back/forward cache.
Comment 1 Chris Dumez 2020-02-10 10:52:34 PST
Created attachment 390265 [details]
Patch
Comment 2 Alexey Proskuryakov 2020-02-10 13:21:56 PST
Comment on attachment 390265 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=390265&action=review

> Tools/DumpRenderTree/mac/DumpRenderTree.mm:1927
> +    resetWebPreferencesToConsistentValues();
> +    setWebPreferencesForTestOptions(options);

I recall that we had bugs fixed by moving various "reset preferences" calls around in the past too. Probably not these exact ones. 

Can you add a comment explaining the invariant that need to be maintained ("do this after ... because ...")? That will help keep this fix preserved for longer. And maybe even a pair of regression tests that reproduces this directly and reliably?
Comment 3 Chris Dumez 2020-02-10 16:09:20 PST
Created attachment 390307 [details]
Patch
Comment 4 WebKit Commit Bot 2020-02-10 16:53:41 PST
Comment on attachment 390307 [details]
Patch

Clearing flags on attachment: 390307

Committed r256232: <https://trac.webkit.org/changeset/256232>
Comment 5 WebKit Commit Bot 2020-02-10 16:53:43 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2020-02-10 16:54:15 PST
<rdar://problem/59331661>
Comment 7 Chris Dumez 2020-03-13 15:32:34 PDT
Reverted r256232 for reason:

Caused ResizeObserver tests to become flaky

Committed r258438: <https://trac.webkit.org/changeset/258438>
Comment 8 Chris Dumez 2020-03-13 15:41:36 PDT
Created attachment 393544 [details]
Patch
Comment 9 Chris Dumez 2020-03-13 15:58:51 PDT
Created attachment 393550 [details]
Patch
Comment 10 WebKit Commit Bot 2020-03-15 18:17:07 PDT
Comment on attachment 393550 [details]
Patch

Clearing flags on attachment: 393550

Committed r258482: <https://trac.webkit.org/changeset/258482>
Comment 11 WebKit Commit Bot 2020-03-15 18:17:09 PDT
All reviewed patches have been landed.  Closing bug.