Changeset 276559 in webkit
- Timestamp:
- Apr 24, 2021, 5:39:43 PM (5 years ago)
- Location:
- trunk/Tools
- Files:
-
- 8 edited
-
ChangeLog (modified) (1 diff)
-
Scripts/webkitpy/layout_tests/run_webkit_tests.py (modified) (1 diff)
-
Scripts/webkitpy/port/driver.py (modified) (1 diff)
-
Scripts/webkitpy/port/driver_unittest.py (modified) (2 diffs)
-
WebKitTestRunner/Options.cpp (modified) (2 diffs)
-
WebKitTestRunner/Options.h (modified) (1 diff)
-
WebKitTestRunner/TestController.cpp (modified) (2 diffs)
-
WebKitTestRunner/TestController.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r276550 r276559 1 2021-04-24 Ryosuke Niwa <rniwa@webkit.org> 2 3 Add an option to not enable all experimental features in WebKitTestRunner 4 https://bugs.webkit.org/show_bug.cgi?id=224958 5 6 Reviewed by Tim Horton. 7 8 Added --no-enable-all-experimental-features to run-webkit-tests and WebKitTestRunner. 9 10 It causes a crash in DumpRenderTree for now. We should rectify this in the future 11 when we align the behaviors of WebKitTestRunner and DumpRenderTree. 12 13 * Scripts/webkitpy/layout_tests/run_webkit_tests.py: 14 (parse_args): Added --no-enable-all-experimental-features. 15 * Scripts/webkitpy/port/driver.py: 16 (Driver.cmd_line): Pass along the option to WebKitTestRunner. 17 * WebKitTestRunner/Options.cpp: 18 (WTR::handleOptionNoEnableAllExperimentalFeatures): Added. 19 (WTR::OptionsHandler::OptionsHandler): Added --no-enable-all-experimental-features. 20 * WebKitTestRunner/Options.h: 21 * WebKitTestRunner/TestController.cpp: 22 (WTR::TestController::initialize): 23 (WTR::TestController::resetPreferencesToConsistentValues): 24 * WebKitTestRunner/TestController.h: 25 1 26 2021-04-24 Tyler Wilcock <twilco.o@protonmail.com> 2 27 -
trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
r274095 r276559 127 127 optparse.make_option("--experimental-feature", type="string", action="append", default=[], 128 128 help="Enable (disable) an experimental feature (--experimental-feature FeatureName[=true|false])"), 129 optparse.make_option("--no-enable-all-experimental-features", action="store_false", default=True, dest="enable_all_experimental_features", 130 help="Enables all experimental features in WebKitTestRunner"), 129 131 ])) 130 132 -
trunk/Tools/Scripts/webkitpy/port/driver.py
r271071 r276559 535 535 cmd.append(feature) 536 536 537 if not self._port.get_option('enable_all_experimental_features'): 538 cmd.append('--no-enable-all-experimental-features') 539 537 540 for feature in self._port.experimental_feature(): 538 541 cmd.append('--experimental-feature') -
trunk/Tools/Scripts/webkitpy/port/driver_unittest.py
r254340 r276559 28 28 29 29 import unittest 30 import optparse 30 31 31 32 from webkitpy.common.system.systemhost_mock import MockSystemHost … … 206 207 207 208 def test_no_timeout(self): 208 port = TestWebKitPort( )209 port = TestWebKitPort(options=optparse.Values({'enable_all_experimental_features': True})) 209 210 port._config.build_directory = lambda configuration: '/mock-build' 210 211 driver = Driver(port, 0, pixel_tests=True, no_timeout=True) -
trunk/Tools/WebKitTestRunner/Options.cpp
r275810 r276559 129 129 } 130 130 131 static bool handleOptionNoEnableAllExperimentalFeatures(Options& options, const char*, const char* feature) 132 { 133 options.enableAllExperimentalFeatures = false; 134 return true; 135 } 136 131 137 static bool handleOptionExperimentalFeature(Options& options, const char*, const char* feature) 132 138 { … … 163 169 optionList.append(Option("--show-touches", "Show the touches during test runs (for debugging)", handleOptionShowTouches)); 164 170 optionList.append(Option("--world-leaks", "Check for leaks of world objects (currently, documents)", handleOptionCheckForWorldLeaks)); 171 optionList.append(Option("--no-enable-all-experimental-features", "Do not enable all experimental features by default", handleOptionNoEnableAllExperimentalFeatures)); 165 172 optionList.append(Option("--experimental-feature", "Enable experimental feature", handleOptionExperimentalFeature, true)); 166 173 optionList.append(Option("--internal-feature", "Enable internal feature", handleOptionInternalFeature, true)); -
trunk/Tools/WebKitTestRunner/Options.h
r275810 r276559 50 50 bool checkForWorldLeaks { false }; 51 51 bool allowAnyHTTPSCertificateForAllowedHosts { false }; 52 bool enableAllExperimentalFeatures { true }; 52 53 std::vector<std::string> paths; 53 54 std::set<std::string> allowedHosts; -
trunk/Tools/WebKitTestRunner/TestController.cpp
r276326 r276559 534 534 m_checkForWorldLeaks = options.checkForWorldLeaks; 535 535 m_allowAnyHTTPSCertificateForAllowedHosts = options.allowAnyHTTPSCertificateForAllowedHosts; 536 m_enableAllExperimentalFeatures = options.enableAllExperimentalFeatures; 536 537 m_globalFeatures = std::move(options.features); 537 538 … … 882 883 void TestController::resetPreferencesToConsistentValues(const TestOptions& options) 883 884 { 884 batchUpdatePreferences(platformPreferences(), [options ] (auto preferences) {885 batchUpdatePreferences(platformPreferences(), [options, enableAllExperimentalFeatures = m_enableAllExperimentalFeatures] (auto preferences) { 885 886 WKPreferencesResetTestRunnerOverrides(preferences); 886 887 887 WKPreferencesEnableAllExperimentalFeatures(preferences); 888 if (enableAllExperimentalFeatures) 889 WKPreferencesEnableAllExperimentalFeatures(preferences); 888 890 889 891 WKPreferencesSetProcessSwapOnNavigationEnabled(preferences, options.shouldEnableProcessSwapOnNavigation()); -
trunk/Tools/WebKitTestRunner/TestController.h
r276326 r276559 540 540 bool m_shouldDumpPixelsForAllTests { false }; 541 541 bool m_createdOtherPage { false }; 542 bool m_enableAllExperimentalFeatures { true }; 542 543 std::vector<std::string> m_paths; 543 544 std::set<std::string> m_allowedHosts;
Note:
See TracChangeset
for help on using the changeset viewer.