Diff
Modified: trunk/Tools/ChangeLog (276558 => 276559)
--- trunk/Tools/ChangeLog 2021-04-24 22:31:57 UTC (rev 276558)
+++ trunk/Tools/ChangeLog 2021-04-25 00:39:43 UTC (rev 276559)
@@ -1,3 +1,28 @@
+2021-04-24 Ryosuke Niwa <rn...@webkit.org>
+
+ Add an option to not enable all experimental features in WebKitTestRunner
+ https://bugs.webkit.org/show_bug.cgi?id=224958
+
+ Reviewed by Tim Horton.
+
+ Added --no-enable-all-experimental-features to run-webkit-tests and WebKitTestRunner.
+
+ It causes a crash in DumpRenderTree for now. We should rectify this in the future
+ when we align the behaviors of WebKitTestRunner and DumpRenderTree.
+
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ (parse_args): Added --no-enable-all-experimental-features.
+ * Scripts/webkitpy/port/driver.py:
+ (Driver.cmd_line): Pass along the option to WebKitTestRunner.
+ * WebKitTestRunner/Options.cpp:
+ (WTR::handleOptionNoEnableAllExperimentalFeatures): Added.
+ (WTR::OptionsHandler::OptionsHandler): Added --no-enable-all-experimental-features.
+ * WebKitTestRunner/Options.h:
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::initialize):
+ (WTR::TestController::resetPreferencesToConsistentValues):
+ * WebKitTestRunner/TestController.h:
+
2021-04-24 Tyler Wilcock <twilc...@protonmail.com>
Refactor ValueRange from enum to enum class
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py (276558 => 276559)
--- trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py 2021-04-24 22:31:57 UTC (rev 276558)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py 2021-04-25 00:39:43 UTC (rev 276559)
@@ -126,6 +126,8 @@
help="Enable (disable) an internal feature (--internal-feature FeatureName[=true|false])"),
optparse.make_option("--experimental-feature", type="string", action="" default=[],
help="Enable (disable) an experimental feature (--experimental-feature FeatureName[=true|false])"),
+ optparse.make_option("--no-enable-all-experimental-features", action="" default=True, dest="enable_all_experimental_features",
+ help="Enables all experimental features in WebKitTestRunner"),
]))
option_group_definitions.append(("WebKit Options", [
Modified: trunk/Tools/Scripts/webkitpy/port/driver.py (276558 => 276559)
--- trunk/Tools/Scripts/webkitpy/port/driver.py 2021-04-24 22:31:57 UTC (rev 276558)
+++ trunk/Tools/Scripts/webkitpy/port/driver.py 2021-04-25 00:39:43 UTC (rev 276559)
@@ -534,6 +534,9 @@
cmd.append('--internal-feature')
cmd.append(feature)
+ if not self._port.get_option('enable_all_experimental_features'):
+ cmd.append('--no-enable-all-experimental-features')
+
for feature in self._port.experimental_feature():
cmd.append('--experimental-feature')
cmd.append(feature)
Modified: trunk/Tools/Scripts/webkitpy/port/driver_unittest.py (276558 => 276559)
--- trunk/Tools/Scripts/webkitpy/port/driver_unittest.py 2021-04-24 22:31:57 UTC (rev 276558)
+++ trunk/Tools/Scripts/webkitpy/port/driver_unittest.py 2021-04-25 00:39:43 UTC (rev 276559)
@@ -27,6 +27,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import unittest
+import optparse
from webkitpy.common.system.systemhost_mock import MockSystemHost
@@ -205,7 +206,7 @@
self.assertEqual(content_block.decoded_content, b'12345678\n')
def test_no_timeout(self):
- port = TestWebKitPort()
+ port = TestWebKitPort(options=optparse.Values({'enable_all_experimental_features': True}))
port._config.build_directory = lambda configuration: '/mock-build'
driver = Driver(port, 0, pixel_tests=True, no_timeout=True)
if sys.platform.startswith('win'):
Modified: trunk/Tools/WebKitTestRunner/Options.cpp (276558 => 276559)
--- trunk/Tools/WebKitTestRunner/Options.cpp 2021-04-24 22:31:57 UTC (rev 276558)
+++ trunk/Tools/WebKitTestRunner/Options.cpp 2021-04-25 00:39:43 UTC (rev 276559)
@@ -128,6 +128,12 @@
return true;
}
+static bool handleOptionNoEnableAllExperimentalFeatures(Options& options, const char*, const char* feature)
+{
+ options.enableAllExperimentalFeatures = false;
+ return true;
+}
+
static bool handleOptionExperimentalFeature(Options& options, const char*, const char* feature)
{
return parseFeature(feature, options.features);
@@ -162,6 +168,7 @@
optionList.append(Option("--show-webview", "Show the WebView during test runs (for debugging)", handleOptionShowWebView));
optionList.append(Option("--show-touches", "Show the touches during test runs (for debugging)", handleOptionShowTouches));
optionList.append(Option("--world-leaks", "Check for leaks of world objects (currently, documents)", handleOptionCheckForWorldLeaks));
+ optionList.append(Option("--no-enable-all-experimental-features", "Do not enable all experimental features by default", handleOptionNoEnableAllExperimentalFeatures));
optionList.append(Option("--experimental-feature", "Enable experimental feature", handleOptionExperimentalFeature, true));
optionList.append(Option("--internal-feature", "Enable internal feature", handleOptionInternalFeature, true));
#if ENABLE(ACCESSIBILITY_ISOLATED_TREE)
Modified: trunk/Tools/WebKitTestRunner/Options.h (276558 => 276559)
--- trunk/Tools/WebKitTestRunner/Options.h 2021-04-24 22:31:57 UTC (rev 276558)
+++ trunk/Tools/WebKitTestRunner/Options.h 2021-04-25 00:39:43 UTC (rev 276559)
@@ -49,6 +49,7 @@
bool forceComplexText { false };
bool checkForWorldLeaks { false };
bool allowAnyHTTPSCertificateForAllowedHosts { false };
+ bool enableAllExperimentalFeatures { true };
std::vector<std::string> paths;
std::set<std::string> allowedHosts;
TestFeatures features;
Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (276558 => 276559)
--- trunk/Tools/WebKitTestRunner/TestController.cpp 2021-04-24 22:31:57 UTC (rev 276558)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp 2021-04-25 00:39:43 UTC (rev 276559)
@@ -533,6 +533,7 @@
m_allowedHosts = options.allowedHosts;
m_checkForWorldLeaks = options.checkForWorldLeaks;
m_allowAnyHTTPSCertificateForAllowedHosts = options.allowAnyHTTPSCertificateForAllowedHosts;
+ m_enableAllExperimentalFeatures = options.enableAllExperimentalFeatures;
m_globalFeatures = std::move(options.features);
m_usingServerMode = (m_paths.size() == 1 && m_paths[0] == "-");
@@ -881,10 +882,11 @@
void TestController::resetPreferencesToConsistentValues(const TestOptions& options)
{
- batchUpdatePreferences(platformPreferences(), [options] (auto preferences) {
+ batchUpdatePreferences(platformPreferences(), [options, enableAllExperimentalFeatures = m_enableAllExperimentalFeatures] (auto preferences) {
WKPreferencesResetTestRunnerOverrides(preferences);
- WKPreferencesEnableAllExperimentalFeatures(preferences);
+ if (enableAllExperimentalFeatures)
+ WKPreferencesEnableAllExperimentalFeatures(preferences);
WKPreferencesSetProcessSwapOnNavigationEnabled(preferences, options.shouldEnableProcessSwapOnNavigation());
WKPreferencesSetStorageBlockingPolicy(preferences, kWKAllowAllStorage); // FIXME: We should be testing the default.
Modified: trunk/Tools/WebKitTestRunner/TestController.h (276558 => 276559)
--- trunk/Tools/WebKitTestRunner/TestController.h 2021-04-24 22:31:57 UTC (rev 276558)
+++ trunk/Tools/WebKitTestRunner/TestController.h 2021-04-25 00:39:43 UTC (rev 276559)
@@ -539,6 +539,7 @@
bool m_gcBetweenTests { false };
bool m_shouldDumpPixelsForAllTests { false };
bool m_createdOtherPage { false };
+ bool m_enableAllExperimentalFeatures { true };
std::vector<std::string> m_paths;
std::set<std::string> m_allowedHosts;
TestFeatures m_globalFeatures;