Skip to content

Commit b573ea2

Browse files
committed
Add an option to not enable all experimental features in DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=225041 Reviewed by Wenson Hsieh. Added --no-enable-all-experimental-features to DumpRenderTree as we did for WebKitTestRunner in r276559. * DumpRenderTree/mac/DumpRenderTree.mm: (setWebPreferencesForTestOptions): (initializeGlobalsFromCommandLineOptions): Canonical link: https://commits.webkit.org/237017@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@276581 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 12cc0fa commit b573ea2

2 files changed

Lines changed: 20 additions & 2 deletions

File tree

Tools/ChangeLog

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
2021-04-25 Ryosuke Niwa <[email protected]>
2+
3+
Add an option to not enable all experimental features in DumpRenderTree
4+
https://bugs.webkit.org/show_bug.cgi?id=225041
5+
6+
Reviewed by Wenson Hsieh.
7+
8+
Added --no-enable-all-experimental-features to DumpRenderTree as we did
9+
for WebKitTestRunner in r276559.
10+
11+
* DumpRenderTree/mac/DumpRenderTree.mm:
12+
(setWebPreferencesForTestOptions):
13+
(initializeGlobalsFromCommandLineOptions):
14+
115
2021-04-25 Darin Adler <[email protected]>
216

317
Fix handling of overflow of /= and *= operators with double over Checked<uint64_t> and other 64-bit types.

Tools/DumpRenderTree/mac/DumpRenderTree.mm

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ @interface WebView (WebViewInternalForTesting)
270270
static int useAcceleratedDrawing;
271271
static int gcBetweenTests;
272272
static int allowAnyHTTPSCertificateForAllowedHosts;
273+
static int enableAllExperimentalFeatures = YES;
273274
static int showWebView;
274275
static int printTestCount;
275276
static int checkForWorldLeaks;
@@ -863,8 +864,10 @@ static void setWebPreferencesForTestOptions(WebPreferences *preferences, const W
863864
[preferences _batchUpdatePreferencesInBlock:^(WebPreferences *preferences) {
864865
[preferences _resetForTesting];
865866

866-
for (WebFeature *feature in [WebPreferences _experimentalFeatures])
867-
[preferences _setEnabled:YES forFeature:feature];
867+
if (enableAllExperimentalFeatures) {
868+
for (WebFeature *feature in [WebPreferences _experimentalFeatures])
869+
[preferences _setEnabled:YES forFeature:feature];
870+
}
868871

869872
if (persistentUserStyleSheetLocation()) {
870873
preferences.userStyleSheetLocation = [NSURL URLWithString:(__bridge NSString *)persistentUserStyleSheetLocation().get()];
@@ -1000,6 +1003,7 @@ static void initializeGlobalsFromCommandLineOptions(int argc, const char *argv[]
10001003
{"no-timeout", no_argument, &useTimeoutWatchdog, NO},
10011004
{"allowed-host", required_argument, nullptr, 'a'},
10021005
{"allow-any-certificate-for-allowed-hosts", no_argument, &allowAnyHTTPSCertificateForAllowedHosts, YES},
1006+
{"no-enable-all-experimental-features", no_argument, &enableAllExperimentalFeatures, NO},
10031007
{"show-webview", no_argument, &showWebView, YES},
10041008
{"print-test-count", no_argument, &printTestCount, YES},
10051009
{"world-leaks", no_argument, &checkForWorldLeaks, NO},

0 commit comments

Comments
 (0)